Click here for fast information :Home | Siemens | AllenBradley/Rockwell | Mitsubishi | SCADA |Training | PLC Communications | Emergency Support | Vision Software | contact us
![]() |
MR Control Ltd Unit 5, Avonbank Industrial Estate, West Town Road, Avonmouth Bristol BS11 9DE Tel: 0117 982 6608 Fax: 0117 982 6668 Click Here to Contact MR Control (c) 2001-2003 |
|
This document has been converted from Word 97 (which
has not done a perfect job) but this may give you an idea of our Allen
Bradley Rockwell training
|
|
Training Notes on Allen Bradley
PLC5 & SLC 500
(DOS)
Contents
Section 1 Document History *
Section 2 Allen Bradley PLC5 and SLC 500 Training *
2.1 Introduction *
2.2 What is a PLC? *
2.3 Example PLC5 Layout *
2.4 SLC 500 example Layout *
2.5 Another Example PLC Layout *
Section 3 PLC 5 Programming *
3.1 Programming Software *
3.2 Starting the Programming Software *
3.3 Keyboard Notes *
3.4 Program Structure *
3.4.1 File 2 *
3.4.2 Passing Parameters *
3.4.3 Data *
3.5 Ladder *
3.6 Editing in the PLC *
Section 4 Memory Types *
4.1 PLC 5 Datatype Addressing *
4.1.1 Digital Inputs *
4.1.2 Digital Outputs *
4.1.3 Digital Bits *
4.1.4 Timers *
4.1.5 Counters *
4.1.6 Other Addressing *
4.2 SLC 500 Datatype Addressing *
4.2.1 Digital Inputs *
4.2.2 Digital Outputs *
4.2.3 Digital bits (Both PLC5 and SLC 500) *
4.2.4 Timers (both PLCs) *
4.2.5 Counters *
4.2.6 Other Addressing *
4.3 PLC 5 Datatype limitations *
4.4 Useful System PLC5 Memory Areas *
4.5 Useful System SLC 500 Memory Areas *
Section 5 Using the Programming Software *
5.1 Introduction *
5.2 Creating a New Program *
5.3 Initiating a new PLC *
5.4 Creating/Editing a Ladder internal File *
5.5 Adding a Ladder rung *
5.6 Copying a rung from another rung *
5.7 Deleting a Segment *
5.8 Data Monitor - To display data on-line *
Section 6 Simple PLC Editing *
Section 7 Searching *
7.1 Overview *
7.2 Searching in ladder mode *
7.2.1 PLC 5 Search screen *
7.2.2 SLC 500 Search screen *
7.3 Search Limitations *
7.4 Displaying Live Ladder Information *
7.5 Force Variables *
Section 8 Processor Status and Clearing Faults *
8.1 Clearing Major faults: *
8.1.1 PLC 5 status *
8.2 SLC 500 Processor Status *
8.3 Clearing Faults *
Section 9 Starting and Stopping the PLC *
9.1 Starting the PLC *
9.2 Stopping the PLC *
Section 10 Timers *
10.1 Timer Boxes *
10.2 Timer Presets *
10.3 Timer Types *
Section 11 Counters *
11.1 Count Up Counter *
11.2 Retentive Counters *
Section 12 Analogue Inputs *
12.1 PLC 5 Introduction *
12.2 PLC 5 BTR Parameters *
12.3 PLC 5 Data File Parameter *
12.4 PLC 5 Analogue Input BTW *
12.5 BTW Data Usage *
12.6 SLC 500 Analogue Inputs *
Section 13 Analogue Outputs *
13.1 PLC 5 Introduction *
13.2 PLC 5 BTW Parameters *
13.3 PLC 5 BTW Data Usage *
13.4 SLC 500 Analogue Outputs *
Section 14 EPROM Programming *
14.1 EPROM Types *
Section 15 Fault Finding *
15.1 Introduction *
15.2 LEDs *
Section 16 Documentation *
16.1 Introduction *
Section 17 Backing up and Restoring the PLC Program *
17.1 Backing up the PLC *
17.2 Restoring the PLC program *
Section 18 Cross Reference and Reports *
18.1 Generating a report *
18.2 Viewing/Printing Reports *
Section 19 Comparison with Other PLCs *
19.1 Mitsubishi Timers *
19.2 Mitsubishi Counters *
19.3 Siemens Timer Types *
19.3.1 SP 'Pulse' Timer *
19.3.2 SE 'Extended Pulse' Timer *
19.3.3 SD (SR) 'On Delay' Timer *
19.3.4 SS 'Latched On Delay' Timer *
19.3.5 SF 'Off Delay' Timer *
19.3.6 Back to Back timers *
19.4 I/O Descriptions *
Appendix 1 - Abbreviations Used *
Appendix 2 - Y2K Compatibility *
Section 1 Document History
|
Revision |
Comments |
Date |
|
0.0 |
Initial Writing Filename AB-TR-01.WP |
10 March 1999 |
|
1.0 |
Initial Client Issue Filename AB-TR-04.WP |
11 March 1999 |
|
1.1 |
Update to include SLC 500 series Filename AB-TR-06.DOC |
9 November 1999 |
|
1.2 |
Minor modifications Filename AB-TR-07.DOC |
15th may 2000 |
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Section 2 Allen Bradley PLC5 and SLC 500 Training
2.1 Introduction
This document details training information for Allen Bradley PLC 5 PLCs using 6200 Programming Software. Also included is information about the SLC 500 series.
2.2 What is a PLC?
A PLC (Programmable Logic Controller) is effectively a computer with I/O. The I/O (input/output modules) are a method of getting signals from the outside world into the computer and back again. The I/O are generally robust (so they can cope with noise and spikes). Also available are intelligent I/O cards (which effectively have a computer on the I/O card) and communication cards (which talk to other computers and graphic systems).
Allen Bradley PLCs are among the top selling PLCs around the world. They are very reliable and robust PLCs.
There are two main series of PLCs. The larger PLCs are called the "PLC 5" series and the smaller PLCs are called the "SLC 500" series. While the PLCs have different amounts of memory and varying speed the main reason for choosing the type of PLC is the amount of I/O required on the project.
2.3 Example PLC5 Layout
This diagram shows a typical PLC 5 rack layout.
+------------------------------------------+ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ P ¦C ¦I ¦I ¦I ¦I ¦I ¦I ¦I ¦I ¦I ¦ ¦ ¦ S ¦P ¦/ ¦/ ¦/ ¦/ ¦/ ¦/ ¦/ ¦/ ¦/ ¦ ¦ ¦ U ¦U ¦O ¦O ¦O ¦O ¦O ¦O ¦O ¦O ¦O ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +------------------------------------------+
The abbreviations are explained in this table:
|
Abbreviation |
Description |
|
PSU |
Power Supply Unit |
|
CPU |
Central Processor Unit |
|
I/O |
I/O cards |
The PSU supplies power for the PLC system. The CPU is the ‘brains’ behind the system, and contains the ladder program. The I/O cards are the interface to the outside world.
2.4 SLC 500 example Layout
+-------------------+ ¦ ¦ ¦ ¦ ¦ ¦ ¦ P ¦C ¦I ¦I ¦I ¦ ¦ S ¦P ¦/ ¦/ ¦/ ¦ ¦ U ¦U ¦O ¦O ¦O ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +-------------------+
These computer cards are normally wider but shorter than the PLC 5 series.
2.5 Another Example PLC Layout
CPU
(ladder) AI ETHERNET I/O LINK
CARD <---CARDS--->AO CARD CARDS
+--------------------------------------------------------+
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ++ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ++ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦
¦ ¦ ++ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ++ ¦ ¦ ¦ ¦
¦ ¦ ¦¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦¦ ¦ ¦ ¦ ¦
¦ ¦ ¦¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦¦ ¦ ¦ ¦ ¦
¦ ¦ ++ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ++ ¦ ¦ ¦ ¦
+--------------------------------------------------------+
Section 3 PLC 5 Programming
3.1 Programming Software
This document trains personnel specifically in the following version of programming software for the PLC 5:
+------------------------- PLC-5 PROGRAMMING SOFTWARE -------------------------+ ¦ ¦ ¦ A 6200 Series Software Product ¦ ¦ ¦ ¦ Copyright 1986, 1994, Allen-Bradley Company, Inc. ¦ ¦ All Rights Reserved ¦ ¦ ¦ ¦ Release 5.0 ¦ ¦ ¦ ¦ This software is licensed to: Company JACOBS BAKERY LTD ¦ ¦ Location SITE ELECTRICAL DEPARTMENT ¦ ¦ LONG LANE, AINTREE, LIVERPOOL ¦ ¦ Serial Number: ¦ ¦------------------------------------------------------------------------------¦ ¦ Wed Mar 10, 1999 9:44:05 am ¦ ¦------------------------------------------------------------------------------¦ ¦ Terminal Address:77 Current Device: 1784-KT (DH+) PLC Address:2 ¦ +------------------------------------------------------------------------------+
and this SLC 500 programming software
+------------ SLC-500 ADVANCED PROGRAMMING SOFTWARE ---- RELEASE 6.01 --------+ ¦ ¦ ¦ Rockwell Software Incorporated, Copyright 1989-1995 ¦ ¦ ¦ ¦ 9323 - PA2E ¦ ¦ ¦ ¦ All Rights Reserved ¦ ¦ ¦ ¦ ¦ ¦ This software is licensed to: ¦ ¦ The JACOBS BAKERY Ltd ¦ ¦ ¦ ¦ ¦ ¦------------------------------------------------------------------------------¦ ¦ Thr Nov 18, 1999 Current Offline File: 2819F1 9:34:41 am ¦ ¦------------------------------------------------------------------------------¦ ¦ TERM Address:N/A Current Device:Full-Duplex PROC Address:N/A ¦ +------------------------------------------------------------------------------+
Some information for the previous versions is also included here.
3.2 Starting the Programming Software
This section details how to start the programming software on the PC.
|
Step |
Description |
|
1 |
Turn on the programmer/PC |
|
2 |
Move to the IPDS directory cd \IPDS |
|
3 |
Start the software ABMENU This should give a menu selection for the various PLC packages on your PC |
|
4 |
If this doesn't work try (for the PLC 5): cd\ipds\attach\plc5 it and this for the SLC 500: cd\ipds\attach\slc500 ap |
3.3 Keyboard Notes
Usually function keys F1 to F10 are used for all functions. The other important keys are:
ENTER (accept)
ESC (abort)
3.4 Program Structure
These PLCs can use a block structure. If used correctly this can be a great aid to structuring your programs in a modular manner. This may sound like jargon but effectively it means you can simplify your programs to aid maintenance by personnel other than the programmer.
Basic Example of Ladder File Layout:
%T%P PROGRAM DIRECTORY FOR PROCESSOR: V5TEST %P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P[ OFFLINE ]%P%P%P%W
%Q File Name Type Size(words) %Q
%Q──────────────────────────────────────────────────────────────────────────────%Q
%Q 0 system 10 %Q
%Q 1 undefined 6 %Q
%Q 2 ladder 7 %Q
%Q %Q
%Q %Q
%Q %Q
%Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]
The block structure has great advantages for large programs but is still beneficial for smaller PLCs.
These are the types of Ladder Files:
|
File |
Description |
|
2 |
Main Starting Block (normally) |
|
3 |
subroutines |
When the PLC powers up it will normally run block 2 (it can run other blocks but this is very rare).
A larger example:
%T%P PROGRAM DIRECTORY FOR PROCESSOR: D1_BM1E %P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P[ OFFLINE ]%P%P%P%W
%Q File Name Type Size(words) %Q
%Q──────────────────────────────────────────────────────────────────────────────%Q
%Q 0 D1_BM1B system 182 %Q
%Q 1 17Sep1996 undefined 4 %Q
%Q 2 Main ladder 69 %Q
%Q 3 Startup ladder 5 %Q
%Q 4 General ladder 47 %Q
%Q 5 Spare ladder 5 %Q
%Q 6 Station6 ladder 56 %Q
%Q 7 UpperLower ladder 202 %Q
%Q 8 TEBelt ladder 81 %Q
%Q 9 StorageB1 ladder 64 %Q
%Q 10 StorageB2 ladder 62 %Q
%Q 11 StorageB3 ladder 62 %Q
%Q 12 StorageB4 ladder 57 %Q
%Q
%Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]
3.4.1 File 2
This block can control the calling of other blocks - the best programs are laid out with just calls to other blocks in File 2
Startup Control
%Q Startup %Q
%Q Control %Q
%Q %JSR───────────────% %Q
%_─────────────────────────────────────────────────────────%$JUMP TO SUBROUTINE%─%b
%Q %Prog file number 3% %Q
%Q %Input parameter % %Q
%Q %Return parameter % %Q
%Q %──────────────────% %Q
General Control
%Q General %Q
%Q Control %Q
%Q %JSR───────────────% %Q
%_─────────────────────────────────────────────────────────%$JUMP TO SUBROUTINE%─%b
%Q %Prog file number 4% %Q
%Q %Input parameter % %Q
%Q %Return parameter % %Q
%Q %──────────────────% %Q
Here, Ladder File 3 and 4 are called consecutively. File 3 contains details of line Startup and file 4 contains general control information.
Always use low numbers for ladder files first as each file which is blank (even when it is not used or even configured) takes up memory.
3.4.2 Passing Parameters
Subroutines can pass parameters. This is detailed in the advanced course. On Allen Bradley PLCs this is not often used but can be very powerful when used correctly.
3.4.3 Data
Data areas are a very important part of the PLC program. These contain obvious items like setpoints and timers but also the inputs and outputs (both analogue and digital).
3.5 Ladder
Ladder looks like this:
BM1 Start Validation Control
============================
PC CHECK PART 1
%Q PEC %PEC %PEC %TEB DSB/TEB %Q
%Q PULL NOSE %LOWER %UPPER %Loading conveyors %Q
%Q OK FROM %STORAGE %STORAGE %End empty %Q
%Q ST.6 %BELT %BELT. EXIT%Photocell %Q
%Q %(EXIT) %(off=full)% %Q
%Q I:002 I:002 I:002 I:003 B3 %Q
%_────] [────────] [────────] [────────] [──────────────────────────────( )─────%b
%Q 07 12 13 00 200 %Q
A Timer rung looks like this:
Power on startup delay
%Q START %BM1 ON Validation %Q
%Q VALIDATION% On Time %Q
%Q delay %Q
%Q O:001 I:001 %TON───────────────% %Q
%_────] [────────] [──────────────────────────────────%$TIMER ON DELAY %─(EN)─%b
%Q 00 02 %Timer T4:10% %Q
%Q (4:6) (16:9) %Time base 0.01%─(DN) %Q
%Q %Preset 60% %Q
%Q %Accum 61% %Q
%Q %──────────────────% %Q
3.6 Editing in the PLC
Allen Bradley has a strange edit cycle - after editing you have to 'Test' the edits and then 'Accept' the edits. This is shortcut to:
F9, F8, F10, F8
This can be a bit annoying. It is designed to allow you to quickly test your edits and then abort them if they don't work. Very silly, rarely useful.
Section 4 Memory Types
These are the main types of PLC memory:
|
Type |
Memory |
Description |
|
0 |
S |
Processor System Area |
|
1 |
I |
digital inputs |
|
2 |
O |
digital outputs (letter O here!) |
|
3 |
B |
(Binary) Flag bits |
|
4 |
T |
Timers |
|
5 |
C |
Counters |
|
6 |
R |
Complex Instruction System Area |
|
7 |
N |
Integer |
|
8 |
F |
Floating Point |
|
D |
BCD (hex) data |
Binary Flags (B) are generally used for digital information (but can easily be used for analogue information if required) and Integers (N) for Analogue Information. Data are retentive (ie they keep their data when the mains is switched off).
All files 9 and above can be configured as required. Note that you can delete file 8 and reinstate it as integer (and so on) but THIS IS A BAD IDEA so don't do it!
4.1 PLC 5 Datatype Addressing
All computer systems are very precise about ‘syntax’. This means you must type correctly!
4.1.1 Digital Inputs
Example Inputs addressing (octal)
I0/0
I32/7
I32/10
I32/17
Invalid Input addressing
I8/0
I9/0
I7/8
I0/9
I3/18
4.1.2 Digital Outputs
Example Outputs addressing (octal)
O0/0
OI32/7
OI32/10
O32/17
Invalid Output addressing
O8/0
O9/0
O7/8
O0/9
O3/18
4.1.3 Digital Bits
Example Bit Addressing:
B3:0/0 B3/0
B3:1/0 B3/16
B3:2/0 B3/32
B3:3/0 B3/48
Invalid Bit Addressing:
B3:0/16
B3:1/16
4.1.4 Timers
Example Timer Addressing
T4:0.PRE (preset value integer)
T4:0.ACC (current (accumulated) value integer)
T4:100/dn (expired bit)
T4:123/en (enabled bit)
T4:99/tt (enabled but not expired bit)
4.1.5 Counters
Example Counter Addressing
C5:0.PRE (preset value integer)
C5:0.ACC (current (accumulated) value integer)
C5:10/dn (Counter expired bit)
4.1.6 Other Addressing
System Area Addressing
R6:0 (more details in advanced course)
Integer area
N7:0 (integer addressed)
N7:0/5 (bit addressed)
N9:123/5 (bit addressed)
N11:123 (integer addressed)
Floating Points area
F8:0 (fp addressed)
F11:123 (fp addressed)
4.2 SLC 500 Datatype Addressing
4.2.1 Digital Inputs
Example Inputs addressing (octal)
I:0/0
I:32/7
I:32/10
I:32/17
Note the (very annoying) addition of the colon!
Invalid Input addressing
I0/0 (yes this is allowed on the PLC 5!)
I32/7
I32/10
I32/17
I8/0
I9/0
I7/8
I0/9
I3/18
And yes, it is extremely annoying that it's incompatible with the PLC 5 series!
4.2.2 Digital Outputs
Example Outputs addressing (octal)
O:0/0
O:32/7
O:32/10
O:32/17
More colons!
Invalid Output addressing
O8/0
O9/0
O7/8
O0/9
O3/18
O0/0
OI32/7
OI32/10
O32/17
4.2.3 Digital bits (Both PLC5 and SLC 500)
Example Bit Addressing:
B3:0/0 B3/0
B3:1/0 B3/16
B3:2/0 B3/32
B3:3/0 B3/48
Invalid Bit Addressing:
B3:0/16
B3:1/16
4.2.4 Timers (both PLCs)
Example Timer Addressing
T4:0.PRE (preset value integer)
T4:0.ACC (current (accumulated) value integer)
T4:100/dn (expired bit)
T4:123/en (enabled bit)
T4:99/tt (enabled but not expired bit)
4.2.5 Counters (both PLCs)
Example Counter Addressing
C5:0.PRE (preset value integer)
C5:0.ACC (current (accumulated) value integer)
C5:10/dn (Counter expired bit)
4.2.6 Other Addressing (both PLCs)
System Area Addressing
R6:0 (more details in advanced course)
Integer area
N7:0 (integer addressed)
N7:0/5 (bit addressed)
N9:123/5 (bit addressed)
N11:123 (integer addressed)
Floating Point area
F8:0 (fp addressed)
F11:123 (fp addressed)
4.3 PLC 5 Datatype limitations
There are some (but not many, compared to other PLCs) limitations on datatypes.
You can have one type of memory per block (ie you can have N9:0 but then cannot have B9:0, or vice versa).
The maximum data word number is generally limited to 1000 words per block, ie you can have N7:0 to N7:999 (100 words) but not N7:1000.
You can only create or delete data memory offline OR when the PLC is stopped (this is a real pain!).
SLC 500 Datatype limitations
The maximum data word number is limited to 256 words per block, ie you can have N7:0 to N7:255 (256 words) but not N7:256.
4.4 Useful System PLC5 Memory Areas
|
Address |
Description |
|
S:018 |
Real time clock (Year) |
|
S:019 |
Real time clock (Month) |
|
S:020 |
Real time clock (Day) |
|
S:021 |
Real time clock (Hour) |
|
S:022 |
Real time clock (Minutes) |
|
S:023 |
Real time clock (Seconds) |
4.5 Useful System SLC 500 Memory Areas
|
Address |
Description |
|
S:39 |
Real time clock (Year) |
|
S:38 |
Real time clock (Month) |
|
S:37 |
Real time clock (Day) |
|
S:40 |
Real time clock (Hour) |
|
S:41 |
Real time clock (Minutes) |
|
S:42 |
Real time clock (Seconds) |
Section 5 Using the Programming Software
5.1 Introduction
This section details a few of the most common editing facilities in the programming software.
5.2 Creating a New Program
This is the first step in setting up a PLC (as far as Software is concerned).
|
Step |
Description |
|
1 |
(From the Main Menu) Offline Configr F4 |
|
2 |
Enter a Filename (eg JACOBS) and press ENTER |
|
It should ask you to confirm a "NEW archive file" |
|
|
3 |
You now have to enter the PLC type and revision and so on. Check these against the PLC you have. |
|
4 |
You will now have the basic file layout (page 6) |
|
5 |
Ensure you are on File 2 (Ladder) and press Monitor File F8 |
|
6 |
Now go to EDIT (F10) and insert a rung (F4) then insert an instruction (F4) |
5.3 Initiating a new PLC
Often, when first programming a PLC, the memory will be corrupted. In this case you must delete the PLC memory as follows:
|
Step |
Description |
|
1 |
Clear Major Faults (Section 8) |
|
2 |
Clear Minor Faults (Section 8) |
|
3 |
Restore a Program (Section 17) |
5.4 Creating/Editing a Ladder internal File
This allows you to create a new subroutine or block of software. To create a file do the following:
|
Step |
Description |
|
1 |
From the Program Directory (section 6) |
|
2 |
F1 Proc Functions |
|
3 |
F6 Create Lad Fl |
|
4 |
Enter the number (use low numbers to save memory) and press enter |
|
5 |
The ladder file should now appear |
5.5 Adding a Ladder rung
To add a new rung
|
Step |
Description |
|
1 |
Press F10 Edit |
|
2 |
Press F3 to append OR F4 to insert (note F3 will continue to append rungs) |
5.6 Copying a rung from another rung
You can copy a rung only offline or when the PLC is stopped.
|
1 |
F10 Edit |
|
2 |
F8 Advanced Editing |
|
3 |
F1 to select the area to copy |
|
4 |
F3 to COPY the area |
|
5 |
Move to the area you want the copied rungs to go to |
|
6 |
F4 Paste |
5.7 Deleting a Segment
|
Step |
Description |
|
1 |
F10 Edit |
|
2 |
Press F6 Delete Rung |
Note that offline this will happen immediately, online it will require the test cycle.
5.8 Data Monitor - To display data on-line
This enables you to see the data being set while the program is running. Note this is available when offline or on-line.
|
Step |
Description |
|
1 |
F8 Data Monitor |
|
2 |
F5 Specify Address |
|
3 |
Select data type |
Section 6 Simple PLC Editing
This is a very simple rung:
%Q BM1 Speed Bit %Q
%Q Control 16 %Q
%Q Line No5 %Q
%Q I:033 B114 %Q
%_────] [───────────────────────────────────────────────────────────────( )─────%b
%Q 04 52 %Q
To generate this rung do as follows:
|
1 |
F10 Edit |
|
2 |
F4 insert rung |
|
3 |
F4 insert instr(uction) |
|
4 |
F1 XIC (eXecute if Closed, ie if the signal is ON then rung is performed) |
|
5 |
Enter the address (I33/4 here) |
|
6 |
F3 OTE (output control) |
|
Enter the address (B114/52 here) |
|
|
7 |
Press Enter until you see F10 Accept |
|
8 |
F10 Accept |
|
9 |
If you are online you will have to perform the test/accept cycle |
Note that the text labels are configured via the "F5 Document" key.
Section 7 Searching
7.1 Overview
This powerful feature is very useful. SLC 500 searching similar but just that bit less user friendly.
7.2 Searching in ladder mode
This function applies equally to online and offline.
|
Step |
Description |
|
1 |
Press F6 Search |
7.2.1 PLC 5 Search screen
The following screen should appear
%T%P Search %P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W
%Q F1 Search Type : SEARCH INST/ADDR Search Scope : GLOBAL %Q
%Q Search Direction : DOWN Search Wrap : ON %Q
%Q Search For : %Q
%Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]
%Q I:000 B3 I:002 B3 %Q
%_──] [───] [───] [────────────────────────────────────────────────────────( )──%b
%Q 00 31 00 0 %Q
%Q %Q
%_────────────────────────────────[END OF FILE]─────────────────────────────────%b
%Q %Q
Press a function key for desired searching function or enter a search string.
(File 2: Rung 0)
Rem Prog Forces:None Edits:None 5/40 File JACOBS
Search Search Current Current Prev Instr Search Save
Type Instruc Operand String List Config Config
F1 F4 F5 F6 F7 F8 F9 F10
Check the information in bold type. This will stay the same after you change it, but if ti is wrong the search may not do what you want (ie you can search backwards, and also you can set it NOT to 'wrap' around when it gets to the bottom).
Enter what you want to search for and press F4 Search. Some examples of what you can search for:
|
You type |
it searches for: |
|
I0/0 |
first occurrence of input 0/0 |
|
xic q32/0 |
first occurrence of XIC q32/0 |
|
TON t4:0 |
TON instruction for timer T4:0 |
|
T4:0 |
first occurrence of timer 4:0 (ie TON, T4:0/dn etc.) |
|
B3:0 |
first occurrence of any bits B3/0 to B3/15 |
|
N7:0 |
first occurrence of N7:0 or any bits N7:0/0 to N7:0/15 |
|
AFI |
first occurrence of AFI instruction |
SLC 500 searches are not quite as flexible.
7.2.2 SLC 500 Search screen
The following screen should appear
%T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W
%Q F1 Search Type : SEARCH INST/ADDR F7 Scope : GLOBAL %Q
%Q F2 Search For : F8 Direction : DOWN %Q
%Q F9 Wrap : ON %Q
%Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]
%Q PLUSB PLUSB %Q
%Q I:1 I:1 %JSR───────────────% %Q
%_────]/[────────] [───────────────────────────────────────%$JUMP TO SUBROUTINE%─%b
%Q 160 160 %SBR file number 67% %Q
%Q (67:5) (67:5) %──────────────────% %Q
%Q STARTUP %Q
%Q %JSR───────────────% %Q
%_─────────────────────────────────────────────────────────%$JUMP TO SUBROUTINE%─%b
%Q %SBR file number 3% %Q
%Q %──────────────────% %Q
%Q %LES────────────────────% 2 %Q
%_─%$LESS THAN %─────────────────────────────────────────────(JMP)──%b
%Q %Source A STARTUPC.ACC% %Q
Press a function key
(file 2, rung 0)
offline no forces EDITS: NONE File 2819F1
SEARCH SEARCH START TOGGLE TOGGLE TOGGLE SAVE
TYPE FOR SEARCH SCOPE DIRECT WRAP CONFIG
F1 F2 F5 F7 F8 F9 F10
This is just that bit less friendly. to search, do the following:
|
Step |
Description |
|
1 |
Press F2 Search For |
|
2 |
Enter the reference to search for (as above) |
|
3 |
Press F5 Search |
Other minor differences in the way it interprets variables are also present - just check the variable entered in the cyan "Search for" title at the top of the screen!
7.3 Search Limitations
All searching online is (rather oddly) done in the PLC itself. Some limitations and bugs are present in the searches of some PLCs. Some PLCs will NOT allow you to search for bits with an instruction, ie:
You can search for XIC I0/0 but NOT just every occurrence of I0/0
The bigger (more expensive) PLCs are much better.
Sometimes (on some PLCs) the search will get to the wrong place - normally the right place is just to the right, and another search will find it!
7.4 Displaying Live Ladder Information
Unlike other PLCs this is shown always when you are online. It is a bit slow to update however.
Normally "green" indicates the current is flowing and white means it isn't. If you have a black and white screen then get a colour one. The software works very badly in mono.
7.5 Force Variables
This page is used to force inputs and outputs while the PLC is running. It is normally done to 'fix' bad signals but GREAT CARE MUST BE TAKEN not to force E-stops for example!
|
Step |
Description |
|
1 |
Press F9 Force |
|
3 |
Select inputs (F9) or outputs (F10) |
|
4 |
Type a '1' to force on or a '0' to force off |
|
5 |
PLC5:Press F6 Enable (F8 to confirm) SLC 500:Press F7 Enable (F8 to confirm) |
IMPORTANT NOTE:
Forced variables do NOT always appear to be forced in the ladder program - this can be very confusing!
To remove forces either :
PLC 5: F7 Disable (plus F8 to confirm)
SLC 500: F8 Disable (plus F8 to confirm)
or
F4 Remove All
Preferably BOTH!
Section 8 Processor Status and Clearing Faults
8.1 Clearing Major faults:
Major faults stop the PLC program (ie crash it!). Normally these require fault diagnostics and repair before resetting.
To clear processor faults on both PLC5 and SLC500:
|
Step |
Description |
|
1 |
F7 General utility |
|
2 |
F2 Processor Status |
This screen gives lots of information about the PLC, including the time and date.
8.1.1 PLC 5 status
Processor Status
Fault code: 0
Where faulted: 0:0
Major fault: 00000000 00000000
Minor fault 1: 00000000 00000000
2: 00000000 00000000
Processor status: 00000011 10001000 Mode switch in remote
27 20 17 10 7 0
I/O status btx full: 00000000 00000000 00000000
rack fault: 00000000 00000000 00000000
I/O control reset: 00000000 00000000 00000000
inhibit: 00000000 00000000 00000000
Arithmetic flags: S:0 Z:0 V:0 C:0
RTC date: 0000-00-00 RTC time: 00:00:00
Processor checksum: 0x0000 Indexed addressing offset: 0
EEPROM: TRANSFER ON BAD RAM Resident I/O chassis addr: 1-SLOT
Memory: UNPROTECTED Ram Backup: ENABLED
Press a function key, page up or page down, or enter a value.
S:12 = %
Rem Prog Forces:ENABLED 5/40 File JACOBS
Proc Clear Clear
Config Min Flt Maj Flt
F2 F9 F10
8.2 SLC 500 Processor Status
EXT PROCESSOR STATUS 00000010 00001000 REAL TIME CLOCK DATE: 07-25-1900
EXT MINOR FAULT 00000000 00000000 TIME: 03:21.09
DISCRETE INPUT INTERRUPT
SUBROUTINE FILE: 0 MASK: 00000000
INPUT SLOT: 0 COMPARE VALUE: 00000000
ENABLED: 1 PRESET: 0
EXECUTING: 0 RETURN MASK: 00000000
PENDING: 0 ACCUMULATOR: 0
OVERFLOW: 0 LAST SCAN [ms]: 0
LOST: 0 MAX. SCAN [ms]: 0
PROCESSOR OPERATING SYSTEM USER PROGRAM
CATALOG #: 541 CATALOG #: 401 FUNCTIONAL TYPE: 1025
SERIES: B SERIES: A FUNCTIONAL INDEX: 35
REVISION: 3 F.R.N.: 5
USER RAM SIZE: 16
FLASH EEPROM SIZE: 512
Press a key or enter value, press Alt-H for help
S:37 =
offline forces DISABLED formatted decimal addr File 2819F1
PAGE PAGE GLOBAL SPECIFY NEXT PREV
UP DOWN STATUS ADDRESS FILE FILE
F1 F2 F4 F5 F7 F8
Note that there are several other pages…..
8.3 Clearing Faults
As you see from both the above examples, the real time clock is completely wrong! Most of the PLCs are Millennium compatible (see appendix 2), but generally (apart from Jacob's 1D) the real time clock is not used.
To clear faults:
F10 Clear Major Fault
|
S:11/ |
Description |
|
0 |
Bad User Program File |
|
1 |
Illegal Operand Address |
|
2 |
Programming Error |
|
3 |
SFC Fault |
|
4 |
Program Assembly Error |
|
5 |
Powerup Protection Fault |
|
6 |
Channel 3 Device Fault |
|
7 |
User Generated Fault |
|
8 |
Watchdog Timer Fault |
|
9 |
Bad System Configuration |
|
10 |
Hardware Error |
|
11 |
MCP does not exist or is not ladder |
|
12 |
PII does not exist or is not ladder |
|
13 |
STI does not exist or is not ladder |
|
14 |
Bad Fault Program |
|
15 |
Non Ladder File |
Some Minor PLC 5 Faults are:
|
S10/9 |
no MCP was configured to run |
|
S10/6 |
Memory Cartridge battery low |
|
S10/1 |
DH+ Table Changed |
|
S10/0 |
Battery is bad or missing |
|
S17/9 |
Duplicate node address |
|
S17/7 |
Error not defined |
Some useful PLC 5 Processor Status bits are:
|
S1/8 |
Forces Enabled |
|
S1/9 |
Forces present |
|
S1/11 |
Performing online programming |
|
S1/15 |
1st scan of ladder program |
Section 9 Starting and Stopping the PLC
9.1 Starting the PLC
WARNING! Ensure personnel are not working on the line since devices may start!
To Start the PLC:
|
Step |
Description |
|
1 |
Press F1 Mode |
|
2 |
Select F3 Run Mode |
|
3 |
Confirm with F8 Yes |
9.2 Stopping the PLC
To Stop the PLC:
|
Step |
Description |
|
1 |
Press F1 Mode |
|
2 |
Select F1 Program Mode |
|
3 |
Confirm with F8 Yes |
Section 10 Timers
10.1 Timer Boxes
A timer in Ladder format looks like this:
Power on startup delay
%Q START %BM1 ON Validation %Q
%Q VALIDATION% On Time %Q
%Q delay %Q
%Q O:001 I:001 %TON───────────────% %Q
%_────] [────────] [──────────────────────────────────%$TIMER ON DELAY %─(EN)─%b
%Q 00 02 %Timer T4:10% %Q
%Q (4:6) (16:9) %Time base 0.01%─(DN) %Q
%Q %Preset 60% %Q
%Q %Accum 61% %Q
%Q %──────────────────% %Q
SLC 500 timers are the same:
Flavour Screw B eye delay off.
%Q T4:120 I:1 %TOF───────────────% %Q
%_────] [──────] [────────────────────────────────────%$TIMER OFF DELAY %─(EN)─%b
%Q DN 165 %Timer T4:20%─(DN) %Q
%Q (4:12) %Time Base 0.01% %Q
%Q %Preset 600% %Q
%Q %Accum 600% %Q
%Q %──────────────────% %Q
The Parameters are explained below:
|
Parameter |
Description |
|
left part of rung |
Timer Input Condition |
|
"Timer" |
Timer number (eg 10 in block T4 as above) |
|
Time Base |
number of seconds per 'preset, 0.01 seconds above |
|
Preset |
Timer preset value (in time base units, 0.6 seconds here) |
|
Accum |
Current timer value (in time base units 0.61 seconds here) |
|
EN |
Set if timer enabled |
|
DN |
Set if timer expired |
The DN bit is then used as follows:
UPPER STORAGE BELT START OUTPUT
Loading (T4:21 & T4:25)
OR
unloading (B3/24)
%Q Run DSB %Upper %Power On %LOWER %Upper UPPER %Q
%Q for this %Storage %Delay On %STORAGE %STORAGE STORAGE %Q
%Q long when %Belt %Timer %BELT. %BELT. ???? BELT %Q
%Q row from %loading % %MOTOR %MOTOR START %Q
%Q Station 6 %from Stn 6% %OVERLOAD %OVERLOAD %Q
%Q T4:21 T4:25 T4:10 I:004 I:004 O:001 %Q
%_─────] [────────] [───────] [────────] [────────] [──────────────────( )─────%b
%Q TT DN DN 14 15 05 %Q
%Q (7:2) (7:0) (4:7) %Q
10.2 Timer Presets
The timebase is normally 0.01 seconds or 1 second. Choose 1 second when accuracy is not important (since it is more obvious what the timer is doing)
10.3 Timer Types
Whereas some PLCs have lots of different timer types, Allen Bradley only has 2, but then, this is all you need.
To generate a pulse timer:
%Q I:000 %TON───────────────% %Q
%_──] [───────────────────────────────────────────────%$TIMER ON DELAY %─(EN)─%b
%Q 00 %Timer T4:0% %Q
%Q %Time base 1.0%─(DN) %Q
%Q %Preset 5% %Q
%Q %Accum 0% %Q
%Q %──────────────────% %Q
%Q T4:0 O:000 %Q
%_──] [────────────────────────────────────────────────────────────────────( )──%b
%Q TT 00 %Q
%Q (2:0) %Q
This timer ensures that the output will be on for five seconds after the input comes on, and then go off again, ie:
%─────────────────────────────────────────%
Input ───% %──────────
Timer Length <--------------->
%───────────────%
Timer Output ───% %────────────────────────────────────
If the input goes off before the timer expires, the timer output goes off;
%────%
Input ───% %───────────────────────────────────────────────
Timer Length <--------------->
%────%
Timer Output ───% %───────────────────────────────────────────────
A delay timer is done as follows:
%Q I:000 %TON───────────────% %Q
%_──] [───────────────────────────────────────────────%$TIMER ON DELAY %─(EN)─%b
%Q 00 %Timer T4:0% %Q
%Q %Time base 1.0%─(DN) %Q
%Q %Preset 5% %Q
%Q %Accum 0% %Q
%Q %──────────────────% %Q
%Q T4:0 O:000 %Q
%_──] [────────────────────────────────────────────────────────────────────( )──%b
%Q DN 00 %Q
A minor difference in ladder, but very different in action:
When the input is on, the timer counts and when it expires, the timer output is on until the input goes off.
%─────────────────────────────────────────%
Input ───% %──────────
Timer Length <--------------->
%─────────────────────────%
Timer Output ───────────────────%