Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

IEC 60870-5-104 Slave | Configuration

Accessing the I/O Interface Configuration

The IEC 60870-5-104 slave communication protocol can be configured in the I/O Interface Configuration tool that can be opened from the HYPERSIM ribbon.

For more information on the general use of the I/O Interface Configuration, see I/O Interface Configuration.

General Description

The IEC 60870-5-104 master device connected to the simulated slave can perform the following requests:

  • Send 'General interrogation command' to read the entire database
  • Send 'Control command' to change the values of the different supported data types
  • Send 'Parameter control command' to change the parameters of normalized, scaled and floating points measurands (i.e. minimum value, threshold value, etc.)
  • Send 'Polling requests command' to retrieve the data from a specific group of points
  • Send 'Clock synchronization command'

Each configured point is associated to a specific data group. This group can be the 'Cyclic' group (‘C’) or a number between 1 and 16. When a point is attached to the 'Cyclic' group, its value will be reported to the master at the configured cyclic message interval rate. When a point is attached to a group number, its value will be reported to the master only if the master polls for the data of the point’s group. By default, all registered points are also attached to the 'General' group (0). This means that if the master sends a 'General interrogation command', it will receive the value of all the registered points. If required, a point can be only attached to the 'General' group. This can be done by setting its group number to be 0.

It is also possible to enable an event scan for each of the supported data types. In this case, single points, double points, regulating steps and bitstring value changes will be spontaneously reported to the master. The rate at which the database is scanned for changes is configurable. The maximum number of events that can be recorded is also configurable.

When working with normalized, scaled or floating points, a spontaneous change in value of a point is reported to the master only if:

  • The new value is lower than the low limit parameter configured for the specific point
  • The new value is higher than the high limit parameter configured for the specific point
  • The change in value is higher than the threshold parameter configured for the specific point

During the simulation, the master can dynamically use the parameter address to change the threshold, smoothing, low limit and high limit values of a given point.

To summarize, there are four different situations when a point value is reported from the IEC 60870-5-104 slave to the IEC 60870-5-104 master:

  • The point is only attached to the 'General' group (0) and the master sends a 'General interrogation command'
  • The point is attached to a specific group number and the master sends a poll request to read this specific data group 
  • The point is attached to the 'Cyclic' group (C)
  • Event scan is enabled for a given data type and a spontaneous change of value event occurs

All these situations are valid for both input and output points. In the case of data being reported by a spontaneous change event, the timestamp of the data change is also reported to the master.

Note that it is possible to configure a single point input at the same address as a single point output. In this case, the value applied to the corresponding input will appear at the corresponding output. It is the equivalent of having the point configured as an internal loopback. In this case, if the master attempts to set a specific value at the address of this single point, the change will not be effective since the value will always be overwritten by the input value.

It is also optionally possible to enable RMS calculation on the floating point outputs before being sent to the master.

General Configuration

The IEC 60870-5-104 slave I/O interface is configured within a few pages. The first page contains some generic configurations.

Use a RT core for asynchronous computationIf set to "true", the driver will reserve a real-time CPU core for its communication system and will be able to handle a bigger amount of slaves and data points. If set to "false", the communication system will default to core 0.
Enable verbose modeIf enabled, additional information will be displayed into HYPERSIM log.
Enable virtual modeIn virtual mode, the model can be executed even if this I/O interface is not compatible with the hardware configuration of the system. The connections between the model and the I/O interface will be done during the initialization, but the I/O interface will not do anything.




The virtual mode can be used to troubleshoot problems on a system without having the required hardware, or to prepare a model with different I/O interfaces even if the final hardware platform is not available.

Slave Configuration

When creating a new IEC 60870-5-104 slave driver configuration, one slave is preconfigured with the following settings that can be changed:

Protocol

Only ‘TCP’ is available for the moment.

TCP portSpecify the TCP communication port. If multiple IEC-60870-5-104 slave are simulated in the same model on the target IP address, the TCP port used for each device must be different. However, the TCP ports can be the same if the slave are using IP aliases. In all cases, the 'ASDU address' must always be different from one slave device to another.
Ethernet adapter

The network interface name. The proper interface name should be selected based on the information given by the linux command "ifconfig".

