Modbus Ip
This driver supports communication over Ip with Modbus field devices.
In all exchanges, PcVue is the master and the field device is the slave.
If you need the field device to be master and PcVue to be slave, you should use the Modbus Ip Slave driver instead.
The driver also has preconfigured sets of frames for communication with:
-
Wago DALI controllers
Supported functions
The following function codes are supported.
Decimal |
Hex |
Function |
1 |
0x01 |
Read coil status |
2 |
0x02 |
Read input status |
3 |
0x03 |
Read holding registers |
4 |
0x04 |
Read input registers |
5 |
0x05 |
Force single coil |
6 |
0x06 |
Force single register |
15 |
0x0F |
Force multiple coils |
16 |
0x10 |
Force multiple registers |
65 |
0x41 |
Extended read coil status |
66 |
0x42 |
Extended read input status |
67 |
0x43 |
Extended read holding registers |
68 |
0x44 |
Extended read input registers |
69 |
0x45 |
Extended force single coil |
70 |
0x46 |
Extended force single register |
79 |
0x4F |
Extended force multiple coils |
80 |
0x50 |
Extended force multiple registers |
Prerequisites
Open Modbus Master for Wago DALI is a specific implementation of Modbus TCP/IP with specially formatted frames.
DALI (Digital Addressable Lighting Interface) is a protocol used for standardized control of electronic ballasts in lighting applications.
The Wago DALI module (750-641) can control up to 64 DALI slaves (also known as ballasts) connected on a single line. Each slave can be assigned to 16 individual groups or 16 individual scenes. Addressing, allocating and parameter changes to the slaves is made using an IEC 61131-3 program running on a Wago programmable coupler.
PcVue provides connectivity to the Wago DALI module using a Wago programmable Ethernet controller (750-851) and the Modbus TCP/IP protocol. The programmable controller must run a specific program (SVDALIDRV) available from Wago. A single Ethernet controller can be connected to up to five DALI modules.
To configure PcVue for connection to the DALI module you must select the equipment type WAGO_DALI (see below).
Network properties
This topic only includes a reference of objects' properties.
See the topic How to configure networks devices and frames for more information about how to configure communication objects.
General properties | |
Name | The name of the network |
Description | The description of the network (optional) |
Activate at start-up | If enabled, the network will start upon Equipment communication start-up |
Advanced properties |
|
Timeout |
Use default value |
Networking |
|
Servers |
The list of PcVue stations where the network will be active |
Device properties
General properties | |
Name | The name of the device |
Description | The description of the device (optional) |
Equipment type | Select the type of equipment that best suits the field device you want communicate with. The list of frame types and address ranges depend on the equipment type. |
With the Modbus Ip driver, the property Equipment type allows you to select between Modbus and Jbus addressing, decimal and hexadecimal encoding of memory addresses. Modbus frame addresses start at 1, Jbus frame addresses start at 0. |
Address | The Ip address of the field device. Some drivers also support configuration by host name. |
Slave address | The Modbus slave address of the field device |
Activate at start-up | If enabled, the device will start upon network start-up |
Advanced properties |
|
Connection |
|
Timeout |
Maximum waiting time between a request and the reply from the equipment |
Port number |
The port number of the field device |
Shared connection |
Connection sharing is normally used when communicating with a Modbus gateway with a single Modbus TCP/IP connection on one side and several serial Modbus devices on the other. Sharing the connection allows a single TCP/IP address and Port to be used to communicate with several Modbus devices. If connection sharing is not enabled then each connection requires its own TCP port. When you use connection sharing, communication is managed serially. That is communication with one device (send and reply) must be completed before communication with the next device is started. The disadvantage of this method is that if one device is faulty, the communication is delayed to all the other devices while the connection times out. A connection on the TCP/IP side will only be restarted if all shared connections time out. By default, shared connections are allocated to a single group (group 0), and a single connection to a gateway typically allow communication with one or more PLC field devices. If you have more than one Modbus gateway, you should allocate all devices accessible via a given Modbus gateway to the same group by the setting the Group number property to the same value. If you allocate shared connections to different groups this way, the connection on the TCP/IP side is restarted if all shared connections within the group time out. It is normal practice to configure one group for each physical connection on a gateway. |
Close connection on passive server | If enabled, the connection is closed on passive servers. This property only applies if the network the device is associated to has a server list defined with an association (for redundancy) |
Apply a fixed timeout | Ensures that the time-out handling is strictly followed (as configured at the device level) when establishing the connection and, if need be, before declaring the equipment unreachable. |
Close socket using FIN ACK | Allows to close socket connection using the FIN ACK instruction. The one used by default is RST ACK. |
Reconnect period |
Minimum period between attempts to recover a connection. This period is also used as a waiting period after a time-out. |
Timestamping |
|
Enable |
Tick to enable field device timestamping mode |
Error address | If timestamping is enabled, the address used to indicate a full stack. Must be set to a positive value (greater than 0). |
Timestamp UTC | Specify if the field device transmits timestamps as UTC or as local time |
Delta TS |
Used to set-up direct archiving. If the difference between the timestamp coded in a received timestamped block and the current time is greater than the Delta TS value, the data is sent directly for archiving but is not considered fresh enough to be used as instantaneous value. As a consequence, the value of the corresponding variable is not updated. |
Modbus addressing | If enabled, addresses found in timestamp blocks are interpreted as Modbus addresses (as opposed to Jbus addresses) |
Redundancy groups |
|
Switch back automatically to primary connection |
Enables automatic selection of the highest priority connection. This mechanism has been implemented to support redundant connections that have varying quality and cost of service. If not enabled, there is no mechanism to automatically return to the failed connection once it is restored. |
Redundancy connection n |
Allows the configuration of up to 5 additional field devices to provide redundant behavior for an item of equipment. When the application starts, the communication manager communicates with the primary device. When an error occurs, it switches to the next device in the sequence. Learn how to control redundant device operation with SCADA Basic. For each device with redundant configuration, you can manage the operation using register variables linked to frames of type Command and Information (see below). |
Number of retry before switch |
Defines the number of retries before attempting to connect to the next redundant field device. On the first connection at communication start-up, or after a fault on one of the redundant equipments, the configured number of retries is applied before attempting to connect to the next equipment. If both fail, only single connection attempts are made to subsequent redundant equipments. |
Miscellaneous |
|
Virtual |
Reserved. Do not select. |
Message delay | Reserved. Leave default value 0. |
Interoperability issues - Single write disable |
If enabled, the code function for Single write will not be used (function code 0x0F and 0x10 will be used instead). |
Site serialization - Shared site |
Activates serialization of connections by site. This option is useful when several devices can be reached via the same network path and that this network path requires requests to be serialized.
|
Connection sharing and Site serialization are designed for 2 different and opposite purposes and should not be used together.
Contrary to explanations in the topic Message exchange mechanisms in PcVue, with the Modbus Ip driver, operations when re-establishing a connection to a slave after an error is as follows:
-
On the 1st TCP/IP error – The driver waits for the Reconnection period before trying again. The default value is 10 seconds and can be configured in the Advanced property dialog.
-
On the 2nd TCP/IP error – The driver waits for Time out (default 1 second) before trying again.
-
On the 3rd TCP/IP error – The driver waits for Time out (default 1 second) before trying again.
This sequence is strictly followed for device configured to ensure Fixed time-out, and can be curtailed for devices configured as standard device if the system layer indicates that the connection cannot be open (disconnected network etc.).
Frame addressing
Depending on the equipment type you have selected when configuring the device, you have access to the following type of frames.
The Starting address and Quantity properties define the memory address range for each frame, how it is read from and written to, and how it is interpreted in PcVue.
Equipment type - JBUS_DEC, MODBUS_DEC, JBUS_HEX and MODBUS_HEX - Standard address frames
Data type | Access | Max quantity | Starting address |
Bit | |||
---|---|---|---|
Input bits |
Read |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Worbit Input registers MLsb |
Read |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Coils |
Read/Write |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Worbit Input registers LMsb |
Read |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Worbit Holding registers LMsb |
Read/Write |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Worbit Holding registers MLsb | |||
Text | |||
Byte Input registers LMsb |
Read
|
256 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Byte Input registers MLsb | |||
Byte Holding registers LMsb |
Read/Write |
256 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Byte Holding registers MLsb | |||
Word | |||
Input registers |
Read |
128 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Holding registers |
Read |
128 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Timestamped CEI |
Read/Write |
15 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Timestamped 12b |
Read/Write |
21 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Timestamped 24b |
Read/Write |
18 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Information |
Read |
8 |
0..7 (JBUS_DEC and MODBUS_DEC) 0x0..0x7 (JBUS_HEX and MODBUS_HEX) |
Commands |
Read/Write |
4 |
0..3 (JBUS_DEC and MODBUS_DEC) 0x0..0x3 (JBUS_HEX and MODBUS_HEX) |
Real | |||
Real Input registers LMsb |
Read |
62 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Real Input registers MLsb | |||
Real Holding registers LMsb |
Read/Write |
62 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
Real Holding registers MLsb | |||
Double word | |||
DWord Input registers LMsb |
Read |
62 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
DWord Input registers MLsb | |||
DWord Holding registers LMsb |
Read/Write |
62 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
DWord Holding registers MLsb |
Command and Information frames values
The Command frame is a read/write frame in word format, used to control the redundancy connection and manage connection settings.
- Word 0 - This register is used to force a switch to the corresponding redundant connection (0 to 5) by setting its value within the range 0 to 5. During the connection establishment phase, its value is set to the decimal value 10x, where x is the ID (0 to 5) of the connection.
- Word 1 - This register is used to enable and disable redundant connections in a bitwise manner. Bit 0 corresponds to connection 1, bit 1 to connection 2, and so on. Setting a bit to 0 disables a connection, while setting it to 1 enables it.
- Word 2 - This register is used to set the priority status of specific equipment in the redundancy configuration.
The Information frame is a read-only frame in word format, providing status information about the active connection and redundancy connection.
- Word 0 - This register contains the number of the active connection (0 to 5). During the connection establishment phase, its value is set to the decimal value 10x, where x is the ID (0 to 5) of the connection.
- Word 2 - This register is used to set the priority status of specific equipment in the redundancy configuration.
- Word 3 - This register provides information related to timestamping and archiving of data packets in the redundancy system. Possible states are:
- Bit 0 - Timestamping disabled.
- Bit 1 - Timestamping enabled.
- Word 4 - This register displays the equipment timeout duration in seconds.
- Word 5 - This register displays the current timeout value.
- Word 6 - This register displays the maximum error threshold before switching to redundant mode.
- Word 7 - This register displays the current timeout value.
Equipment type - Reserved dec - Extended address frames
The driver supports extended address frames that use modified start address and number of items to define frames larger than allowed for by the Modbus standard. Larger frames mean you can read larger address spaces in one request and thus minimize the network traffic.
Extended address frames can be configured for device with a equipment type set to Reserved dec.
Extended addressing only works with specific field devices. For further information contact technical support.
Data type | Access | Max quantity | Starting address | Description |
Real | ||||
---|---|---|---|---|
Extd I LM |
Read |
16379 | 0..65535 | Read input registers as IEEE754 real (Least significant byte first) in extended frame |
Extd I ML |
Read input registers as IEEE754 real (Most significant byte first) in extended frame |
|||
Extd I/O LM |
Read/Write |
16379 | 0..65535 |
Read/write holding (output) registers as IEEE754 real (Least significant byte first) in extended frame |
Extd I/O ML | Read/write holding (output) registers as IEEE754 real (Most significant byte first) in extended frame | |||
Byte | ||||
Extd I LM |
Read |
65518 | 0..65535 |
Read input registers as bytes in extended frame |
Extd I ML | Read input registers (Least significant byte first) in extended frame | |||
Extd I/O LM |
Read/Write |
65518 | 0..65535 |
Read/write holding (output) registers as bytes in extended frame |
Extd I/O ML | Read/write holding (output) registers l (Least significant byte first) in extended frame | |||
Bit | ||||
Bi Extd I |
Read |
1048560 | 0..65535 |
Read input status in extended frame |
WB Extd I/O LM |
Read/Write |
65520 | 0..65535 |
Read/write holding (output) registers as bits (Least significant byte first) in extended frame |
WB Extd I/O ML |
Read/write holding (output) registers as bits (Most significant byte first) in extended frame. |
|||
Bi Extd I/O |
Read/Write |
1048560 | 0..65535 |
Read/write coil (output) status in extended frame |
WB Extd I LM |
Read |
65520 | 0..65535 |
Read input registers as bits (Least significant byte first) in extended frame |
WB Extd I ML |
Read input registers as bits (Most significant byte first) in extended frame |
|||
Word | ||||
W Extd I |
Read |
65518 | 0..65535 |
Read input registers in extended frame |
W Extd I/O |
Read/Write |
65518 | 0..65535 |
Read/write output (holding) registers in extended frame |
Double word | ||||
DW Extd I LM |
Read |
16379 | 0..65535 |
Read input registers as double word (Least significant byte first) in extended frame |
DW Extd I ML |
Read input registers as double word (Most significant byte first) in extended frame |
|||
DW Extd I/O LM |
Read/Write |
16379 | 0..65535 |
Read/write holding (output) registers as double word (Least significant byte first) in extended frame |
DW Extd I/O ML |
Read/write holding (output) registers as double word (Most significant byte first) in extended frame |
Equipment type - WAGO DALI v2
This equipment type is used to communicate with WAGO controllers equipped with DALI modules.
You can configure WAGO DALI devices using the Smart Generator made for it.
Data type | Access | Max quantity | Starting address | Description |
Bit | ||||
---|---|---|---|---|
B Group |
Read |
1024 | 1..65535 |
Read ballast group status. The data structure is as follows (where xxxx is the base address):
Bit value: 0 – not part of the group |
B Info |
Read |
448 | 1..65535 | Ballast information |
Word | ||||
B type |
Read |
1 | 1..65535 | Ballast type |
DALI Cfg |
Read |
4 | 1..65535 | DALI configuration |
L Diag |
Read |
2 | 1..65535 | Light diagnostic |
Cmd Mx B |
Read |
64 | 1..65535 | Command ballast x module |
Cmd Mx S |
Read |
16 | 1..65535 | Command scene x module |
Cmd Mx G | Command group x module | |||
B Value |
Read |
1 | 1..65535 |
Ballast real time value. 1 frame per DALI module. The size is fixed at 64 words. The start address corresponds to the Modbus address of the real time value buffer. Refer to the program running in the programmable coupler to obtain the address. The data structure is as follows (where xxxx is the base address):
The value is expressed as a percentage in the range 0 to 100. |
Equipment type - Wago DALI
Data type |
Access |
Description |
Bit |
||
B Group |
Read |
Read ballast group status. The data structure is as follows (where xxxx is the base address):
Bit value: 0 – not part of the group 1 – part of the group |
B Present |
Read |
Read ballast present status. 1 frame for up to 5 DALI modules.The frame size is fixed at 320 bits. The start address corresponds to the Modbus address of the ballast present buffer. Refer to the program running in the programmable coupler to obtain the address. The data structure is as follows (where xxxx is the base address):
Bit value: 0 – not present |
B Status |
Read |
Read ballast status bit. The data structure is as follows (where xxxx is the base address):
Bit value 0 – not OK |
B Fail |
Read |
Read ballast lamp failure status. The data structure is as follows (where is the base address):
Bit value 0 – OK |
B Power |
Read |
Read ballast power status. The data structure is as follows (where is the base address):
Bit value: 0 – Power off |
Word |
||
Cmd Lx B |
Write |
Write ballast command. The data structure is as follows (where is the base address):
Word value:
For a complete set of commands, please refer to the manual for the Wago DALI module. |
Cmd Lx G |
Write |
Write group command. The data structure is as follows (where is the base address):
Word value:
For a complete set of commands, please refer to the manual for the Wago DALI module. |
Cmd Lx S |
Write |
Write scene command. The data structure is as follows (where is the base address):
Word value:
For a complete set of commands, please refer to the manual for the Wago DALI module. |
Real |
||
B Value |
Read |
Ballast real time value. The data structure is as follows (where is the base address):
The value is expressed as a percentage in the range 0 to 100. |
Driver status
The driver status provides driver-specific information to supplement the frame general status. For more information on status in general, refer to the topic General communication status.
Driver status |
Description |
0001 |
Illegal function |
0002 |
Illegal data address in equipment |
0003 |
Illegal data value, wrong size |
0004 |
Slave device failure: the slave cannot reply |
0005 |
Acknowledged: the slave has accepted the request and processing it, but will take a long time |
0006 |
Slave device is busy: the slave is engaged in long processing of a program command |
0007 |
Negative Acknowledge |
0008 |
Memory parity error |
0102 |
Connection closed because of:
|
0000 |
Request time-out |
000A | Gateway path unavailable |
000B | Gateway target device failed to respond (timeout) |
0108 | The response ID does not match the request |
0113 | The device slave address is 0 (Broadcast). It only accepts write requests. If not intended, set the address to a value different to 0. |
SCADA Basic scripting
You can control communication with this driver in SCADA Basic scripts with the CIMWAY instruction.
The driver also supports the following specific capabilities in SCADA Basic.
Changing a device address
IntVal = CIMWAY(CFG, CommObjName, Modif, Param, [, ResultVar]);
Argument |
Meaning |
CommObjName |
Configuration element to modify: A device. |
Modif |
The property you want to modify: |
|
EQT_ADDRESS: Modification of the equipment address. CommObjName is the name of a device attached to the network. For example, Net1.Dev1. |
Param |
Param is a string with a typical syntax like Param1#Param2#Param3...#ParamN. Type STR. See below for the syntax specific to this driver. |
ResultVar |
Specifies the name of the variable where the status of the modification is stored. |
Syntax for Modbus Ip:
slave_address#ip1#ip2#ip3#ip4#tcp_port#ts_erroraddress#flag#reconnection_period#sharing_group_id
Where:
-
slave_address: The slave address
-
ip1 to ip4: The 4 segments of the Ip address
If ip1 is a string, it is the host name and ip2 to ip4 are ignored -
tcp_port: The Tcp port number
-
ts_error_address: The error address for source timestamping
-
flag: Additional properties under the form of a bit mask (0 or 1)
-
bit 1 Reserved (0)
-
bit 2 Interoperability issues - Single write disable (1) or enable (0)
-
bit 3 Reserved (0)
-
bit 4 Timestamp UTC (1) or local (0)
-
bit 5 Timestamp blocks based on Modbus addressing
-
bit 6 Close connection on passive server
-
bit 7 Enable site serialization
-
bit 8 Apply a fixed time-out
-
bit 9 Close socket using FIN ACK
-
-
reconnection_period: The reconnection period
-
sharing_group_id: The sharing group number
If redundant connections are in place, the syntax is as follow:
slave_address#ip1#ip2#ip3#ip4#tcp_port#ts_erroraddress#flag#reconnection_period#redundant_connection_nb#[redundant_connection_id_redn#ip1_redn#ip2_redn#ip3_redn#ip4_redn#tcp_port_redn#slave_address_redn#reserved(set 0)#]sharing_group_id#nb_retry_before_switch#site_serialization_min_connection_id#site_serialization_site_number
Where:
-
Flag - In addition to the bits describe above:
-
bit 1 Connection sharing enabled (1) or disabled (0)
-
bit 3 Switch back automatically to primary connection
-
-
redundant_connection_number: The number of redundant connections (1..5)
-
The part between square brackets [] is repeated for each redundant connection
-
redundant_connection_id_redn: The id of the redundant connection (1..5)
-
-
nb_retry_before_switch: Number of retry before switch
-
site_serialization_min_connection_id: A connection number corresponding to a redundancy equipment Id as defined in Redundant device configuration (1 to 5)
-
site_serialization_site_number: The site number to which the equipment belongs
Sending a control message to the driver
IntVal = CIMWAY (SENDMSG, CommObjectName, CommandString);
Return type: INTEGER.
Argument |
Meaning |
CommObjectName |
Identifies the target object identifier: All networks: Empty string. A specific network: NetworkId. A specific device: NetworkID.EquipmentId. A specific frame: NetworkID.EquipmentId.FrameId. Type STR. |
CommandString |
The command to send to the driver. Type STR. See below for the list of messages supported by the driver. |
Control messages for Modbus Ip:
Control message | Description |
Switching the connection for a redundant PLC configuration |
Command string syntax is "ConnectTo;num" SCADA Basic switching is slower that variable switching, as the command is not sent immediately to the driver (queues along with other requests), but it is flexible and doesn't require the configuration of an extra frame and variable. |
Enable/Disable connection for a redundant PLC configuration |
Command string syntax is "ConnectionDisable;num" to enable the connection number num. This connection is then unavailable for the driver to connect to the device. Command string syntax is "ConnectionEnable;num" to disable the connection number num. This connection is then available for the driver to connect to the device. ComObj must be the name of a device, for example NET.DEV1. If redundant data acquisition servers are in place, the change is only applied on the data acquisition server where the command is executed. |
Enable/Disable timestamping |
Command string syntax is "DisableTS" to disable source timestamping. Command string syntax is "EnableTS" to enable source timestamping. |
Switch all frames to polling mode |
Command string syntax is "SwitchAllToPollingMode" to switch all frames to polling mode. |
ComObj must be the name of a device, for example NET.DEV1. For example, the following command forces a connection to the redundant connection 3 for the device NET1.EQT1: Copy
|
Timestamped Data - Data Table and Block Structures
The timestamped data stack must be located in the holding (output) register table. The table is read using function code 3 and the single word reply is written using function code 6.
Timestamped data table structure
|
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Word W |
Exchange number |
Fbit | Cbit |
Number of blocks (N) |
||||||||||||
Word W+1 |
Start of first block |
|||||||||||||||
Word W+1 |
Start of last block |
-
T = size of timestamped block
-
N = Number of blocks as specified by the timestamp frame's Quantity of data property.
-
W = The starting address as specified by the timestamp frame's Starting address property.
Change caused by the Cbit (Bit 6 of the first word) : If set to 1 then the driver transfers the timestamp block directly to PcVue’s archived data. While it is set the driver also refreshes the real time value by polling of the timestamp enabled frame, thus keeping the real time variable up to date.
Change caused by Fbit (Bit 7 of the first word) : If set to 1 then the driver expects that the exchange number is incremented by the field device. In that case, the driver only processes the block if the exchange number changes from one poll to the next. Otherwise, transmitted blocks are ignored.
Timestamped block with short (12 bit) address (T = 6)
|
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Word W+1 |
Type |
Address |
||||||||||||||
Word W+2 |
Value1 |
|||||||||||||||
Word W+3 |
Value0 |
|||||||||||||||
Word W+4 |
Year |
Month |
Day |
|||||||||||||
Word W+5 |
Hour |
Minute |
||||||||||||||
Word W+6 |
Millisecond |
Timestamped block with long (24 bit) address (T = 7)
|
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Word W+1 |
Reserved |
Type |
Address (bits 23 - 16) |
|||||||||||||
Word W+2 |
Address (bits 15 - 0) |
|||||||||||||||
Word W+3 |
Value1 |
|||||||||||||||
Word W+4 |
Value0 |
|||||||||||||||
Word W+5 |
Year |
Month |
Day |
|||||||||||||
Word W+6 |
Hour |
Minute |
||||||||||||||
Word W+7 |
Millisecond |
Timestamped block with IEC format (T = 8)
|
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Word W+1 |
Reserved |
Type |
Reserved |
|||||||||||||
Word W+2 |
Address (bits 15 - 0) |
|||||||||||||||
Word W+3 |
Value1 |
|||||||||||||||
Word W+4 |
Value0 |
|||||||||||||||
Word W+5 |
Reserved |
0 |
Year |
|||||||||||||
Word W+6 |
0 |
0 |
0 |
0 |
Month |
0 |
0 |
0 |
Day |
|||||||
Word W+7 |
Hour |
Minute |
||||||||||||||
Word W+8 |
Millisecond |
Value0 is the least significant word when reading a 32 bit value (real and double word) and the only significant word when reading 16 bit frames (word, byte and bit).
Value1 is the most significant word when reading 32 bit value (real and double word) and the offset when reading bits.
Coding of the Type field
Type | Data type |
0 | Input status |
1 | Not used |
2 | Input registers |
3 | Not used |
4 | Not used |
5 | Input registers as bits (obsolete) |
6 | Input registers as bits (see note below) |
7 | Real or Double Word input |
8 | Coil status |
9 | Not used |
10 | Holding registers |
11 | Not used |
12 | Not used |
13 | Holding registers as bits (Obsolete) |
14 | Holding registers as bits (See rule below) |
15 | Real or Double Word Input/Output |
Rules for coding the address field for accessing a bit within a word:
-
The Word address is coded in the field Address.
-
The offset of the bit is coded in the field Value1.
-
Example - Wordbit 5 of Word 7220 will be coded as: Address = 7220 and Value1 = 5.
Coding of the date and time fields
Field | Coding |
Year | 0-99 (The number of years since 1980) |
Month | 1-12 |
Day | 1-31 |
Hour | 0-23 |
Minute | 0-59 |
Millisecond | 0-59999 |
There is no field for seconds. Instead, the seconds are included with the milliseconds.