Table of Contents



Introduction

The RediGate Configuration Manual describes the configuration of many of the RediGate's standard features using the ACE program. This document gives additional instructions for configuring the RediGate to use the following protocols:

See the following Quick Start example configuration:


Allen Bradley DF1 & CSP Protocol Description

This document is not intended to provide a detailed description of the protocol(s) involved, nor to disclose proprietary information that may belong to other parties. Depending on the protocol, it may be necessary to refer to other vendor protocol documentation or device configuration details to understand how the RediGate should be configured to interface with it. This section provides a brief discussion of the protocol for the purpose of understanding the RediGate's configuration objects.

Data from an Allen Bradley PLC using DF1 or CSP protocols is requested using a "file" identifier and a register number within that file as the specified starting address. The file may contain a mix of different data types. The RediGate's Poll Table is able to read a block of registers from the PLC and parse them into Real-time Database (RTDB) registers using the appropriate data types.

DF1 protocol can be used on Rockwell/Allen-Bradley devices:

The RediGate's DF1 and CSP protocols over an Ethernet connection is also referred to as PCCC. This document does not describe configuration of Allen Bradley EtherNet/IP CIP protocol. The RediGate does not currently support Data Highway Plus (DH+), which requires a special hardware interface.


The following sections describe the ACE objects used for DF1 and CSP Master, object properties (including constraints on the Instance number), and object fields and their possible values required to configure for the given protocol(s). The object structure in ACE is hierarchical, with each object existing under a certain parent object. For instance, the FieldUnit is the child of one of several types of Circuit objects, either serial or network type (" System>Clients>Master Channels>Master Channel>Circuit").

The Description and Enabled properties are included in ACE as part of each object but are not mentioned here. The "UFF External" property is only mentioned for the objects where it is typically used, but should normally be left unchecked.

DF1/CSP Master Channel

The structure of ACE objects for a Master Channel used for DF1 or CSP protocol is shown below:

DF1 SerialDF1/PCCC MasterCSP/PCCC Master

Note the following when configuring the Master Channel for DF1/CSP devices:

DF1 RS-232 Async Circuit

 

The DF1 RS-232 Async Circuit is a special serial communications path to one or more Allen Bradley DF1 field units from a common Master Channel. Use this circuit instead of the generic AsyncCircuit when configuring a DF1 serial field unit under a Master Channel. You should not use the standard AsyncCircuit when polling DF1 PLCs.

AttributesFunction
Object TypeDf1Rs232circuit
Parent(s)System → Clients → Master Channels → Master Channel
InstanceShould be set to 0. Only one circuit (Network or Async) is allowed when using the DF1 master protocol. 
The DF1 Async Circuit should have at least one Field Unit child object defined under it. 


PropertiesValues
DH Link Type

Select the Allen Bradley link type (DH or DH+).

Configure this to "DH." The RediGate does not currently support the Data Highway Plus (DH+) protocol, which requires special hardware. 

Station DHP  Address

Enter the DF1 (master) station address taken by the RediGate on the Data Highway network.

Note that the master station address is different from the device address being polled, which is configured under the FieldUnit definition. 

Link Protocol

Select the link protocol to use ('Full Duplex' or 'Half Duplex').

This should be set to match the full-duplex (peer to peer) or half-duplex setting of the PLC.  

Serial Port

Select the Async serial port to use for this circuit.

The selected port must be defined as an AsyncPort object under Networks, where its serial properties (baud rate, etc.) are defined.

Message Timeout

Enter the message timeout in milliseconds. This is the amount of time to wait for a message response.

In the DF1 protocol, there may be multiple messages to a single poll, such as acknowledgments.

Message TimeoutsEnter the number of message timeouts before declaring a message to have failed. 
Poll Timeout

Enter the poll timeout in milliseconds. This is the amount of time to wait for the initial byte of a response to a poll.

For DF1 used on an Async Circuit, the Master Channel's Response Timeout parameter is unused. 

