Using DF1 (Full- and Half-Duplex) with the RMC SERIAL

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:

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:

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.

The PLC-5 MSG block is displayed as follows:

image\ebx_1421626570.gif

The SLC 5/05 MSG block is displayed as the following:

image\ebx_379244820.gif

The MicroLogix MSG block is displayed as follows:

image\ebx_-31114605.gif

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:

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.