The Modbus Slave PLC Device Tag
represents a virtual Modbus Device that can be polled by external drivers.
The Modbus Slave PLC Device Tag supports the configuration properties of the Common Core Tag, plus these properties:
Property | Type | Version | Description |
---|---|---|---|
Channel | Reference | 3.10 | The Modbus Slave Communication Channel to the device. |
Address | USINT | 3.10 | The Modbus unit address of the device. |
WordOrder | USINT | 3.10 |
For multi-word tags, the order of words:
|
CoilCount | UDINT | 3.82 |
The number of coils in the
Modbus Slave Device.
|
DiscreteInputCount | UDINT | 3.82 |
The number of discrete inputs in the
Modbus Slave Device.
|
InputRegisterCount | UDINT | 3.82 |
The number of input registers in the
Modbus Slave Device.
|
HoldingRegisterCount | UDINT | 3.82 |
The number of holding registers in the
Modbus Slave Device.
|
The Modbus Slave PLC Device Tag supports the data properties of the Common Core Tag, plus these additional properties:
Property | Type | Description |
---|---|---|
State | UINT | The current state of the Virtual PLC. |
StateDescription | WSTRING | A string that describes the current state of the Virtual PLC. |
EventCount | UDINT | The number of Modbus commands successfully processed, excluding poll commands and fetch event counter commands. This value is also returned in the second word of the response to Modbus command 11 (Read comm event counter). |
MessageCount | UDINT | The number of Modbus messages received by the Virtual PLC. This value is also returned by Modbus Command 08 (Diagnostics) using sub-function 14 (Slave Message Count). |
ExceptionCount | UDINT | The number of Modbus exceptions returned by he Virtual PLC. This value is also returned by Modbus Command 08 (Diagnostics) using sub-function 13 (Bus Exception Count). |
The Modbus Slave PLC Tag does not support any tag commands.
The Modbus Slave Data Map is a text file to define the relationship between:
For example, you can map Holding Register 40001 to an I/O Analog Data Point Tag associated with a PLC. How the virtual PLC responds to external requests is shown in this table:
External Request | Virtual PLC Response |
---|---|
Read holding register 40001 | The value of the I/O Analog Data Point Tag is returned. |
Write holding register 40001 | The write command is forwarded to the PLC via the I/O Analog Data Point Tag. |
BOOL "0005" %"Digital-Tag-1";
BOOL "40001.1" %"Digital-Tag-2";
WORD "40002" %"Analog-Tag-1" Scale 655.35;
REAL "40003" %"Analog-Tag-2";
WORD "40005" %"Word-Tag-1";
DWORD "40005" %"DWord-Tag-1";
To edit the data map, do one of the following:
In either case the Data Map Editor will open.
The syntax of the data map is:
data-map ::=
data-binding *
data-binding ::=
data-type data-address tag-reference ['Offset' offset-value] ['Scale' scale-value];
data-type ::=
BOOL | SINT | USINT | BYTE | INT | UINT | WORD | DINT | UDINT | DWORD |
LINT | ULINT | LWORD | REAL | LREAL | TIME | TIME_OF_DAY | TOD | DATE | DATE_AND_TIME | DT;
data-address ::=
'"' address-value '"'
tag-reference ::=
'%' '"' address-value '"'
offset-value ::=
integer | real | time
scale-value ::=
integer | real
The Modbus Slave Device Tag builds on the features of these tag types:
For a description of how Modbus data addressing works in Fernhill SCADA.
Common Core TagFor properties common to all tag types.
Modbus Slave Serial Communication ChannelFor more information on serial communications to the Modbus Virtual PLC Device.
Modbus Slave TCP Communication ChannelFor more information on TCP/IP communications to the Modbus Virtual PLC Device.
For the meaning of terms used in Fernhill SCADA.