IP addressSpecify the IP address of the slave device. This parameter can be set to AUTO or to the target IP address if the simulated IEC-60870-5-104 slave does not need to have a specific IP address. In this case, the IEC-60870-5-104 master will be able to reach the IEC-60870-5-104 slave using the target IP address. If multiple IEC-60870-5-104 slave are simulated in the same model on the target IP address, the ‘TCP port’ used for each device must be different. If another IP address is specified, the device driver will attempt to create an IP alias on the network interface and attach the IEC-60870-5-104 slave to this alias. In this case, the master will be able to reach the slave using the alias IP address. This functionality is interesting to simulate different IEC-60870-5-104 slave in the same model and have each of them being reachable using their own IP address. To avoid network conflicts, an error will be returned if the IP address is already used on the network. In all cases, the 'ASDU address' must always be different from one slave device to another.
ASDU addressSpecify the Application Service Data Unit address (1-255). Must always be different from one slave device to another.
COT size (byte)Specify the number of octets of the COT field (1 or 2). The master has to select the same COT field size to communicate with the slave device.
Thread delay (ms)Specify the thread delay, in milliseconds. Writing a value from the model to the IEC-60860-5-104 slave database involves multiple operations to manage event recording and data timestamping. In order to avoid adding non-deterministic delay to the simulation, the dedicated thread is responsible of reading all the values from the model and updating the database accordingly. This parameter can be modified to tune the thread frequency. It represents the delay, in milliseconds, between each thread iteration. During each iteration, all the outputs are read from the memory space and the values are written into the database through the event manager. The delay is applied at the end of the iteration. Depending on the application requirements, it is possible to set this parameter to zero. However, as the thread is running on CPU core 0, it is suggested to set the delay to a minimum of 1 millisecond to give a chance to the other threads running on this core to have some computing time.
Cyclic message interval (ms)Specify the 'Cyclic' group message interval in milliseconds. This is the rate at which the IEC-60870-5-104 slave will report the value of the data attached to the 'Cyclic' group.
Event scan (ms)Specify the 'Cyclic' group message interval in milliseconds. This is the rate at which the IEC-60870-5-104 slave will report the value of the data attached to the 'Cyclic' group.
Event buffer sizeEach data type has a buffer to register data changes. This parameter control the maximum number of event that can be recorded for each data types. If the buffer is not large enough to record all the changes of a given data type, the oldest events will be discarded.
Single point event scanWhether or not event scan is enabled for the single points. If disabled, single points spontaneous data changes will not be reported to the master.
Double point event scanWhether or not event scan is enabled for the double points. If disabled, double points spontaneous data changes will not be reported to the master.
Regulating step event scanWhether or not event scan is enabled for the regulating points. If disabled, regulating steps spontaneous data changes will not be reported to the master.
Bitstring event scanWhether or not event scan is enabled for the bitstrings. If disabled, bitstrings spontaneous data changes will not be reported to the master.
Normalized event scanWhether or not event scan is enabled for the normalized values. If disabled, normalized values data changes will not be reported to the master.
Scaled event scanWhether or not event scan is enabled for the scaled values. If disabled, scaled values data changes will not be reported to the master.
Floating event scanWhether or not event scan is enabled for the floating point values. If disabled, floating point values data changes will not be reported to the master.
Disable timestamp checkDisable the timestamp check when responding to the master’s time tag commands. This will force the command reception and acknowledge from the slave.
Maximum command age (ms)This value represents the maximum delta at which time tag commands will be accepted. If a command is received with a time older than the simulator's current time minus the value specified in this field,  the command will be discarded, with no response sent.

Single Points, Double Points, Regulating Steps and Bistrings Configuration

For each slave, data points can be added/removed for every specific data type. Each data point has its own configuration. The configuration for single points, double points, regulating steps and bistrings is similar.

Direction

Can be either an input or an output. An input is a data written by the master to be used within the simulation model. An output is a data controlled by the simulation and transmitted to the master.

NameSpecify a name for the data point. This name will be used to assign a configured data point to a sensor. It is very important to carefully the name of each data points since they will be used in the sensor view to select which point to connect to the simulation.
Data addressSpecify the address of the data point. This address can be used by the master to control or read the value of this point.
Data groupSpecify the data group of the data point. To assign a point to the 'General' group only, set the group to '0' for this point. To attach a point to the 'Cyclic' group, set the group to 'C' for this point. Otherwise, set the group to the desired number (1-16).
Data valueSpecify the initial value of the data point. If the point is configured as an input, this value will be applied to the data point before a master connects with the slave and send a command to change the value of the data point. If the point is configured as an output, this field is unused since the value will be configured by the sensor assigned to this data point, in the simulation.

Normalized Points and Scaled Points Configuration

For normalized and scaled data points, the direction, name, data address, data group and data value fields are the same as for the other data types explained previously. They also have some additional configuration fields. 

Threshold addressSpecify the address of the threshold parameter for this data point. This address can be used by the master to change the threshold of this data point dynamically during the model execution by sending a 'Parameter control command'.
Threshold valueSpecify the initial value of the threshold parameter for this data point. If event scan is enabled for this specific data type, data will be reported to the master if this threshold is crossed within two consecutive value change.
Smoothing addressSpecify the address of the smoothing parameter for this data point. This address can be used by the master to change the smoothing of this data point dynamically during the model execution by sending a 'Parameter control command'.
Smoothing valueSpecify the initial value of the smoothing parameter for this data point.
Low limit addressSpecify the address of the low limit parameter for this data point. This address can be used by the master to change the low limit of this data point dynamically during the model execution by sending a 'Parameter control command'.
Low limit valueSpecify the initial value of the low limit parameter for this data point. If event scan is enabled for this specific data type, data will be reported to the master if the value is under the low limit parameter.
High limit addressSpecify the address of the high limit parameter for this data point. This address can be used by the master to change the high limit of this data point dynamically during the model execution by sending a 'Parameter control command'.
High limit valueSpecify the initial value of the high limit parameter for this data point. If event scan is enabled for this specific data type, data will be reported to the master if the value is over the high limit parameter.

Floating Points Configuration

Floating data points (outputs) also use the same parameters as previously described and have some additional configuration fields.

Enable RMS computationEnable or disable RMS computation for this output floating point. When enabled, RMS value will be computed on the configured number of samples before being reported to the master.
RMS GainSpecify a gain to be applied on the sampled before computing the RMS value.
RMS Sample Size:Specify the number of consecutive samples that will be used to compute the RMS value before reporting it to the master.


OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter