Note: Full- and half-duplex DF1 was added to the RMC SERIAL module in 20010627 firmware. Modules with firmware dating prior to this do not support DF1.
The DF1 Protocol
Allen-Bradley’s DF1 Protocol and Command Set Reference Manual (pub. no. 1770-6.5.16) is the authority on the DF1 full- and half-duplex protocols. This manual is available on Allen-Bradley’s web site (http://www.ab.com). As of this writing, the following URL contains this document: http://www.ab.com/manuals/cn/17706516.pdf. When this link is out-of-date, try searching for the above publication number.
Full-duplex DF1 is used for peer-to-peer communication. Therefore, only two devices can communicate with one another. Only RS-232 or RS-422 support full-duplex.
Half-duplex DF1 is used for master-slave communication with one or more slaves. When more than two devices communicate with one another, 2-wire RS-485 is used. Otherwise, any line driver can be used.
RMC Support for DF1
Both full- and half-duplex DF1 use the same application protocol, which consists of commands and functions for the slave or peer to execute. The RMC supports the following DF1 functions:
PLC5 Word Range Write (CMD=0x0F, FNC=0x00)
PLC5 Word Range Read (CMD=0x0F, FNC=0x01)
PLC5 Typed Write (CMD=0x0F, FNC=0x67)
PLC5 Typed Read (CMD=0x0F, FNC=0x68)
SLC Protected Typed Write with 2 Address Fields (CMD=0x0F, FNC=0xA9)
SLC Protected Typed Read with 2 Address Fields (CMD=0x0F, FNC=0xA1)
SLC Protected Typed Write with 3 Address Fields (CMD=0x0F, FNC=0xAA)
SLC Protected Typed Read with 3 Address Fields (CMD=0x0F, FNC=0xA2)
Echo (CMD=0x06, FNC=0x00)
Diagnostic Status (CMD=0x06, FNC=0x03)
Most of the above functions address memory in the remote device. The RMC has memory registers defined (N7:0-255 and N9:0-N255:255) as described in the following topic:
Protocol-Specific Settings
The RMC DF1 implementation has two protocol-specific settings:
Node Address: Select a node address for the RMC that is unique to the DF1 network. This address will be entered in the master's request to identify the slave that should respond.
Error Checking: Select one of the two error checking methods, BCC or CRC. Each provides error checking on the packet level. CRC is mathematically better at catching a lot of common types of errors, and as such is preferred. However, if the master does not support CRC then BCC must be used.
See Configuring the RMC SERIAL for details on using the Serial Module Options dialog box to change these and other RMC SERIAL options.
PLC Support for DF1
DF1 is a major industrial serial protocol supported by a large number of devices, both those built by Allen-Bradley and other companies. Any DF1 master implementation that uses the above blocks should also be able to read and write from the RMC.
Each Allen-Bradley PLC uses the Message (MSG) ladder logic block to initiate reads and writes over a serial port. For full details on this block, refer to Allen-Bradley’s Instruction Set Reference Manual for the appropriate PLC. While the same block is used by each PLC, the semantics differ slightly for each. Below are specific instructions for the PLC-5, SLC 5/0x, and MicroLogix. This documentation came using RSLogix 5 version 3.2.0.0 and RSLogix 500 version 4.10.00.
Allen-Bradley PLC-5
The PLC-5 MSG block is displayed as follows:
Control: This parameter points a message (MG) file type element or a block of integer (N) file type elements. The number of N-file elements required varies from 11 to 15; look at the BLOCK SIZE field in the setup screen for the exact size. Set this to an unused block of registers, and then use the Setup Screen option in the MSG ladder logic block to modify those register values:
This PLC-5: This section holds parameters for the PLC-5.
Communication Command: From this drop-down list, select PLC-5 Typed Read to read values from the RMC, or PLC-5 Typed Write to write values to the RMC.
Data Table Address: Enter the address of the first Allen-Bradley PLC register to read RMC registers into, or to write to RMC registers from.
Size in Elements: Enter the number of RMC registers to read or write in this field. Transfers are limited to 1000 bytes for PLC-5 Typed Reads and Writes. Therefore, this limit is 500 integers, 250 floats, etc. Notice that this limit is larger than the number of elements in the RMC's N-files. Reads or writes that extend beyond the end of a register file will continue into the next register file. For example, reading 300 elements from N9:0 will read N9:0 to N9:255, then N10:0 to N10:43.
Port Number: Set this to the channel number of the serial port you want to use.
Target Device: This section holds parameters for the target device.
Data Table Address: Enter the address of the first RMC register to read or write in this field. See the RMC Register Map (Allen-Bradley) for help on addresses.
MultiHop: This parameter should be set to No.
Local Node Addr (dec): Enter the node address of this RMC. The node address of the RMC is set up in the Serial Module Options dialog box, which is described in Configuring the RMC SERIAL. The node address entered on that screen is in decimal, so it is recommended that you enter the same number in the dec field.
Allen-Bradley SLC 5/0x
The SLC 5/05 MSG block is displayed as the following:
Type: This parameter is always set to Peer-to-Peer for serial communication channels.
Read/Write: This parameter should be set to Read to read registers from the RMC, and to Write to write registers to the RMC.
Target Device: This parameter has possible values of 500CPU, 485CIF, and PLC5. This should be set to PLC5 or 500CPU for communicating with the RMC.
Local/Remote: This parameter has possible values of Local and Remote. This will be set to Local when the RMC is on the same serial network as the SLC.
Control Block: This parameter points to a block of 12 integer-file registers. Set this to a block of registers, and then use the Setup Screen option in the MSG ladder logic block to modify those register values:
This Controller: This section holds parameters for the SLC 5/05.
Communication Command: This parameter will be set to PLC5 Read, PLC5 Write, 500CPU Read, or 500CPU Write, depending on what was selected in the MSG block itself (as described above).
Data Table Address: Enter the address of the first Allen-Bradley PLC register to read RMC registers into, or to write to RMC registers from.
Size in Elements: Enter the number of RMC registers to read or write in this field. The range enforced by the SLC depends on the model used. The SLC 5/02 can transfer 1 to 41 integers, the SLC 5/03 and 5/04 can transfer 1 to 103 integers, and the SLC 5/05 can transfer 1 to 256 integers. Reads or writes that extend beyond the end of a register file will continue into the next register file. For example, reading 256 elements from N9:128 will read N9:128 to N9:255, then N10:0 to N10:127.
Channel: Set this to the channel number of the serial port you want to use. Keep in mind that on the SLC 5/05 channel #1 is the Ethernet channel.
Target Device: This section holds parameters for the target device.
Message Timeout: Indicate the number of seconds to wait for the RMC to respond before determining that the attempt failed. This can be set as low as a few seconds.
Data Table Address: Enter the address of the first RMC register to read or write in this field. See the RMC Register Map (Allen-Bradley) for help on addresses.
Local Node Addr (dec): Enter the node address of this RMC. The node address of the RMC is set up in the Serial Module Options dialog box, which is described in Configuring the RMC SERIAL. The node address entered on that screen is in decimal, so it is recommended that you enter the same number in the dec field.
Local/Remote and Bridge Parameters: In most applications these will be set to Local and there will be no bridge parameters. If you are using a bridge then these parameters will need to be used. However, this is beyond the scope of RMC documentation. Refer to your Allen-Bradley documentation for instructions on using these fields.
Allen-Bradley MicroLogix
The MicroLogix MSG block is displayed as follows:
To edit the parameters of the message block, select the MSG block, enter an unused MSG file in the MSG File parameter, and double-click Setup Screen. This brings up a dialog with the following options:
This Controller: This section holds parameters for the MicroLogix.
Communication Command: This parameter can be set to PLC5 Read, PLC5 Write, 500CPU Read, or 500CPU Write. The type of PLC selected is not important, but the Read or Write determines whether you will read registers from the RMC or write registers into the RMC.
Data Table Address: Enter the address of the first Allen-Bradley PLC register to read RMC registers into, or to write to RMC registers from.
Size in Elements: Enter the number of RMC registers to read or write in this field. The MicroLogix can transfer 1 to 41 integers.
Channel: Set this to the channel number of the serial port you want to use. The MicroLogix 1500 LRP Series B can use either channel 0 or 1, but all other MicroLogix PLCs will always use channel 0.
Target Device: This section holds parameters for the target device.
Message Timeout: Indicate the number of seconds to wait for the RMC to respond before determining that the attempt failed. This can be set as low as a few seconds.
Data Table Address: Enter the address of the first RMC register to read or write in this field. See the RMC Register Map (Allen-Bradley) for help on addresses.
Local Node Addr (dec): Enter the node address of this RMC. The node address of the RMC is set up in the Serial Module Options dialog box, which is described in Configuring the RMC SERIAL. The node address entered on that screen is in decimal, so it is recommended that you enter the same number in the dec field.
Local/Remote and Bridge Parameters: In most applications these will be set to Local and there will be no bridge parameters. If you are using a bridge then these parameters will need to be used. However, this is beyond the scope of RMC documentation. Refer to your Allen-Bradley documentation for instructions on using these fields.
Using the MSG Block in Ladder Logic
The Allen-Bradley MSG block takes multiple ladder scans to complete. Therefore, it is important to enable the MSG block for the correct amount of time. Specifically, the MSG block must be energized until the message control's enable (EN) bit turns on. Delta has found some aspects of this to be difficult and therefore has provided the following ladder samples:
Read or Write Continuously
Using the Examine If Open instruction as shown below fulfills two requirements of continuous MSG transactions. First, it will keep the block energized until the EN turns on, and second, it de-energizes the MSG block once the transactions is started so that when the transaction is completed (EN goes low again), the MSG block sees a rising edge on its input, thus repeating the transaction:
Read or Write Once
This sample takes care to keep the MSG block energized until the MSG block starts, as indicated by the enable (EN) bit turning on. Once this happens, the application-controlled TriggerOnce coil is turned off. The message control's Done (DN) or Error (ER) bits can be used to process the results of the transaction.
Copyright (c) 1997-2015 by Delta Computer Systems, Inc.