Modbus Compatible Device Driver

Not counted towards your tag license limit.

The Modbus Compatible Device driver provides an interface to a Modicon PLC.

Driver Errors: To learn more about the cause of an error condition, refer to the Driver Summary Report and the Driver Error Report, both of which are available in the Reports page. The Show Stats button will also provide current and last error messages: Show Statistics Button Widget

Modbus drivers will commonly connect to TCP on port # 502, although variations may be found.

This driver supports multiple TCP/IP port connections between a single instance of the driver and the RTU.

Server List

Select (or create) a named server list. (Driver Server Lists) Servers for the list must be defined using the Application Configuration dialog, as described in Servers for Specific Services. Smaller sites that do not have multiple servers, or that use only the default server list, need not configure this field.

Modbus Compatible Device: Options tab

The Options tab of the Modbus Compatible Device tag properties folder can be used to set byte swapping for long integer, IEEE single or IEEE double bytes. If this driver is communicating over a modem, then the Options tab is also used to indicate that squelch noise should be suppressed, if present.

Modicon driver tag - options tab

Comm Channel

Select the communication channel and protocol to use for this Modbus Compatible Device driver. This will be one of:

  • Serial RTU Select to use the RTU mode of the Modbus serial communications standard.
  • Serial ASCII Select to use the ASCII mode of the Modbus serial communications standard.
  • SA-85 (MB+) Select to use the Modbus Plus communications protocol via a Modicon SA-85 card.
  • Embedded TCP/IP Select to use the Embedded TCP/IP protocol.
  • Open Modbus TCP Select to use the Modicon Open Modbus/TCP specification to receive Modbus protocol over Ethernet TCP/IP.

Squelch Noise Present

Applies when communicating over a modem. Select this box to enable the squelching of background noise. By default, the Squelch Noise Present check box is not selected.

Reverse Long Integer Byte

Select whether byte swapping should occur for long integer values. By default, the Reverse Long Integer Byte check box is not selected.

Reverse IEEE Single Byte

Select whether byte swapping should occur for IEEE single byte values. By default, the Reverse IEEE Single Byte check box is not selected.

Reverse IEEE Double Byte

Select whether byte swapping should occur for IEEE double byte values. By default, the Reverse IEEE Double Byte check box is not selected.

Force Multi Element Write OpCodes

Certain hardware requires data to be written using multi-element OpCodes (15 and 16) even though the actual data is single-element (OpCodes 5 & 6). By selecting this box, you can ensure that this driver instance is able to communicate with devices that require the multi-element codes.

Store Last Output Values

When selected, the driver will maintain a record of the last value written to each output address. This may be useful in at least two situations:

  • For hardware that does not maintain its state during a power loss and must be restored to that state when re-started.
  • When failed hardware is replaced by a new device and you would like to start that device with the values last written to the old one.

If the last output values are stored, they may be re-written by either of two methods:

  • Automatically, when communication is restored to the device.
  • Manually by way of a button press. See, Rewrite Outputs Widget for details.

Changing this value from selected to deselected will cause all stored values to be erased immediately.

If this driver is being used in conjunction with a Driver Multiplexer, then configure the Driver Multiplexer to store the last values, not the drivers connected to the Multiplexer. In this case, only the Multiplexer should be configured to re-write automatically.

Enable Auto Rewrite

If selected, the Store Last Output Values option will also be activated. This option causes the driver to rewrite the last value written to each output, in the event that communications are lost and then restored.

Use this option only if you are certain that you want the last values to be rewritten automatically after an interruption in driver communications.

Maximum Coalesce Gap

Use only if the Modbus compatible device does not support reads from addresses that are not explicitly declared in the device. VTScada will attempt to coalesce reads from a range of addresses, which may lead to an error with these devices.

If left blank, there is no effect on driver coalescing.

Set to zero to allow for devices that cannot read from addresses that are not explicitly declared.

Set to a number greater than zero to fine-tune read coalescing. The gap is measured in units of two-byte words. Warning: when using low maximum coalesce gap values, it is important to avoid unnecessary gaps in VTScada tag addresses.

if this value is set, driver response time may be slowed due to the increased number of read blocks.

See also: VTSMaxBlock

Modbus Compatible Device: Serial tab

The Serial tab for the Modbus Compatible Device Driver tag properties folder consists of attributes used to identify and establish a connection to the hardware.

Port

Enables you to select the Serial Port tag or TCP/IP tag you wish to be associated with this driver tag. A Serial Port tag opens a serial port to enable communications between VTScada and your PLC or RTU. A TCP/IP tag enables you to connect to a series of hosts, allowing you to transmit data across a network or over the Internet.

The Port field can be cleared using the X button that appears to its right.

IP Network Listener Group

Configure only if this driver is to accept in-bound TCP or UDP communications. Select an existing IP Network Listener tag using the drop-down list.

