The text of a manual · part 17 of 20
DH-485/RS-232C Interface Module, Catalog Number 1747-KE, User Manual: B - PLC-5 to SLC 500 Communications
Pages 121 to 124 of 139, from DH-485/RS-232C Interface Module, Catalog Number 1747-KE, User Manual
The original document is the PDF (1.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Allen-Bradley 1747-AIC DH-485
Page 121
Appendix
B
PLC-5 to SLC 500 Communications
This appendix details how to use the PLC-5 Message instruction to access an SLC 500 processor. This method uses PLC-2 Unprotected Reads and Unprotected Writes to access the Common Interface File, CIF, File 9 of an SLC processor.
Overview
PLC-2 Unprotected Reads and Writes are not really implemented as unprotected in the SLC processor. They are subject to the SLC’s file protection schemes. For instance, they will be rejected if a download is in process or the CIF file is already open by another device. These types of read and write commands are somewhat universal in that they are implemented in many other Allen-Bradley Programmable Controllers. IMPORTANT
Although the format of the Unprotected Reads and Writes is the same as used in other PLC processors, the implementation of the address parameter is different. In Allen-Bradley’s PLC products, the address is interpreted as a byte address. In some SLC 500 products, the address is interpreted as a word address.
• The SLC 500 and 5/01 processors use word addressing exclusively • The SLC 5/02, prior to Series C FRN 3 processor, also use word addressing exclusively • The SLC 5/02 Series B, FRN 3 processor and above have a selection bit, S:2/8, which allows selection of either word or byte addressing • The DTAM for the SLC processors use word addressing exclusively The CIF is actually like any of the other SLC data files except that it is designated as the target file for all PLC-2 Unprotected Read and Unprotected Write commands that are received by the SLC. It is always File 9. The CIF can be defined as bit, integer, timer, counter, or control data types. However, only bit or integer files should be used to make addressing easier.
1
Publication 1747-UM005B-EN-P - March 2006
Page 122
B-2
PLC-5 to SLC 500 Communications
IMPORTANT
File 9 must be created and defined at the time that the SLC processor is programmed. File 9 must also be made large enough to include the unprotected read and write addressing space. Otherwise, all unprotected reads and unprotected writes will be rejected by the SLC processor.
PLC-5 Message Instruction
When using the PLC-5 Message instruction, the Destination Address is entered in octal. The PLC-5 processor automatically translates the octal address to a byte address by doubling the decimal equivalent. Therefore, 010 (base 8) becomes 16 (base 10) and 177 (base 8) becomes 254 (base 10). The PLC-5 Message instruction does not allow an octal address less than 010 (base 8) to be entered.
Use the SLC 500 CIF File
In application, the CIF can be thought of as a data buffer between all the other SLC data files and the DH-485 port. The SLC processor must be programmed, using ladder logic, to transfer data between the CIF and the other data files as shown here. SLC 500 CIF File
SLC 500 Processor SLC Ladder Program
Data Files 0 through 8
DH-485 Unprotected Read
CIF (File 9)
Unprotected Write
10 through 255
The CIF can be managed by designating areas to be written to and areas to be read from. If it is desired to know when data has changed in the CIF, use ladder logic to program handshaking bits in your CIF data.
Publication 1747-UM005B-EN-P - March 2006
Page 123
PLC-5 to SLC 500 Communications
Use the PLC-5 Message Instruction with Word
B-3
The PLC-5 Message instruction’s octal Destination Address must be between 010 (base 8) and 177 (base 8). This range corresponds to word 16 (base 10) through word 254 (base 10) in the SLC processor. Only even numbered words (16, 18, 20,... 254) in the SLC processor can be addressed by the PLC-5 Message instruction. The maximum value for the PLC-5 Message instruction Size in Elements parameter is 112 when the destination is an SLC processor (assuming 1 word elements). For example, write 10 words from N7 in a PLC-5 to an SLC 5/02 using the PLC-5’s Message instruction. To write 10 words: 1. Set up the source address in the Message instruction as N7:0. 2. Set the Size in Elements to 10. 3. Set up the Command Type as PLC-2 Unprotected Write. 4. Set up the Destination Address as 010 (base 8). This corresponds to the SLC address, N9:16. Since 10 words will be written, make sure that the N9 file in the SLC processor is created to at least N9:25. It is assumed that the Message instruction will be set up for a remote destination, since there must be a bridge between the PLC-5 processor and the SLC 5/02 processor, such as a 1784-KA5 linking a DH+ and the DH-485 network. The 1747-KE module can be used as a bridge between the DF1 and DH-485 network.
Publication 1747-UM005B-EN-P - March 2006
Page 124
B-4
PLC-5 to SLC 500 Communications
Use the PLC-5 Message Instruction with Byte IMPORTANT
The byte addressing mode is selected in the SLC processor by setting bit S:2/8 to 1. (The default is S:2/8 = 0 for word addressing.)This selection bit is only available in the SLC 5/02 Series B, FRN 3 processor or later.
The PLC-5 Message instruction’s octal Destination Address must be between 010 (base 8) and 377 (base 8). This range corresponds to byte 16 (base 10) through byte 510 (base 10). This allows odd and even words in the SLC processor to be addressed by the PLC-5 Message instruction. Destination Address Byte Word
SLC Processor Address
16
8
N9:8
18
9
N9:9
20
10
N9:10
...
...
...
510
255
N9:255
The maximum value for the PLC-5 Message instruction Size in Elements parameter is 41 when the destination is an SLC processor (assuming 1 word elements). For example, write 10 words from N7 in a PLC-5 to an SLC 5/02 using the PLC-5’s processor Message instruction. To write 10 words: 1. Set up the source address in the Message instruction as N7:0. 2. Set the Size in Elements to 10. 3. Set up the Command Type as PLC-2 Unprotected Write. 4. Set up the Destination Address as 010 (base 8). This corresponds to the SLC address, N9:8. Since 10 words will be written, make sure that the N9 file in the SLC processor is created to at least N9:17. It is assumed that the Message instruction will be set up for a remote destination, since there must be a bridge between the PLC-5 processor and the SLC 5/02 processor, such as a 1784-KA5 linking a DH+ and the DH-485 network. The 1747-KE module can be used as a bridge between the DF1 and DH-485 network.
Publication 1747-UM005B-EN-P - March 2006