IEC60870-5-104 Ethernet
Review the following information for setting up and configuring the IEC60870-5-104 Ethernet driver. The driver connects to an IEC 60870-5-104 outstation as a master (client) over TCP.
Note: This driver is experimental. Some features might not work as expected.
Litmus Edge compatible series
Compatibility parameter | Compatible items |
|---|---|
Driver type | Ethernet |
Device standard | IEC 60870-5-104 |
To set up and configure this device in Litmus Edge (LE), do the following:
- Step 1: Set up and configure the PLC device
- Step 2: Set up the PLC device in Litmus Edge DeviceHub
- Step 3: Configure the list of registers
Step 1: Set up and configure the PLC device
If the device is configured for Ethernet access, find its network parameters. Otherwise, use software on your computer to configure the device for Ethernet access.
Also note the ASDU common address of the outstation. You enter it as StationId in Step 2.
Step 2: Set up the PLC device in Litmus Edge DeviceHub
Configure the following parameters when you Connect a DeviceConnect a Device with this driver. Update default values to the specific setup of your device.
Parameter | Value |
|---|---|
Type | IEC |
Driver | IEC60870-5-104 Ethernet |
NetworkAddress | The IP address of the outstation you defined in Step 1. Default value 192.168.0.1 |
NetworkPort | The TCP port of the outstation. Enter a value from 0 to 65535. Default value 2404 |
StationId | The ASDU common address of the outstation. Enter a value from 1 to 65534. Default value 1 |
OriginatorAddress | The originator address sent in the cause of transmission. Enter a value from 0 to 255. Default value 0 |
GI send period, sec | How often the driver repeats the general interrogation and counter interrogation, in seconds. Enter a value from 1 to 2678400. Default value 60 |
The following parameters are under Advanced Parameters.
Parameter | Value |
|---|---|
ReadTimeout | How long the driver waits for a response, in milliseconds. Enter a value from 10 to 10000. Default value 2000 |
RetryCount | The number of times a failed request is retried. Enter a value from 0 to 5. Default value 0 |
PauseBetweenRetries | The pause between retries, in milliseconds. Enter a value from 0 to 2000. Default value 0 |
KeepAlive | The TCP keep-alive interval, in seconds. Enter a value from 0 to 7200. Enter 0 to disable keep-alive. Default value 5 |
For the Meta Data, Status Register, and Optional Settings options, see Connect a DeviceConnect a Device.
How the driver receives data
This driver does not poll. A tag gets a value only when the outstation sends one.
- When the driver connects, it sends a clock synchronization, a general interrogation (GI), and a counter interrogation (CI). It then repeats the GI and CI every GI send period, sec. If the previous GI or CI has not finished, the driver waits before it sends the next one.
- The driver publishes each value it receives to the tag with the same type ID and information object address (IOA). If there is no such tag, the driver publishes the value to the tag of the other variant of the same type, for example M_SP_TB_1 instead of M_SP_NA_1.
- The tag status comes from the quality bits of the value. For time-tagged types (_TB_, _TD_, _TE_, _TF_), the timestamp is the source timestamp sent by the outstation.
Step 3: Configure the list of registers
When you Add a TagAdd a Tag to the connected device, see the following register table and tag parameters. This driver does not support browsing tags.
See the following additional resources if necessary:
- Organize Device and Tag Data by Using MetadataOrganize Device and Tag Data by Using Metadata
- Tag Formula VariablesTag Formula Variables
Register table
The register name is the IEC type ID. The address is the information object address (IOA), from 0 to 16777215.
- Monitor registers (M_*) are read-only. They receive values sent by the outstation.
- Command registers (C_*) are write-only. A write sends a direct-execute command. The driver never publishes values for command registers.
Name | Value Types | Access Type | Address Format | Min Address | Max Address | Description |
|---|---|---|---|---|---|---|
M_SP_NA_1 | bit | R/O | DDDDDDDD | 0 | 16777215 | Single point |
M_SP_TB_1 | bit | R/O | DDDDDDDD | 0 | 16777215 | Single point with time tag |
M_DP_NA_1 | byte | R/O | DDDDDDDD | 0 | 16777215 | Double point |
M_DP_TB_1 | byte | R/O | DDDDDDDD | 0 | 16777215 | Double point with time tag |
M_ST_NA_1 | byte | R/O | DDDDDDDD | 0 | 16777215 | Step position |
M_ST_TB_1 | byte | R/O | DDDDDDDD | 0 | 16777215 | Step position with time tag |
M_BO_NA_1 | dword | R/O | DDDDDDDD | 0 | 16777215 | Bit string of 32 bits |
M_BO_TB_1 | dword | R/O | DDDDDDDD | 0 | 16777215 | Bit string of 32 bits with time tag |
M_ME_NA_1 | float | R/O | DDDDDDDD | 0 | 16777215 | Measured value, normalized |
M_ME_TD_1 | float | R/O | DDDDDDDD | 0 | 16777215 | Measured value, normalized, with time tag |
M_ME_NB_1 | int16 | R/O | DDDDDDDD | 0 | 16777215 | Measured value, scaled |
M_ME_TE_1 | int16 | R/O | DDDDDDDD | 0 | 16777215 | Measured value, scaled, with time tag |
M_ME_NC_1 | float | R/O | DDDDDDDD | 0 | 16777215 | Measured value, short float |
M_ME_TF_1 | float | R/O | DDDDDDDD | 0 | 16777215 | Measured value, short float, with time tag |
M_IT_NA_1 | custom | R/O | DDDDDDDD | 0 | 16777215 | Integrated totals |
M_IT_TB_1 | custom | R/O | DDDDDDDD | 0 | 16777215 | Integrated totals with time tag |
C_SC_NA_1 | bit | W | DDDDDDDD | 0 | 16777215 | Single command |
C_SC_TA_1 | bit | W | DDDDDDDD | 0 | 16777215 | Single command with time tag |
C_DC_NA_1 | byte | W | DDDDDDDD | 0 | 16777215 | Double command |
C_DC_TA_1 | byte | W | DDDDDDDD | 0 | 16777215 | Double command with time tag |
C_RC_NA_1 | byte | W | DDDDDDDD | 0 | 16777215 | Regulating step command |
C_RC_TA_1 | byte | W | DDDDDDDD | 0 | 16777215 | Regulating step command with time tag |
C_BO_NA_1 | dword | W | DDDDDDDD | 0 | 16777215 | Bit string of 32 bits command |
C_BO_TA_1 | dword | W | DDDDDDDD | 0 | 16777215 | Bit string of 32 bits command with time tag |
C_SE_NA_1 | float | W | DDDDDDDD | 0 | 16777215 | Set point command, normalized value |
C_SE_TA_1 | float | W | DDDDDDDD | 0 | 16777215 | Set point command, normalized value, with time tag |
C_SE_NB_1 | int16 | W | DDDDDDDD | 0 | 16777215 | Set point command, scaled value |
C_SE_TB_1 | int16 | W | DDDDDDDD | 0 | 16777215 | Set point command, scaled value, with time tag |
C_SE_NC_1 | float | W | DDDDDDDD | 0 | 16777215 | Set point command, short float |
C_SE_TC_1 | float | W | DDDDDDDD | 0 | 16777215 | Set point command, short float, with time tag |
Tag parameters
- Name: Select a register name from the drop-down list. The available options depend on the names in the register table.
- Value Type: Select a data type from the drop-down list. The available options depend on the register name selected.
- Address: Enter the information object address (IOA) in decimal format, from 0 to 16777215. Omit leading zeros.
- String Encoding (Optional): For M_IT_NA_1 and M_IT_TB_1 only. Select UTF-8, Shift-JIS, or Windows-1251. Default value UTF-8.
- Tag Name: Enter a name for the tag.
- Description (Optional): Enter a description for the tag.
- Tag Formula: Enter a formula for the tag to process the generated data. You can use two variables: value (current tag value) and timestamp (current tag UNIX time in milliseconds). The following math functions are available:
- sin
- cos
- sqrt
- tan
- power: power(x) performs the operation 10^x.
- log: log(x) is the natural logarithm (the logarithm is in base e).
- exp: exp(x) performs the operation e^x.
- Only Publish on Change of Value: Select the checkbox to publish NATS messages only when the value parameter changes. Change of Value only applies to boolean, numeric (such as int or float), and simple string data types. It does not apply to complex types, such as JSON or array.
- Meta Data: Define key-value pairs to add to the device output payload.
Note: If you use special characters in metadata key names, the special characters are replaced with underscore characters in the payload. This can cause two key names to be combined into one. For example, configuring the key names a**b and a&&b creates only one key name (a__b).