Serial devices and the DeltaV system

Tips for Serial Card configuration

The purpose of this article is to further explain the Modbus Serial Card communication structure and to correlate the DeltaV configuration data with the Modbus device's function codes.

The Serial Card is designed to pass information between the DeltaV control system and a programmable device such as a PLC that uses Modbus protocol.

The physical connection can be RS232 or RS422/485.

Refer to the Installing Your DeltaV Scalable Process System manual for wiring information.

Hardware Connection

Each port on the Serial Card is configured with communication parameters. These parameters determine how the device will communicate. These must match the parameters set in the slave device(s) connected to the port.

In RS232 mode, the Serial Card port is connected directly to a Modbus port on a device. Typically, this is a PLC that will act as a Slave device to provide data to the Serial Card, but the communication can also be set up with the PLC as the Master and the Serial Card as the Slave.

If a multi-port device is used to connect to multiple Modbus devices, the Serial Card can address each device separately and directly.

The RS422/485 communication allows for a multi-drop arrangement of devices, which allows the serial port to address multiple devices without an intermediate piece of hardware.

Communication

For the Modbus protocol you have a choice of RTU or ASCII transmission modes. The RTU mode has greater character density and allows better data throughput than ASCII, for the same Baud rate. The transmission mode may be dictated by hard coded settings in the Slave device, but if a choice is available, the RTU mode is recommended.

The other communication parameters must be set to match the Slave device. Baud rate is usually set at the fastest setting supported by both devices. A lower setting may be required where the cable length is long and/or susceptible to noise. In some instances, an interface device may support a faster baud rate but is not able to perform at that rate due to overall load on the interface. Choose the fastest baud rate that gives reliable data communication.

Set the parity, number of data bits, and stop bits to match in both devices.

Communication Fault Handling

The following parameters specify how the Serial Card will handle communication faults.

The Time Out parameter determines how long the Serial Card will wait for the receipt of data after a request, before making a new request for data.

The Retry Count parameter defines the number of times the Serial Card will repeat a request after it has timed out.

The Transmit Delay parameter is used to insert delays between the end of a receipt of data and a new request for data.

There are several determining factors that affect the choice for these settings.

The Time Out value must be long enough for the slave device to process and return all the data of the largest Data Set requested by the master. The amount of data requested coupled with the baud rate will determine how long the communication will take. The total communication time for a Serial Card port can be determined with the use of the DeltaV Diagnostics. In DeltaV Diagnostics, select the port to be verified, right click and select the Display Port Statistics. The statistics window indicates the time in milliseconds for all data sets to be communicated. The Time Out required can be implied based on the relative size of the data sets and applying this ratio to the total communication time.

The Retry Count defines the number of times the Serial Card will request a data set from a Slave device before it moves on to the next data set. In some cases a retry may be defined to over come performance issues with a particular serial connection.

When multiple devices are connected to the same port, the Time Out and Retry Count will affect the communication rate of all devices on that port. If one device fails to communicate, all data set requests to that device will time out and be retried as per the settings. In the case where the Time Out is set to 1000 milliseconds, and a retry of 1, each data set in the off line device will take two seconds to be processed. All communication on this port will be delayed by two seconds per data set from the non-communicating device on each scan of the port. You must determine the impact this delay will have on your control strategy. For example,
  • In applications where the data is not critical, or is not required in a timely manner, placing multiple devices on a single port is appropriate to reduce cost. Setting the Retry Count to 0 can reduce the delay caused by a non-communicating device.

  • In applications where the Slave Device is critical to operations, such as interlocked motor control logic, each device should be connected to a dedicated port so that unavailability of one device does not effect communication rates of other devices.

Device Configuration

Once the port communication parameters are set, the device configuration is created. Define a description and a Modbus address for the device in the device dialog. Each device is assigned a device number from 1 to 255. Each port can support up to 16 slave devices. The data sets are found beneath the device (expand the device in the DeltaV Explorer hierarchy). The data sets define the specific data to be communicated between the device and the serial card.

Data Set Configuration

The DeltaV data set configuration dialogs allow you to specify the source of the data as defined under the PLC tab, and how that data will be interpreted within DeltaV strategies. The supported Modbus codes are listed in a separate topic.

Some Modbus devices do not support all the codes that DetlaV supports. Data sets must be configured such that the supported Function code is used to retrieve the data.

Most Modbus slave devices are configured to use the Holding Registers for data exchange. This allows the PLC logic to apply additional logic to output signals before they are sent to the PLC outputs. In addition to the DeltaV data types, you can pass 32 bit Floating point data and 32 bit integer words to and from the PLC Holding Registers. The Serial card will use two contiguous 16 bit registers to represent the 32 bit format. You must ensure that interpretation of these numbers is consistent between the two systems. Modbus uses the IEEE format for floating point where the first register is the LSB and the second register is the MSB. DeltaV allows the user to connect dissimilar data types. The result will be limited by the simplest of the data types used. For example, a Discrete value connected to a Data Set Boolean register will result in a True value if the Discrete value is non-zero. If the Discrete is 0, the result is False. It is recommended the user define a Data Type that is consistent with the Data Set register usage.

The OFFSET value for the Data Set refers to the starting address of the block of registers being defined in this Data Set. Each register type supports addressing up to 9,999. Data Sets must be addressed to fall within this range. The following table provides supported register ranges.

PLC Register Type Address Range
Coils 1 - 9,999 or 0X
Input Status 10,001 - 19,999 or 1X
Input Registers 30,001 - 39,999 or 3X
Holding Registers 40,001 - 49,999 or 4X

An offset of 0 results in the Data Set beginning at Register 1 for the type of register selected. You must configure the Slave Device such that the information is located where the Data Set is expecting to find the data. Some older devices may not support the above range. Some new devices may support up to 65,535 registers.