Allen-Bradley has several Ethernet options for its PLCs. The SLC 5/05 and Ethernet PLC-5E controllers each have a built-in Ethernet port. The ControlLogix uses the 1756-ENET or 1756-ENBT communication module to use Ethernet, and PLC-5 controllers other than the PLC-5E can have Ethernet added using a PLC-5 Ethernet Interface Module. Allen-Bradley also sells a PC-based controller called the SoftLogix 5, which can also communicate with the RMC.
Note: Ethernet communication with the ControlLogix Ethernet (e.g. 1756-ENET and 1756-ENBT) modules requires RMC ENET firmware dated 20000420 or later.
In addition to Allen-Bradley's controllers, SoftPLC Corporation manufactures a PC-based, PLC-5 compatible controller that can also communicate with the RMC. See Using the SoftPLC with the RMC Ethernet Module for details.
All of these PLCs can the same ladder logic block to communicate over the Ethernet: the Message (MSG) block. This block takes a number of parameters, which are briefly described below. For a complete description of the parameters, refer to Allen-Bradley's Instruction Set Reference Manual for the appropriate PLC.
Note: With the introduction of the 1756-ENET/B and 1756-ENBT/A, the ControlLogix now also supports I/O connections through EtherNet/IP, which greatly improves performance and determinism. When using the ControlLogix, you will most likely want to use both the MSG block and I/O. EtherNet/IP is discussed in detail in a number of topics starting with Using EtherNet/IP with the RMC ENET.
The Allen-Bradley PLCs can read or write from registers in compatible remote devices such as other Allen-Bradley PLCs or the RMC. The RMC emulates a PLC-5 with 248 integer files (N7 and N8-N255) with 256 elements each (0-255), all of which are accessible over the Ethernet from the Allen-Bradley PLCs. See the RMC Register Map (Allen-Bradley) for details on those registers and their addresses.
Note: Although the RMC Register Map is spread out over 248 integer files, reads and writes that extend beyond the end of an RMC register file will continue into the next file or files. This is particularly useful on the ControlLogix, which allows reading large amounts of data with a single MSG block. By reading 2048 integers from N9:0 in the RMC, the entire Event Step table can be read into the ControlLogix, even though it uses N9 through N17.
If you need help setting up your network, either consult your network administrator, or for simple stand-alone networks, see Setting up a Stand-alone TCP/IP Control Network.
MSG parameters:
The MSG block has slightly different parameters depending on the controller and programming software you are using. The parameters used by RSLogix 5 version 3.2.0.0, RSLogix 500 version 3.01.02.00, and RSLogix 5000 version 2.27.00 for the PLC-5, SLC 5/05, and ControlLogix controllers respectively are described below. The SoftLogix 5 parameters are similar.
SLC 5/05 MSG Block Parameters:
The SLC 5/05 MSG block is displayed as the following:
Type: This parameter is always set to Peer-To-Peer for Ethernet 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 for communicating with the RMC.
Local/Remote: This parameter has possible values of Local and Remote. It should be set to Local for communicating with the RMC.
Control Block: This parameter points to a block of 51 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 either PLC5 Read or PLC5 Write. It is not changed from within the Command Block; it is changed in the MSG block itself.
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 is 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 Ethernet channel. For the SLC 5/05, this should be channel #1.
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.
Ethernet (IP) address: Set this to the IP address of the RMC you wish to communicate with.
MultiHop: This parameter should be set to No.
PLC-5 MSG Block Parameters:
The PLC-5 MSG block is displayed as follows:
Control: This parameter points to a block of 51 N-file (integer) registers or two (2) MG-file (message) registers. 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 Ethernet channel number. For the PLC-5, this should be channel #2.
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.
Ethernet (IP) address: Set this to the IP address of the RMC you wish to communicate with.
ControlLogix MSG Block Parameters:
The ControlLogix MSG block is displayed as follows:
To edit the parameters of the message block, select the MSG block, and click on the button with the ellipses to the right of the message tag name (msgReadStatus in the example above).
This will bring up a dialog with two tabs. Each is described below:
Configuration tab:
Message Type: From this drop-down list, select PLC5 Word Range Read to read values from the RMC, or PLC5 Word Range Write to write values to the RMC.
Source Element (reads only): Enter the address of the first RMC register you want to read. See the RMC Register Map (Allen-Bradley) for help on addresses.
Source Tag (writes only): Enter the tag in the ControlLogix that you want to send to the RMC. In most cases, the tag should be either an array or structure composed entirely of INT data types. This is because both the RMC registers and the INT data type hold 16-bit binary numbers. One issue to keep in mind is that the INT data types are always treated like signed numbers with a range of -32768 to 32767, while the RMC registers are sometimes signed, sometimes unsigned (0 to 65,535) and sometimes somewhere in between.
Number of Elements: Enter the number of RMC registers to read or write in this field. You can transfer from 1-32767 registers at a time per MSG block. Reads or writes that extend beyond the end of a register file will continue into the next register file or files. For example, reading 2048 elements from N9:0 will read N9:0 to N9:255, then N10:0 to N10:255, on through N17:255.
Destination Tag (reads only): Enter the tag in the ControlLogix into which you want to read the RMC data. See the Source Tag bullet above for suggestions on the data type of the tag.
Destination Element (writes only): Enter the address of the first RMC register you want to write. See the RMC Register Map (Allen-Bradley) for help on addresses.
Communication tab:
Path: You must enter the path from the Logix5550 CPU to the RMC. This path must, at the minimum, include going over the rack to the 1756-ENET card and then going over the Ethernet to the RMC. Therefore, the format of the path usually is as follows:
1, [1756-ENET slot number], 2, [RMC IP Address]
Therefore, if the 1756-ENET is in slot 2 (the third slot on the rack), and the RMC is at address 192.168.0.5, then the following path would be used:
1, 2, 2, 192.168.0.5
Communication Method: Select the CIP option.
Cache Connections: This checkbox is not used for the message type selected.
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.