Knowledge Base /
Technical Notes
Modbus TCP/IP Scan Control Dataset
By Edin Rakovic
Product: IOD-4101 - Modbus TCP/IP Master Driver (General Modbus TCP/IP Communications)

The Virtual IO Module (VIM) Network Gateway provides a native DeltaV IO interface to Industrial Ethernet networks and devices that use the Modbus TCP/IP protocol. The following article describes the process of manually controlling DeltaV Input Dataset scan process.

Using the VIM, DeltaV Controllers can read and write signals from plant floor devices connected to Industrial Ethernet networks such as PLCs, Motor Control Centers, and Weigh Scales. By default, the VIM performs dataset scans as fast as the network request/response allows. All datasets of each device are continuously scanned in a cycle. All devices are scanned simultaneously.

The port level Message Timeout value, in milliseconds, is configured to discard outstanding data requests to non-responsive devices. However, the maximum time value can be 25500ms. In some cases, this time value is insufficient. Consequently, an extended timeout time is required.

An alternate scan control mechanism is built into the VIM to allow a DeltaV Control Module to trigger dataset scans on demand by writing to a special Scan Control dataset. The Scan Control dataset is not part of the VIM scan. For Input and Output with Readback datasets, field data reading can be controlled by this dataset. In addition, users can disable any Input or Output dataset such that it does not participate in any scan. Lastly, devices configured with the RTU TCP (i.e., Open Modbus) protocol may be completely disabled, such that the VIM will not try to connect to them. If a Scan Control dataset is not configured, all VIM scans work by default as described above. If the Scan Control dataset is configured, then all other datasets may be controlled by the user as described below. The Scan Control dataset may be configured only once for the entire VIM and may reside under any configured device, or a completely field independent, VIM resident only, device.

Write requests from DeltaV to the external devices are always handled by exception and are not a part of the above scan control mechanism. Writes have priority over reads. For Output with Readback datasets, only the field read part is controlled by the above mechanism. However, if the Output dataset is disabled, then no outputs are sent to the field for that dataset.

Any one dataset, out of the 128 available, may be configured to be the Scan Control dataset. Excluding the Scan Control dataset, all remaining 127 datasets may be controlled.

Dataset Scan Control Configuration

The Scan Control Dataset stores bit masks that will allow the user to control which datasets can and cannot be scanned. When a Dataset is disabled, the VIM will not make any attempt to scan that Dataset and no changes will be made to any of the contents of that Dataset by the VIM (see section 6.1 for more information on the Dataset Scan Control and the bit masking scheme).

  1. Under the “General” tab, set “Data direction” to “output,” and set “Output mode” to “0”. Make sure the “Output readback?” box is checked.


  2. Under the “DeltaV” tab, set “DeltaV data type to “16 bit unit w/Status,” and set the “Dataset Tag” to the desired name. (The one used in the screenshot above is an example but does not necessarily need to be replicated.)


  3. Under the “PLC” tab, set “Device data type” to “8," set “Data start address” to “0," and set “Number of values” to “34."


  4. Ignore the “Special data” tab.

Using the Dataset Scan Control

The Dataset Scan Control uses a series of registers to store bit masking data. This bit masking data controls which Datasets can and cannot be scanned by the VIM. The Dataset Scan Control is divided into four sections:

1. Registers 1-8 are designated for scan control trigger bits.

2. Registers 9-16 are designated to specify if a dataset is to be scanned based on scan control.

3. Registers 17-24 are designated to hold the extended timeout value.

4. Registers 25-32 are designated to completely disable the scan of selected dataset.

5. Registers 33-34 are designated to completely disable the device at the IP address level (Maximum IP addresses is 32 in Simplex mode).

The tables below describe each of the register ranges in detail and their respective functions within the Dataset Scan Control.


Dataset Scan Trigger Registers (R1-R8)

The registers R1-R8 are used as a bit mask. A bit set to 1 by the DeltaV Control Module triggers a scan of the corresponding dataset. By default, all bits are 0. On a normal scan completion or a timeout, the bit is reset to 0. Bit 1 of the register corresponds to Dataset 1 and bit 16 corresponds to Dataset 16. Bits corresponding to unconfigured datasets are ignored.

R1

Controls all 16 datasets in Simplex C57 Port 1 or C61 Port 1, and Redundant C57/58 Port 1.

R2

Controls all 16 datasets in Simplex C57 Port 2 or C61 Port 2, and Redundant C57/58 Port 2.

R3

Controls all 16 datasets in Simplex C58 Port 1 or C62 Port 1, and Redundant C59/60 Port 1.

R4

Controls all 16 datasets in Simplex C58 Port 2 or C62 Port 2, and Redundant C59/60 Port 2.

R5

Controls all 16 datasets in Simplex C59 Port 1 or C63 Port 1, and Redundant C61/62 Port 1.

R6

Controls all 16 datasets in Simplex C59 Port 2 or C63 Port 2, and Redundant C61/62 Port 2.

R7

Controls all 16 datasets in Simplex C60 Port 1 or C64 Port 1, and Redundant C63/64 Port 1.

R8

Controls all 16 datasets in Simplex C60 Port 2 or C64 Port 2, and Redundant C63/64 Port 2.


Controlled Dataset Registers (R9-R16)

The registers R9-R16 are a bit mask specifying if a dataset is part of the scan control mechanism. A bit value of 0 implies that the corresponding dataset is not part of the scan control (0 by default). Such a dataset will be scanned continuously. If a bit is set to 1, then the dataset will be scanned only if the corresponding bit in registers R1-8 is also set. The VIM does not change the value of registers R9-R16.

R9