Poll TimeoutsEnter the number of poll timeouts before aborting a poll request. 
Demark Timeout

Enter the byte timeout in milliseconds to wait for the last byte of a packet.

The Demark Timeout is used to help identify the end of a packet after the RediGate has started receiving bytes on the serial port. 

Error CheckSelect the error check type (BCC, or CRC-16).

Network Circuit


A Network Circuit is an IP network communications path to one or more field units from a common Master Channel. The Network Circuit is used when the field unit is connected to the RediGate over a TCP/IP network.

To configure the Network Circuit for Allen Bradley PLCs:

 See the RediGate Configuration Manual for information on configuring the NetCircuit object.

AsyncPort

 

If using a Df1Rs232circuit for serial DF1 devices, make sure to include a COM port (System>Networks>AsyncPort) object in the configuration with the instance number matching the physical COM port, and the baud rate corresponding to the field device’s setting.

See the RediGate Configuration Manual for information on configuring the AsyncPort.

DF1/CSP FieldUnit

  
A DF1 or CSP Field Unit object contains unique information for each Field Unit using the Allen Bradley PLC communication protocols, and defines parameters for how data is read and written for the device.

If the PLC "file" includes mixed data types, the RediGate uses a technique called "continuation polls" to optimize polling data. This method allows for one row in the Poll Table to be defined as the actual "poll" that requests data from the PLC, and subsequent rows (with Read Count=0) simply parse the data sequentially from the response obtained in the original poll.

NOTE: The Scan Table in the Master Channel should only request the FIRST row in the Poll Table defining the "continuation poll" (with non-zero Read Count) not the subsequent rows of the continuation.


AttributesFunction
Object Type

 FieldUnitABDF1M  (Allen Bradley DF1 serial or PCCC)

FieldUnit_CSP_PCCC  (Allen Bradley CSP)

Parent(s)

System → Clients → Master Channels → Master Channel → Df1Rs232circuit (serial)

System → Clients → Master Channels → Master Channel → NetCircuit (TCP)

InstanceMust be unique under a Circuit.
The Field Unit must have an RTDB child object defined under it.


PropertiesValues
Unit Name

Unit Address

Enter the actual field unit address which is configured in the device being polled.
Use a valid DF1 address, 1 to 255, for the PLC being polled. 

Circuit TypePlaceholder for Protocol type of 'Allen-Bradley DF1 Master' or 'AB CSP/PCCC Master'.
Com Retries

Comm Status 
Holdreg

Produce RBEs

 

Poll Table



Poll Table Properties
PropertiesValues
DF1 Address

Enter the starting source register in the DF1 (or CSP) device to begin polling data. This will be found in the documentation for the device, based on the information that you want to obtain. This field should be set the same in each row of a "continuation poll." The DF1 Address should be entered in one of the following formats, based on the PLC Addressing Type (below):

  • PLC-2 Logical – Enter the number (in octal) of the logical register address in the PLC. For example, for register 17 in the PLC, enter the octal address as "21".
  • PLC-2 Physical – Enter the number (in decimal) of the physical register address in the PLC.
  • PLC-5 Logical Binary – Enter the starting register address in the PLC as a 4-level dotted notation, such as "0.7.30.0". Always set the 1st number to 0. The 2nd number indicates the "file" in the PLC, and the 3rd number is the point/register within the file. The 4th level of the dotted notation refers to the bit within an integer register and should always be set to "0", because the RediGate always reads whole integer values.
  • PLC-5 Logical ASCII – Enter the starting register address in the PLC as an ASCII string in the format "$Xf:pp", where:
    • "X" can be "N" for integer, "B" for Boolean, or "F" for floating point
      (any ASCII character can be used and is ignored in the RediGate)
    • "f" is the numeric value of the file in the PLC containing data
    • "pp" is the point number within the file
    • For instance, "$N7:30" indicates integer data in file 7, starting at point 30; this corresponds to a PLC-5 Logical Binary address of "0.7.30.0".