If the IP Network Listener is configured, this driver must use Open Modbus TCP, configured on the Options tab.

IP Allow

Optional. Misconfiguration of this field is a common source of problems.

Used in connection with an IP Network Listener tag. General IP address filtering should be set on the IP Network Listener, as this will be more efficient. The list of allowed IP addresses in the driver is intended to prevent misconfigured devices from interfering with other devices.

Both filters (that in the Network Listener and this one) can be configured at the same time. The filter in the IP Network Listener will be applied when the device first connects and the local filter will be applied after a specific driver instance has been identified.

Station Address Mode

Use to limit the range of allowed addresses. Select according to your hardware. (The Lufkin and TeleBUS options are sometimes used by Oil & Gas applications and seldom elsewhere.)

Standard Address ... 1 - 247 according to Modbus Protocol. Extended addressing ranges cannot be entered directly.
An expression can be used for this parameter in order to bypass the limit if your device uses a modified Modbus protocol. Proceed with caution.

Lufkin ELAM Address ... 1 - 2295

TeleBUS Extended Address ... 1 - 65534

If the driver is running as a virtual server, the addressing is limited to the standard range, 1 - 247.

PLC Address

The station address of the Modicon programmable logic controller. By default, the PLC Address field is set to 1.

An expression may be used to provide the address if needed. This may be required on a network where the address varies depending on the workstation where the tag is running.

Note that, to create a valid expression for an address that contains non-numeric characters, you must enclose the address in quotation marks. e.g. "31.0.0.0" See: Modbus Plus PLC Addressing.

Time-Out Limit

Set the receiver time-out limit in seconds or fractions of a second. This is the length of time that this driver should wait for a reply from the PLC or RTU.

Retries

The number of times to retry a message before declaring an error.

Use only if the driver is connected to a device that uses a serial port or a UDP/IP port that is configured to be polled. When connected directly to a device using TCP/IP, this value should normally be set to 0 since TCP/IP is a guaranteed message delivery protocol.
For unreliable communications, such as radio, set to 3 or 4.

Retry Delay

The Retry Delay field enables you to specify the amount of time (in seconds or fractions of a second) that the driver will wait between attempts to repeat a transmission of data if the previous attempt(s) have failed.

By default, the Retry Delay field is set to 0 (indicating that there should be no delay between retry attempts).

Hold

Select this to have I/O tags attached to the driver hold their last value in the event of a communication failure. If not selected, tags will have their value set to invalid on a communication failure.

RTS Key Off Delay

The RTS Key Off Delay field represents the amount of time (in seconds) that this Modbus Compatible Device will wait before dropping RTS at the end of a data transmission.

Squelch Time

Sets the amount of time (in seconds or in fractions of a second) to wait before clearing noise. Enabled only when Squelch Noise Present has been selected on the Options tab.

Modbus Compatible Device properties Modbus Plus tab

The Modbus Plus tab of the Modbus Compatible Device tag properties folder is used when an SA-85 I/O card for Modbus Plus communications has been configured.

Modicon driver tag - Modbus Plus tab

SA-85 Adapter Number

The SA-85 Adapter Number section enables you to specify the number of the adapter if you have installed an SA-85 network adapter card for Modbus Plus communications networks. You can specify adapter 0, adapter 1, or none by selecting the associated radio button. The default setting for the SA-85 Adapter Number section is None.

SA-85 Polling Rate

Set the rate in seconds or fractions of a second at which you wish the SA-85 network adapter card to be polled. The default SA-85 Polling Rate setting is 0.025.

Retries

Select the number of attempts that will be made by this driver if there is no reply to a message. An error will be declared after this number has been reached.

Time Out (x500mS)

Specify the message response time limit that the driver will wait for a reply from the PLC. This time limit may be set from 1 to 20 increments. The default setting for the spin box is 2 (i.e. two 500 millisecond increments, or 1 second).

Maximum Paths Open

Set the maximum number of Modbus Plus sessions that can be opened simultaneously by the installed SA-85 network adapter. The Maximum Paths Open spin box may be set from 1 to 8. The default setting for the Maximum Paths Open spin box is 8.

Modbus Compatible Device: Virtual I/O tab

These properties are used to configure a virtual PLC in the memory of your PC. If using virtual addresses, and if your server is connected to the Internet, you may wish to enhance security by adding an IP Network Listener tag. See: IP Network Listener Tags

Modicon driver tag - Virtural I/O tab

Holding Coils 0xxxx (0-999)

Enter the number of 00000-series holding coils to be assigned to the virtual PLC.

Input Coils 1xxxx (0-9999)

Enter the number of 10000-series input coils to be assigned to the virtual PLC.

Input Registers 3xxxx (0-9999)

Enter the number of 30000-series input registers to be assigned to the virtual PLC.

Holding Registers 4xxxx (0-9999)

Enter the number of 40000-series holding registers to be assigned to the virtual PLC.