Enables/Disables scan control of all 16 datasets in Simplex C57 Port 1 or C61 Port 1, and Redundant C57/58 Port 1.

R10

Enables/Disables scan control of all 16 datasets in Simplex C57 Port 2 or C61 Port 2, and Redundant C57/58 Port 2.

R11

Enables/Disables scan control of all 16 datasets in Simplex C58 Port 1 or C62 Port 1, and Redundant C59/60 Port 1.

R12

Enables/Disables scan control of all 16 datasets in Simplex C58 Port 2 or C62 Port 2, and Redundant C59/60 Port 2.

R13

Enables/Disables scan control of all 16 datasets in Simplex C59 Port 1 or C63 Port 1, and Redundant C61/62 Port 1.

R14

Enables/Disables scan control of all 16 datasets in Simplex C59 Port 2 or C63 Port 2, and Redundant C61/62 Port 2.

R15

Enables/Disables scan control of all 16 datasets in Simplex C60 Port 1 or C64 Port 1, and Redundant C63/64 Port 1.

R16

Enables/Disables scan control of all 16 datasets in Simplex C60 Port 2 or C64 Port 2, and Redundant C63/64 Port 2.


Extended Timeout Time (R17-R24)

The registers R17-R24 store a non-zero number which specifies the message timeout time value to be used, instead of the default port level timeout. The time units are 5 seconds per count. If the register contains a 2, then all datasets under the corresponding port will timeout after 10 seconds. The maximum value can be 65535, which amounts to a timeout of 91 hours.

R17

Timeout value for Simplex C57 Port 1 or C61 Port 1, and Redundant C57/58 Port 1.

R18

Timeout value for Simplex C57 Port 2 or C61 Port 2, and Redundant C57/58 Port 2.

R19

Timeout value for Simplex C58 Port 1 or C62 Port 1, and Redundant C59/60 Port 1.

R20

Timeout value for Simplex C58 Port 2 or C62 Port 2, and Redundant C59/60 Port 2.

R21

Timeout value for Simplex C59 Port 1 or C63 Port 1, and Redundant C61/62 Port 1.

R22

Timeout value for Simplex C59 Port 2 or C63 Port 2, and Redundant C61/62 Port 2.

R23

Timeout value for Simplex C60 Port 1 or C64 Port 1, and Redundant C63/64 Port 1.

R24

Timeout value for Simplex C60 Port 2 or C64 Port 2, and Redundant C63/64 Port 2.


Dataset Scan Disable (R25-32)

The registers R25-R32 are a bit mask specifying if the scan of a dataset has been completely disabled. A bit value of 0 implies the corresponding dataset is part of the scan, either controlled or continuous. Note that the values are 0 by default. If a bit is set to 1, then the dataset will not be scanned. Instead, an error will be reported to DeltaV Diagnostics indicating the dataset state (“Disabled Dataset via Scan Control”). This way the datasets of one or more devices may be removed from the scan if the devices are down for maintenance. Scan of all other devices will continue to function normally. The VIM does not change the value of registers R25-R32.

R25

Enables/Disables scan of all 16 datasets in Simplex C57 Port 1 or C61 Port 1, and Redundant C57/58 Port 1.

R26

Enables/Disables scan of all 16 datasets in Simplex C57 Port 2 or C61 Port 2, and Redundant C57/58 Port 2.

R27

Enables/Disables scan of all 16 datasets in Simplex C58 Port 1 or C62 Port 1, and Redundant C59/60 Port 1.

R28

Enables/Disables scan of all 16 datasets in Simplex C58 Port 2 or C62 Port 2, and Redundant C59/60 Port 2.

R29

Enables/Disables scan of all 16 datasets in Simplex C59 Port 1 or C63 Port 1, and Redundant C61/62 Port 1.

R30

Enables/Disables scan of all 16 datasets in Simplex C59 Port 2 or C63 Port 2, and Redundant C61/62 Port 2.

R31

Enables/Disables scan of all 16 datasets in Simplex C60 Port 1 or C64 Port 1, and Redundant C63/64 Port 1.

R32

Enables/Disables scan of all 16 datasets in Simplex C60 Port 2 or C64 Port 2, and Redundant C63/64 Port 2.

As an example, if the value 3 (bit mask: 0000 0000 0000 0011) is written to R25 of the Dataset Scan Control, Datasets D01-D02 would not be scanned by the VIM, while Datasets D03-D16 would continue to be scanned as normal.

Device Scan Disable (R33-34)

R33-R34 bits comprise a mask specifying if a device is enabled or disabled. R33 represents devices 1-16, and R34 represents devices 17-32. A bit value of 0 implies that the corresponding device is enabled (default value), and a bit value of 1 represents a disabled device. Bit 1 of the R33 corresponds to Device 1, and bit 16 corresponds to Device 16. Similarly, bit 1 of R34 corresponds to Device 17, and bit 16 corresponds to Device 32. The bit number is the device creation order in the VimNet Explorer. It is called the Network Index in the Vimnet Explorer, VIM level display. Specifically, the first device created is controlled by R33 bit 1. The second device created is controlled by R33 bit 2, etc.

The VIM will attempt to connect to all enabled devices and not connect to disabled devices. Setting a bit while the VIM is online will cause the device to be disconnected. If a bit is set to 1, all datasets in the device will report an error to DeltaV Diagnostics indicating the device state (“Disabled Device”).

Register Controlled Devices

33 Devices 1-16

34 Devices 17-32

Troubleshoot

If you have any questions or concerns regarding this procedure, you can contact the MYNAH Support Team by opening a Support Ticket at MYNAH.com using your account. http://www.mynah.com/knowledge-base/my-account-mynahcom-features-and-directions