PLC Addressing TypeSelect the PLC addressing type of the DF1 Address entered in the previous column (above). This field should be set the same in each row of a "continuation poll."
PLC-2 Logical
PLC-2 Physical
PLC-5 Logical Binary
PLC-5 Logical ASCII 
Data Type

Select the data type of the data being read in this row of the Poll Table. If the Read Count of points contains data of different types, use multiple rows to define the number of points to read for each Data Type and the Destination Register in which to store each set of data. Select the data type from:

  • Integer-16bits, Unmasked 16-Bit Writes (0x67) – 16-bit integer data, using Allen Bradley function code 0x67. Destination RTDB should be 16-bit.
  • Float (Read-Write) / Int32 (Read-only) – Read 32-bit data (Floating point data may be written, but writing to 32-bit integers is not currently supported). Destination RTDB should be 32-bit.
  • Bit: Auto-detect Read-Modify-Write (0x26), else Typed Write (0x67) – Use this data type to parse individual bits out of an integer register. Destination RTDB should be Boolean. For output data, RediGate will attempt to automatically detect whether the device supports Read-Modify-Write command (0x26) to selectively modify only the bits that are being written. If this cannot be determined, then RediGate will use Typed Write (0x67) to write entire block of bits to the PLC.
  • Int 16-Pairs, Little-Endian Words – Read pairs of 16-bit values (up to Read Count of 50 pairs) from PLC and store into 32-bit Destination RTDB (first register is Least Significant Word).
  • Int 16-Pairs, Big-Endian Words – Read pairs of 16-bit values (up to Read Count of 50 pairs) from PLC and store into 32-bit Destination RTDB (first register is Most Significant Word).
  • Bit: Read-Modify-Write Forced (0x26) – Read individual bits from integer register. Destination RTDB should be Boolean. Binary outputs will always use Read-Modify-Write (0x26) command.
  • 0xAB CompLOGX Mask Write, Bit Read – Read individual bits from integer register from a CompactLogix PLC. Destination RTDB should be Boolean. Binary outputs will be written using function 0xAB Mask Write.
  • CMD-LOG-TO-STRING32 –

Read Count Enter the count of points to read from the device. 
If polling for a block of data from a single "file" with different Data Type and/or Destination Register range, use multiple rows in the Poll Table.
The Read Count on the first row of a continuation poll should include the total number of registers to include in the DF1 protocol request, with the Write Count defining how many points of a specific data type to save into the RTDB.
Set the Read Count to zero (0) on subsequent consecutive rows of the same poll definition, to indicate a "continuation poll." 
Write CountEnter the count of points to store into the RTDB Destination Register. 
If polling for a block of "file" data with different Data Type and/or Destination Register range, the Read Count is set to zero (0) on all rows after the initial row of the "continuation poll."
In all cases, the Write Count should include only the count of points to parse from the message using the Data Type specified on this row. The data will be stored into the RTDB, beginning at the RTDB Destination Register. Include as many rows as needed to parse data from the poll message, with Read Count=0 and Write Count set to parse the data type.
If parsing data using the "Bit" type, the count must be the number of binary bits. If parsing the data using the "Integer" type, but storing into Boolean registers, the Write Count must be the number of integer registers to be parsed—but be aware that 16 bits per integer register will be stored into the RTDB. 
RTDB Destination AddressEnter the starting destination register within the field unit's RTDB into which the Write Count of data points will be stored. These registers must be configured in the RTDB object.
The Destination Register type should be chosen based on the Data Type of the data points defined on this row of the Poll Table.
Bit data should be stored into Boolean RTDB registers.
Integers should be stored into 16-bit RTDB registers. It is also permissible to use the Integer data type but store into an RTDB Destination Address that is defined as a Boolean. In this case, each of the 16 bits of the integer will be stored sequentially into the RTDB, beginning at the least-significant bit.
Floating point data should be stored into REAL32 RTDB registers.


Example of Continuation Poll

