SLC Examples Application Manual: 3150-MCM Example Ladder Logic
SLC Examples Application Manual: 3150-MCM Example Ladder Logic
3150-MCM
Example Ladder Logic
Revision 2.1
SLC Examples
Application Manual
Starting with one of the ladder logic programs provided on disk with the MCM complete the following steps:
If hand entering the ladder logic by hand for the SLC, remember the following:
- Configure the slot as a 1746-BAS module in 5/02 mode
- Be sure to enter the Transfer Enable and Done bits as shown in the
example logic
a) Edit the ladder logic provided on disk as needed for the application (See Section 3.0)
Verify rack and slot location in program
Modify ladder instruction addresses as needed
f) Make up the communication cables (See Section 8). Make sure that no matter what type of connection is being
made up that a jumper is in place to satisfy the CTS signal. Normally this signal will be jumpered to RTS.
h) Monitor the data table for the Master and Slave Error Status values (See Section 5.1)
http://www.prosoft-technology.com
Select ‘Web Site Index’
Select ‘MCM Connectivity Listing’
Select ‘Test Document’ for desired product
Revision Notes
2/23/00 Fix typo error in Expanded Slave register map
2
Example Ladder Logic / Test Tools
The only external tool necessary to allow Port 1 talk to Port 2 is a short cable with the following
configuration:
3150-MCM 3150-MCM
Port 1 Port 2
DB-9 Pin Male DB-9 Pin Male
TxD 3 3 TxD
RxD 2 2 RxD
RTS 7 RTS-CTS jumper must be 7 RTS
CTS installed for card CTS
8 8
to communicate
GND 5 5 GND
DTR 4 4 DTR
3
Slave Mode Example #1 w/ Pass-Thru
Port Configuration
PLC Addr Value
N[]:7 0 Input Data Start Address
N[]:17 - Function Codes 2 and 4
This configuration value determines the beginning address in the module from which
the host will begin reading when using Function Codes 2 and 4.
4
Slave Mode Example #1 w/ Pass-Thru
10 10 1 - 16
11 11 17 - 32
12 12 33 - 48
13 13 49 - 64
14 14 65 - 80
15 15 81 - 96
16 16 97 - 112
17 17 113 - 128
18 18 129 - 144
19 19 145 - 160
20 20 40001
21 21 40002
22 22 40003
23 23 40004
24 24 40005
25 25 40006
26 26 40007
27 27 40008
28 28 40009
29 29 40010
30 30 40011
31 31 40012
32 32 40013
33 33 40014
34 34 40015
35 35 40016
36 36 40017
37 37 40018
38 38 40019
39 39 40020
40 40 40021
41 41 40022
42 42 40023
43 43 40024
44 44 40025
45 45 40026
46 46 40027
47 47 40028
48 48 40029
49 49 40030
5
Slave Mode Example #1 w/ Pass-Thru
Address Data (Radix=BINARY) Address Data (Radix=BINARY) B11:10-19 are used to accept
B11:0 0000 0000 0000 0000 B11:11 0000 0000 0000 0000 FC 5 bit set/reset commands from
B11:1 0000 0000 0000 0000 B11:12 0000 0000 0000 0000 the host. The ladder logic takes
B11:2 0000 0000 0000 0000 B11:13 0000 0000 0000 0000 care in Rung 3:1 of moving the 10
B11:3 0000 0000 0000 0000 B11:14 0000 0000 0000 0000 word block back into the module.
B11:4 0000 0000 0000 0000 B11:15 0000 0000 0000 0000 NOTE that this block location and
B11:5 0000 0000 0000 0000 B11:16 0000 0000 0000 0000 length are user defined for the
B11:6 0000 0000 0000 0000 B11:17 0000 0000 0000 0000 application and can easily be
B11:7 0000 0000 0000 0000 B11:18 0000 0000 0000 0000 modified.
B11:8 0000 0000 0000 0000 B11:19 0000 0000 0000 0000
B11:9 0000 0000 0000 0000 B11:20 0000 0000 0000 0000
B11:10 0000 0000 0000 0000
6
Slave Mode Example #1 w/ Pass-Thru
7
Slave Mode Example #1 w/ Pass-Thru
Rung 3:2
| |
|-----------------------------------------------+END+----------------------------------------------|
| |
8
Slave Mode Example #1 w/ Pass-Thru
Rung 4:0
| DECODE ACCEPT |
| BT READ FC 6 |
| BLOCK ID WRITE |
| +EQU---------------+ +MOV---------------+ |
|-+EQUAL +-------------------------------+----------------------+MOVE +-+-|
| |Source A M1:1.0| | |Source M1:1.4| | |
| | *| | | *| | |
| |Source B 256| | |Dest N10:[M1:1.3]| | |
| | | | | 1| | |
| +------------------+ | +------------------+ | |
| The first branch will handle the | DECODE ACCEPT | |
| FC 6 writes from a host. FC 16 | ADDRESS FC 16 | |
| commands require more work in an | WRITE | |
| SLC application. To implement FC 16 | +EQU---------------+ +COP---------------+ | |
| commands, the programmer must know +-+EQUAL +-+COPY FILE +-+ |
| the register address and length of the |Source A M1:1.3| |Source #M1:1.4| |
| write, then must setup a branch of | *| |Dest #N10:21| |
| logic with an EQU test and a COP |Source B 21| |Length 10| |
| programmed to the needed length | | +------------------+ |
| +------------------+ |
Rung 4:1
| DECODE COPY ADDR |
| BT READ AND CMD |
| BLOCK ID TO WORK |
| REGS |
| +EQU---------------+ +COP---------------+ |
|-+EQUAL +-----------------------------------------+------------+COPY FILE +-+-|
| |Source A M1:1.0| | |Source #M1:1.2| | |
| | *| | |Dest #N7:52| | |
| |Source B 258| | |Length 2| | |
| | | | +------------------+ | |
| +------------------+ | | |
| | DECODE EXECUTE | |
| FC 5 handler logic. The first branch | FC 5 BIT SET/RESET | |
| copies the write data to an intermediate | SET/RESET | |
| work register, and the following two branches | N7:53 B11 | |
| take care of latching/unlatching the addressed +----] [--------(L)---------------+ |
| bit as commanded | 0 [N7:52] | |
| | DECODE EXECUTE | |
| | FC 5 BIT SET/RESET | |
| | SET/RESET | |
| | N7:53 B11 | |
| +----]/[--------(U)---------------+ |
| 0 [N7:52] |
Rung 4:2
| |
|-----------------------------------------------+END+----------------------------------------------|
|
9
Slave Mode Example 2 w/ Large Pass-Thru Application
Port Configuration
PLC Addr Value
N[]:7 0 Input Data Start Address
N[]:17 - Function Codes 2 and 4
This configuration value determines the beginning address in the module from which
the host will begin reading when using Function Codes 2 and 4.
System Configuration
N[]:20 1 Read Block Count
As a minimum in a slave application we would like to bring back one block which will
contain the Slave Error Table ( a set of counters and status registers indicating the port
status). This is a 20 word block which we will locate at register 200 in our example.
10
Slave Mode Example 2 w/ Large Pass-Thru Application
up to up to
40 40 1 - 16
41 41 17 - 32
42 42 33 - 48
43 43 49 - 64
44 44 65 - 80
up to up to
68 68 449 - 464
69 69 465 - 480
70 70 40001
71 71 40002
72 72 40003
73 73 40004
74 74 40005
75 75 40006
76 76 40007
77 77 40008
78 78 40009
79 79 40010
80 80 40011
81 81 40012
11
Slave Mode Example 2 w/ Large Pass-Thru Application
Address Data (Radix=BINARY) Address Data (Radix=BINARY) B11:40-69 are used to accept
B11:40 0000 0000 0000 0000 B11:51 0000 0000 0000 0000 FC 5 bit set/reset commands from
B11:41 0000 0000 0000 0000 B11:52 0000 0000 0000 0000 the host. The ladder logic takes
B11:42 0000 0000 0000 0000 B11:53 0000 0000 0000 0000 care in Rung 3:1 of moving the 30
B11:43 0000 0000 0000 0000 B11:54 0000 0000 0000 0000 word block back into the module.
B11:44 0000 0000 0000 0000 B11:55 0000 0000 0000 0000 NOTE that this block location and
B11:45 0000 0000 0000 0000 B11:56 0000 0000 0000 0000 length are user defined for the
B11:46 0000 0000 0000 0000 B11:57 0000 0000 0000 0000 application and can easily be
B11:47 0000 0000 0000 0000 B11:58 0000 0000 0000 0000 modified.
B11:48 0000 0000 0000 0000 B11:59 0000 0000 0000 0000
B11:49 0000 0000 0000 0000 up to
B11:50 0000 0000 0000 0000 B11:69 0000 0000 0000 0000
12
Slave Mode Example 2 w/ Large Pass-Thru Application
Rung 3:0
READ DATA FROM MODULE AND DECODE
If the BT Read Block ID is 1, then transfer the module's registers 50-99 into
the data table starting at N10:50. To add additional data blocks, add new
branches of decode logic.
| TRANSFER |TRANSFER TEST IF PASS-THRU |
| ENABLE |DONE PASS THRU MODE |
| (required)|(required) COMMAND HANDLER |
| I:1 O:1 +GEQ---------------+ +JSR---------------+ |
|----] [--------]/[-------------------------------------------------+-+GRTR THAN OR EQUAL+-+JUMP TO SUBROUTINE+-+-|
| 0 0 | |Source A M1:1.0| |SBR file number 4| | |
| | | *| +------------------+ | |
| Test if the data received in the M1 | |Source B 256| | |
| file from the module is a pass-through | | | | |
| command and if so then call SBR 4 | +------------------+ | |
| | DECODE READ DATA | |
| | BT READ FROM | |
| | BLOCK ID MODULE | |
| Transfer the data registers 200 to 249 (50 words) | +EQU---------------+ +COP---------------+ | |
| from the module to the N10 file whenever the BTR +-+EQUAL +-+COPY FILE +-+ |
| Block ID is 4. This block is brought into the | |Source A M1:1.0| |Source #M1:1.2| | |
| data table to gain access to the Slave Error Table | | *| |Dest #N10:200| | |
| | |Source B 4| |Length 50| | |
| | | | +------------------+ | |
| | +------------------+ | |
| | ENCODES | |
| | BT WRITE | |
| Transfer the BTW Block ID value from the read | BLOCK ID | |
| buffer (word 1) into the write buffer (word 0) | +MOV---------------+ | |
| to setup the BTW cycle +----------------------+MOVE +-+ |
| | |Source M1:1.1| | |
| | | *| | |
| | |Dest M0:1.0| | |
| | | *| | |
| | +------------------+ | |
| | USER CFG ENCODES | |
| Test if the User wants to re-configure | DOWNLOAD BT WRITE | |
| the module and if so then put a 255 into the | SELECT BLOCK ID | |
| BTW Block ID position | B3 +MOV---------------+ | |
| +----] [---------------+MOVE +-+ |
| 0 |Source 255| |
| | | |
| |Dest M0:1.0| |
| | *| |
| +------------------+ |
13
Slave Mode Example 2 w/ Large Pass-Thru Application
Rung 3:2
| |
|-------------------------------------------------------+END+-----------------------------------------------------|
| |
14
Slave Mode Example 2 w/ Large Pass-Thru Application
Rung 4:0
| DECODE ACCEPT |
| BT READ FC 6 |
| BLOCK ID WRITE |
| +EQU---------------+ +MOV---------------+ |
|-+EQUAL +-------------------------------+----------------------+MOVE +-+-|
| |Source A M1:1.0| | |Source M1:1.4| | |
| | *| | | *| | |
| |Source B 256| | |Dest N10:[M1:1.3]| | |
| | | | | 1| | |
| +------------------+ | +------------------+ | |
| The first branch will handle the | DECODE ACCEPT | |
| FC 6 writes from a host. FC 16 | ADDRESS FC 16 | |
| commands require more work in an | WRITE | |
| SLC application. To implement FC 16 | +EQU---------------+ +COP---------------+ | |
| commands, the programmer must know +-+EQUAL +-+COPY FILE +-+ |
| the register address and length of the |Source A M1:1.3| |Source #M1:1.4| |
| write, then must setup a branch of | *| |Dest #N10:21| |
| logic with an EQU test and a COP |Source B 21| |Length 10| |
| programmed to the needed length | | +------------------+ |
| +------------------+ |
Rung 4:1
| DECODE COPY ADDR |
| BT READ AND CMD |
| BLOCK ID TO WORK |
| REGS |
| +EQU---------------+ +COP---------------+ |
|-+EQUAL +-----------------------------------------+------------+COPY FILE +-+-|
| |Source A M1:1.0| | |Source #M1:1.2| | |
| | *| | |Dest #N7:52| | |
| |Source B 258| | |Length 2| | |
| | | | +------------------+ | |
| +------------------+ | | |
| | DECODE EXECUTE | |
| FC 5 handler logic. The first branch | FC 5 BIT SET/RESET | |
| copies the write data to an intermediate | SET/RESET | |
| work register, and the following two branches | N7:53 B11 | |
| take care of latching/unlatching the addressed +----] [--------(L)---------------+ |
| bit as commanded | 0 [N7:52] | |
| | DECODE EXECUTE | |
| | FC 5 BIT SET/RESET | |
| | SET/RESET | |
| | N7:53 B11 | |
| +----]/[--------(U)---------------+ |
| 0 [N7:52] |
Rung 4:2
| |
|-----------------------------------------------+END+----------------------------------------------|
|
15
Master Mode Example #1 – Basic Application
Assumptions
- Read 200 words from Module (values from slaves and Master Error Table)
- Write 50 words to module (for writing to slaves)
System Configuration
N[]:20 4 Read Block Count
This value represents the total number of 50 word data blocks that we want
to read back from the module into the PLC/SLC data table. In this application
we have setup to read back registers 0 to 199.
N[]:23 130 Slave Table Ptr Location Slave Error Table in Module's memory space. In a Master application we still
would like to bring back this table in order to have the module firmware revision
information
16
Master Mode Example #1 – Basic Application
Address 0 1 2 3 4 5 6 7 8 9
N7:0 0 0 5 0 0 0 0 0 0 0 Port 1 Config
N7:10 1 1 5 0 0 0 0 0 0 0 Port 2 Config
N7:20 4 1 2 130 150 0 0 0 4 0 System Config
N7:30 0 0 0 0 0 0 0 0 0 0 Route Table
N7:40 0 0 0 0 0 0 0 0 0 0
Command List
N7:50 1 1 3 200 10 0 0 0 0 0 Command #1
N7:60 1 1 3 210 10 10 0 0 0 0 Command #2
N7:70 1 1 4 220 10 20 0 0 0 0 Command #3
N7:80 1 1 3 200 10 30 0 0 0 0 Command #4
N7:90 1 1 16 200 40 40 0 0 0 0 Command #5
N7:100 0 0 0 0 0 0 0 0 0 0 Command #6
N7:110 0 0 0 0 0 0 0 0 0 0 Command #7
N7:120 0 0 0 0 0 0 0 0 0 0 Command #8
N7:130 0 0 0 0 0 0 0 0 0 0 Command #9
N7:140 0 0 0 0 0 0 0 0 0 0 Command #10
Address 0 1 2 3 4 5 6 7 8 9
N10:0 200 201 202 203 0 0 0 0 0 0 Read Data Block
N10:10 210 211 212 213 0 0 0 0 0 0 from Module
N10:20 220 221 222 223 0 0 0 0 0 0 Reg 0 to 199
N10:30 200 201 202 203 0 0 0 0 0 0
N10:40 200 201 202 203 0 0 0 0 0 0
N10:50 210 211 212 213 0 0 0 0 0 0
N10:60 220 221 222 223 0 0 0 0 0 0
N10:70 200 201 202 203 0 0 0 0 0 0
N10:80 0 0 0 0 0 0 0 0 0 0
N10:90 0 0 0 0 0 0 0 0 0 0
N10:100 0 0 0 0 0 0 0 0 0 0
N10:110 0 0 0 0 0 0 0 0 0 0
N10:120 0 0 0 0 0 0 0 0 0 0
17
Master Mode Example #1 – Basic Application
18
Master Mode Example #1 – Basic Application
Rung 3:1
WRITE DATA, COMMAND LIST OR CONFIGURATION BLOCK TO MODULE
Based on the value in the BTW Block ID, either the data or the command list is
moved to the module, or configuration parameters are moved to the module. To
move additional data, add new branches
| TRANSFER TRANSFER DECODES TRANSFER |
| ENABLE DONE BT WRITE TO MODULE |
| (required) (required) BLOCK ID |
| I:1 O:1 +EQU---------------+ +COP---------------+ |
|----] [------------------+----]/[-----+-+EQUAL +------------------------+COPY FILE +-+----------+-|
| 0 | 0 | |Source A M0:1.0| |Source #N10:200| | | |
| Move the data for the module | | *| |Dest #M0:1.1| | | |
| addresses 200 to 249. In a | |Source B 4| |Length 50| | | |
| Master application, these | | | +------------------+ | | |
| register locations will be used +------------------+ | | |
| to write values to the slaves.| DECODES TRANSFER | | |
| | | BT WRITE TO MODULE | | |
| | | BLOCK ID | | |
| | | +EQU---------------+ +COP---------------+ | | |
| Command List | +-+EQUAL +------------------------+COPY FILE +-+ | |
| Block IDs 80 and 81 (through | |Source A M0:1.0| |Source #N7:50| | | |
| 99) are used to transfer the | | *| |Dest #M0:1.1| | | |
| Command List to the module. | |Source B 80| |Length 50| | | |
| Each ‘block’ moves 5 commands | | | +------------------+ | | |
| to the module. | | +------------------+ | | |
| | | DECODES TRANSFER | | |
| | | BT WRITE TO MODULE | | |
| | | BLOCK ID | | |
| | | +EQU---------------+ +COP---------------+ | | |
| | +-+EQUAL +------------------------+COPY FILE +-+ | |
| | | |Source A M0:1.0| |Source #N7:100| | | |
| | | | *| |Dest #M0:1.1| | | |
| | | |Source B 81| |Length 50| | | |
| | | | | +------------------+ | | |
| | | +------------------+ | | |
| | | DECODES TRANSFER | | |
| | | BT WRITE TO MODULE | | |
| | | BLOCK ID | | |
| | | +EQU---------------+ +COP---------------+ | | |
| Configuration of the module +-+EQUAL +-+-+COPY FILE +-+--------------------+ | |
| | |Source A M0:1.0| | |Source #N7:0| | | |
| | | *| | |Dest #M0:1.1| | | |
| | |Source B 255| | |Length 40| | | |
| | | | | +------------------+ | | |
| | +------------------+ | | | |
| | | USER CFG | | |
| | | DOWNLOAD | | |
| | | SELECT | | |
| | | B3 | | |
| | +----(U)---------------+ | |
| | 0 | |
| | TRANSFER | |
| | DONE | |
| | (required) | |
| | | |
| | O:1 | |
| +----------------------------------------------------------------------------------( )-----+ |
| 0 |
Rung 3:2
| |
|---------------------------------------------------------+END+--------------------------------------------------------|
| |
19
Master Mode Example #2 w/ Command Control
Assumptions
- Read 200 words from Module (values from slaves and Master Error Table)
- Write 50 words to module (for writing to slaves)
System Configuration
N[]:20 4 Read Block Count
This value represents the total number of 50 word data blocks that we want
to read back from the module into the PLC/SLC data table. In this application
we have setup to read back registers 0 to 199.
N[]:23 130 Slave Table Ptr Location Slave Error Table in Module's memory space. In a Master application we still
would like to bring back this table in order to have the module firmware revision
information
20
Master Mode Example #2 w/ Command Control
Address 0 1 2 3 4 5 6 7 8 9
N7:0 0 0 5 0 0 0 0 0 0 0 Port 1 Config
N7:10 1 1 5 0 0 0 0 0 0 0 Port 2 Config
N7:20 4 1 2 130 150 0 0 0 4 0 System Config
N7:30 0 0 0 0 0 0 0 0 0 0 Route Table
N7:40 0 0 0 0 0 0 0 0 0 0
Command List
N7:50 9 1 3 200 10 0 0 0 0 0 Command #1
N7:60 9 1 3 210 10 10 0 0 0 0 Command #2
N7:70 9 1 4 220 10 20 0 0 0 0 Command #3
N7:80 1 1 3 200 10 30 0 0 0 0 Command #4
N7:90 1 1 16 200 40 40 0 0 0 0 Command #5
N7:100 0 0 0 0 0 0 0 0 0 0 Command #6
N7:110 0 0 0 0 0 0 0 0 0 0 Command #7
N7:120 0 0 0 0 0 0 0 0 0 0 Command #8
N7:130 0 0 0 0 0 0 0 0 0 0 Command #9
N7:140 0 0 0 0 0 0 0 0 0 0 Command #10
Address Data (Radix=BINARY) Address Data (Radix=BINARY) B9 is used for Command Control.
B9:0 0000 0000 0000 0000 B9:11 0000 0000 0000 0000 Words 0 to 5 : Command Enable
B9:1 0000 0000 0000 0000 B9:12 0000 0000 0000 0000 Words 6 to 11: Command Done
B9:2 0000 0000 0000 0000 B9:13 0000 0000 0000 0000 Words 12 to 17:Command Error
B9:3 0000 0000 0000 0000 B9:14 0000 0000 0000 0000
B9:4 0000 0000 0000 0000 B9:15 0000 0000 0000 0000
B9:5 0000 0000 0000 0000 B9:16 0000 0000 0000 0000
B9:6 0000 0000 0000 0000 B9:17 0000 0000 0000 0000
B9:7 0000 0000 0000 0000 B9:18 0000 0000 0000 0000
B9:8 0000 0000 0000 0000
B9:9 0000 0000 0000 0000
B9:10 0000 0000 0000 0000
Address 0 1 2 3 4 5 6 7 8 9
N10:0 200 201 202 203 0 0 0 0 0 0 Read Data Block
N10:10 210 211 212 213 0 0 0 0 0 0 from Module
N10:20 220 221 222 223 0 0 0 0 0 0 Reg 0 to 199
N10:30 200 201 202 203 0 0 0 0 0 0
N10:40 200 201 202 203 0 0 0 0 0 0
N10:50 210 211 212 213 0 0 0 0 0 0
N10:60 220 221 222 223 0 0 0 0 0 0
N10:70 200 201 202 203 0 0 0 0 0 0
N10:80 0 0 0 0 0 0 0 0 0 0
N10:90 0 0 0 0 0 0 0 0 0 0
N10:100 0 0 0 0 0 0 0 0 0 0
N10:110 0 0 0 0 0 0 0 0 0 0
N10:120 0 0 0 0 0 0 0 0 0 0
21
Master Mode Example #2 w/ Command Control
Rung 3:0
| TRANSFER |TRANSFER TEST IF A CALCULATE |
| ENABLE |DONE DATA BLOCK INDIRECT |
| (required)|(required) OFFSET |
| I:1 O:1 +LES---------------+ +CPT---------------+ |
|----] [--------]/[-----------+-+LESS THAN +-+-+COMPUTE +-+--------------------+-|
| 0 0 | |Source A M1:1.0| | |Dest N7:40| | | |
| | | *| | | 1| | | |
| Decode the BTR Block ID| |Source B N7:20| | |Expression | | | |
| numbers which will be | | 4| | |M1:1.0 * 50 | | | |
| returned from the module +------------------+ | +------------------+ | | |
| and copy the data buffer | COPY DATA | | |
| into the data table. This | FROM | | |
| method of indirect addressing | MODULE | | |
| is more efficient than the branched | +COP---------------+ | | |
| method used in Master Example #1 +-+COPY FILE +-+ | |
| | |Source #M1:1.2| | |
| | |Dest #N10:[N7:40]| | |
| | |Length 50| | |
| | +------------------+ | |
| | ENCODES | |
| | BLOCK | |
| Transfer the BTW Block ID +MOV---------------+ | |
| value from the read buffer ------------------------------------------+MOVE +-+ |
| (word 1) to the write buffer |Source M1:1.1| | |
| (word 0) to setup the BTW cycle | *| | |
| | |Dest M0:1.0| | |
| | | *| | |
| | +------------------+ | |
| | USER CFG ENCODES | |
| | DOWNLOAD BLOCK | |
| | SELECT | |
| Test if the User wants| B3 +MOV---------------+ | |
| to re-configure the +----] [--------------------------------------+MOVE +-+ |
| module, and if so then 0 |Source 255| |
| place a 255 into the BTW | | |
| Block ID position. |Dest M0:1.0| |
| | *| |
| +------------------+ |
Rung 3:1
COMMAND CONTROL MODE (DELETE IF NOT USING COMMAND CONTROL MODE)
If the BTR Block ID value is not that of a pass-thru command, then the CMD_EN
and CMD_DONE/ERR bits are copied and the subroutine to manipulate the bits is
called.
| TRANSFER |TRANSFER TEST IF A COPY |
| ENABLE |DONE DATA BLOCK CMD_DN |
| (required)|(required) CMD_ERR |
| STATUS |
| I:1 O:1 +LES---------------+ +COP---------------+ |
|----] [--------]/[-----+LESS THAN +------------------------------+-+COPY FILE +-+-|
| 0 0 |Source A M1:1.0| | |Source #M1:1.52| | |
| | *| | |Dest #B9:6| | |
| |Source B 256| | |Length 12| | |
| | | | +------------------+ | |
| +------------------+ | | |
| | COMMAND | |
| | CONTROL | |
| | MODE | |
| The rung handles the logic for the | HANDLER | |
| Command Control Mode. The first branch | +JSR---------------+ | |
| copies the Done and Error status bits, which +-+JUMP TO SUBROUTINE+-+ |
| are being returned from the module, into a working | |SBR file number 4| | |
| file. The SBR 4 processes the Done and Error bits | +------------------+ | |
| for the commands which are in the Command Control Mode | COPY | |
| and clears the Enable bits if appropriate. | CMD_EN | |
| The last branch transfers up the Enable bits. | BITS | |
| | +COP---------------+ | |
| +-+COPY FILE +-+ |
| |Source #B9:0| |
| |Dest #M0:1.51| |
| |Length 6| |
| +------------------+ |
22
Master Mode Example #2 w/ Command Control
Rung 3:3
| |
|----------------------------------------------------+END+---------------------------------------------------|
| |
23
Master Mode Example #2 w/ Command Control
Rung 4:0
COMMAND CONTROL EXAMPLE LOGIC (DELETE IF NOT USING COMMAND CONTROL MODE)
The following rungs of logic control the unlatching of hte Command Enable bits
when the command is done successfully.
| LOGIC CMD EN BIT |
| CMD ENABLE CMD 1 |
| CMD 1 |
| B3 B9 |
|-----------------------------------------------------------+----] [---------------------(L)-----+-|
| | 16 0 | |
| | CMD DN BIT CMD EN BIT | |
| | CMD 1 CMD 1 | |
| This logic, typical for any Control | B9 B9 | |
| Enabled command, takes the logical enable +----] [-----+----(U)-----+----------+ |
| which would be provided by application 96 | 0 | |
| ladder (B3/16) and latches the Enable. | LOGIC | |
| When the Done bit is received, the enables | CMD ENABLE | |
| are cleared. NOTE THAT THE ENABLE IS ONE SHOT | CMD 1 | |
| IN THE MODULE. THE MODULE MUST SEE A TRANSITION | B3 | |
| FROM 1 to 0 BEFORE IT WILL RE-ENABLE A COMMAND. +----(U)-----+ |
| 16 |
Rung 4:1
| LOGIC CMD EN BIT |
| CMD ENABLE CMD 2 |
| CMD 2 |
| B3 B9 |
|-----------------------------------------------------------+----] [---------------------(L)-----+-|
| | 17 1 | |
| | CMD DN BIT CMD EN BIT | |
| | CMD 2 CMD 2 | |
| | B9 B9 | |
| +----] [-----+----(U)-----+----------+ |
| 97 | 1 | |
| | LOGIC | |
| | CMD ENABLE | |
| | CMD 2 | |
| | B3 | |
| +----(U)-----+ |
| 17 |
Rung 4:2
| LOGIC CMD EN BIT |
| CMD ENABLE CMD 3 |
| CMD 3 |
| B3 B9 |
|-----------------------------------------------------------+----] [---------------------(L)-----+-|
| | 18 2 | |
| | CMD DN BIT CMD EN BIT | |
| | CMD 3 CMD 3 | |
| | B9 B9 | |
| +----] [-----+----(U)-----+----------+ |
| 98 | 2 | |
| | LOGIC | |
| | CMD ENABLE | |
| | CMD 3 | |
| | B3 | |
| +----(U)-----+ |
| 18 |
Rung 4:3
| |
|-----------------------------------------------+END+----------------------------------------------|
24