As an example of a continuation poll, assume that the DF1 PLC has statuses, accumulators, controls, and setpoints all packed into different boards located at $N9:60 through $N9:119 registers (using PLC-5 Logical ASCII format). Below is an example poll table with this information.


You must have data in the registers that you are polling, otherwise you receive errors on that poll record during that poll attempt. For example, there are only 2 $F8 registers declared in this PLC program:



Attempting to poll register $F8:2 will result in an error.

Row 1 in the Poll table is the only row of the "continuation poll" that should be included in the Scan Table of the Master Channel (not rows 2-5). Rows 2-5 have the same DF1 Address and a Read Count of 0, indicating that these are continuation rows, used for parsing additional fields of data from the poll defined in Row 1. Following is additional explanation for each row in the Poll Table.

RowDescription
Row 1Read 60 continuous 16-bit integer register values from the PLC, starting at address $N9:60 (this equates to polling for registers $N9:60 – $N9:119). Store the first 10 integer registers ($N9:60 – $N9:69) as Boolean status values starting at RTDB register 10,001. Each bit of each register is stored beginning with the least-significant bit, filling RTDB registers 10,001 – 10,160. 
Row 2(continuation) Continue parsing through the 60 registers requested in the first Poll Table row. By using the "Bit" Data Type with a Write Count of 16, one additional 16-bit integer register ($N9:70) is parsed into RTDB registers 10,161 – 10,176. This shows than when using the "Bit" type, the count must be the number of bits, not integer registers. 
Row 3(continuation) Store the next 16-bit integer ($N9:71) into register 30,001 in the RTDB.
Row 4continuation) Store the next two elements ($N9:72 – $N9:73) as a single 32-bit floating point number into 42,001 in the RTDB. Note that the number of elements parsed from the message is two, because the initial poll record used the Integer (16-bit) type. 
Row 5(continuation) Store the next 30 elements ($N9:74 – $N9:103) as fifteen 32-bit integers into RTDB registers 41,001 – 41,030. (Note: The "Float" data type must be used for reading 32-bit integers into UINT32 or SINT32 RTDB registers because the DF1 Poll Table doesn't have an option for long integers. Long Integer data may only be read, not written.) (NOTE: Rows 1-5 define five continuation poll rows parsingonly 44 registers of 16-bit data ($N9:60 - $N9:103). The original poll record was for a count of 60, so the remaining 16 registers would be discarded. This is used for illustration but would not be an ideal configuration because it wastes communication bandwidth by polling for unused data. In an actual configuration, the first row's Read Count should be set to 44, or additional continuation rows should be defined.)
Row 6This is a new poll. Read 48 bits from the PLC (three 16-bit integer registers, $N9:120 - $N9:122) and store them as binary control values into RTDB registers 1 – 48. 
Row 7This is a new poll. Read twelve 16-bit integer values from the PLC ($N9:130 – $N9:141) and store them as analog setpoints into RTDB registers 40,001 – 40,012. Note that the "DF1 Address" column uses "$F" – as noted above, the actual ASCII character used in this field is ignored by the RediGate. Ordinarily, this should set to "$N" for visual clarity, but the Data Type column determines how the data is actually parsed. 


Rows 6 and 7 of the Poll Table define a mapping of output registers in the PLC to Modbus register numbers in the RediGate's RTDB. This mapping works in both directions—data read from the PLC will be stored into the RTDB, and any values written to these RTDB registers will be written as control messages back to the PLC.

Rows 6 and 7 may be included as entries in the Master Channel's Scan Table, but only if the RediGate needs to read the binary control bits and analog setpoint values from the PLC continuously. If it is only necessary for a host system to write to these control registers (not read the feedback)—for instance, if the control feedback is obtained from reading other DF1 registers—the Poll Table definitions are still required in order to map Modbus RTDB registers to DF1 device point numbers, but there is no need to include Scan Table entries for these polls (see Master Channel).

Modbus RTDB

See the RediGate Configuration Manual for information on configuring the RTDB.