Promotic

PmIEC8705 - Driver for communication by the IEC 60870-5 protocol

This driver serves for communication by the protocol according to the IEC 60870-5 standard.

Before using this driver in the PROMOTIC application it is highly recommended to watch "PROMOTIC video tutorial 4 - Communication drivers".

Basic properties of the driver:
- Usage of this driver requires purchase of the PmIEC8705 licence. When developing the application in the freeware mode PmFree, or with development environment and while testing it in runtime, this component is always functional.
- The communication is done for Ethernet (PROMOTIC application is client) or for serial link (COM1, COM2 ...).
- The IEC 60870-5-101 protocol is used for serial link. It has been implemented for balanced mode transmission. The opposite side is allowed to send the data on change. As for the unbalanced mode, which has not been implemented yet, the communication is based on Master-Slave mode, i.e. the opposite side (Slave) can send the data only as a response to a received query.
- The IEC 60870-5-104 protocol is used for Ethernet. This protocol is able to send for example multiple messages simultaneously and then wait globaly for each message to be confirmed. This way a high communication speed can be achieved, while each message does not have to wait for finishing (confirmation) of previous message.
So far only the client type side has been implemented. It means that the PROMOTIC application can estabilish the TCP connection with the opposite site, which acts as server.
- The driver is incorporated into the PROMOTIC system by means of the PmaComm object.
The driver supports the usage of both PmaCommMsg and PmaCommGroup objects. For common case of the data transfer, it is better to use the PmaCommGroup object.
For easy integration of this driver into the application it is handy to use: Preconfigurations in group "IEC8705"


Recommended values of the PmaComm object parameters:

Recommended values for the Serial link parameters:
Baud rate4800 Bd (and higher)
Number data bits8 (mandatory)
ParityEVEN. The IEC 60870-5-101 standard specifically states that "EVEN" parity is to be used in order to meet data integrity "class I2".
If you can change it here, then be aware that using another parity setting cannot guarantee the same data integrity level.
Number of stop bits1 (mandatory)
Recommended values for the Ethernet-client parameters:
TCP/UDP remote port number2404 (according to the IEC 60870-5-104 standard)
 
See: Wikipedia: A list of TCP and UDP port numbers used by protocols to run network applications.
Ethernet transfer typeTCP (mandatory)
Number of repeats after unsuccessful Master transmission0 (mandatory)
Timeout of one packet transfer [ms]2000 (in this case it is only send message timeout, not receive message timeout.)
Filter ECHO charsNo
Not connect until first transferNOT checked (mandatory)
Close connection after every transferNOT checked (mandatory)
Description and recommended values for the Protocol parameters for IEC 60870-5-101 standard:
Response receipt timeoutThe time (in milliseconds) the driver is waiting for the response on sending the message.
If no response comes during this time, then the transmission of the message is terminated (the onEndOfTransfer event is triggered with error 24 or 66).
TypeSpecifies the basic transmission type defined in the IEC 60870-5 standard:
1=Balanced mode - The opposite side in this regime sends the data on change.
0=Unbalanced mode - This type has not been implemented yet. It is the Master-Slave communication where the opposite side (Slave) can send data as response on query.
Link address size of stationsThe number of bytes (octets) for the Link address in protocol: 0/1/2 bytes
Link address of this stationThe link address of the computer, running the PROMOTIC application
Link address of the second stationThe link address of the station, the PROMOTIC application communicates with:
For "Balanced mode": Communication only with one station. The LinkAddr variable on the "Data-sent" tab of every Master message is not taken into consideration.
For "Unbalanced mode": This configurator is not shown. The address is entered in the LinkAddr variable on the "Data-sent" tab of every Master message.
Description and recommended values for the Protocol parameters for IEC 60870-5-104 standard:
Protocol data typeIEC 870-5-104. For Ethernet only this protocol is supported.
k = Max. count of sent messages waiting for confirmation12 (standard value according to the standard). Minimum = 1, Maximum = 32767.
w = Max. count of received messages waiting for confirmation8 (standard value according to the standard). Minimum = 1, Maximum = 32767. Recommendation: the w value should not exceed two thirds of the k value.
t0 = Connection estabilish delay [ms]30000 (standard value according to the standard). Minimum = 1000 ms, Maximum = 255000 ms. If the connection is closed, then the reconnection will start after this delay automatically.
t1 = Delay [ms] for receive message confirmation (S-Frame)15000 (standard value according to the standard). Minimum = 1000 ms, Maximum = 255000 ms.
t2 = Delay [ms] for sending message confirmation (S-Frame)10000 (standard value according to the standard). Minimum = 1000 ms, Maximum = 255000 ms.
t3 = Delay [ms] for connection testing (U-Frame TESTFR)20000 (standard value according to the standard). Minimum = 1000ms, Maximum = 48 h = 172800000 ms.
Description and recommended values for the Protocol parameters common for both standards:
ASDU common address sizeThe number of bytes (octets) for the ASDU Common address data: 1/2 bytes
ASDU information object address sizeThe number of bytes (octets) for data object adress: 1/2/3 bytes
Size of "cause of transmission" valueThe number of bytes (octets) for the "cause of transmission".
1 - Value to 1 byte.
2 - Value to two bytes. 1st byte is the cause, 2nd byte is the "Originator address".
Commands termination typeThe IEC command is usually transmitted in multiple communication messages ("cause of transmission" = 6=act, 7=actcon, 8=deact, 10=actterm ...). It is defined here, when the transmission command is considered as finished.
0 = wait for receive, if "cause of transmission"=10=actterm - The command transmission is finished after receiving the 10=actterm.
1 = do not wait for receive - The command transmission is finished after sending this command, there is no waiting for receiving the 10=actterm.
The IEC 60870-5 standard defines some optional communication parameters (e.g. adress length). For the current communication system these values are set and these protocol parameter values must be entered.

The communication description by means of the PmaCommGroup object

For this driver, the PmaCommGroup objects can be used (only data receive working so far).
For regular ASDU variable receiving, it is more advantageous than using the PmaCommMsg object set for Slave message of the Data receive type.
It is possible to receive all types of ASDU data/commands listed below, see List and description of supported ASDU.
The "PmaCommGroup > Parameters > Communication refresh rate [ms]" configurator is not defined for this driver and therefore is set to 0. The object does not send prompts for data transfers.
For IEC 60870-5-101, the opposite side sends data automatically, or the data transfer may be required by sending the Master message of the Data request (ASDU-100, C_IC_NA_1) type.
For IEC 60870-5-104 it is necessary to call the Master message of the Data request (ASDU-100, C_IC_NA_1) type (see Description of data query for IEC 60870-5-104.) type, from the PROMOTIC side.


There can be more PmaCommGroup objects in one PmaComm object. The variables defined in different PmaCommGroup must differ by the value of their common address (ASDU Common Address). It means that there can be for example 2 variables with different common addresses in one PmaCommGroup object, but there must not be two variables with the same common address in two PmaCommGroup objects.

Description of the "ItemId" configurator:
ItemId is the text identifier of the item that is used for addressing the item in the device. The "ItemId" configurator tells the driver how to receive or send the item value.
The text can be written manually, or it can be assembled in the window opened by the button to the right of the configurator.
Macro expression can be used for input (it is evaluated after the application is launched).
The ItemId identifier may look like for example "CA1501.v6", where:
- 1st part specifies the ASDU common address (CA1501 = Common Address 1501).
- 2nd part specifies the address of the information object and a value type of this object (v6 = value at address 6). The types are:
v = Value = item value
q = Qualif = qualifier, see Types and values of qualifiers (Qualif).
t = Time


Description of the "PmaCommGroup > Parameters > Special Parameters" configurator:
This configurator is not used for given driver.

The communication description by means of the PmaCommMsg object - Master messages:

- Check connection from this station:
Only for IEC 870-5-101 standard. This message creates the connection with the opposite station. this message should always be transferred on communication start.
For the IEC 870-5-104 standard the connection check is done automatically by the driver and the designer can affect this only using the protocol parameter "t3 = Delay [ms] for connection testing (U-Frame TESTFR)".
There are following variables on the "Data-sent" tab:
- LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the 0=Unbalanced mode type. Specifies the station link address for the communication message.
There are following variables on the "Data-received" tab:
- State: (Integer) specifies the result of the check (0=not initialized, 1=check OK, 2=check error).


- Data send:
this message sends data/command to opposite station.
Message parameters:
Send data typeIt is possible to send all types of ASDU data/commands listed below, see List and description of supported ASDU.
Number of itemsIt is also possible to send multiple data of the same type simultaneously (some data types support this feature, it is not allowed for commands).
Send modeThis configurator is visible only if the protocol is IEC 870-5-101.
For the IEC 870-5-104 protocol, the transmission is always done in the 0 = Sending non-requested data mode.
0 = Sending non-requested data - Standard "Master" data transfer without waiting for data request.
1 = Sending spontaneously requested data - Data sending after data request for differential (spontaneous) data. The data are transmmitted with the transmission cause 3=spont without waiting for any confirmation.
2 = Sending data requested by general query - Data sending after all data request. The data are transmmitted with the transmission cause 20=inrogen without waiting for any confirmation.
There are following variables on the "Data-sent" tab:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the 0=Unbalanced mode type. Specifies the station link address for the communication message.
CmnAddr: (Long) Common address of ASDU.

Additional variables depend on the selected type and number of transmitted data., For example:
IoAddr: (Long) item address
Value: (Byte) item value
Qualif: (Byte) qualifier, see Types and values of qualifiers (Qualif).
There is no variable on the "Data-received" tab.


- Read command (ASDU-102, C_RD_NA_1):
This message queries 1 variable (1 information object). After receiving this variable, it will store the information into the "Data-received" tab.
There are following variables on the "Data-sent" tab:
CmnAddr: (Long) Common address of ASDU.
IoAddr: (Long) Information object address
OrigAddr: (Long) Originator address. Is relevant only if the "Size of "cause of transmission" value" configurator is set to 2.
There are following variables on the "Data-received" tab:
Value: (Variant) Received value of the information object.
If the received value contains the time of the CP56 type, then this time is stored into the TimeSource property.
Quality: (Long) Accepted quality of the information object.
It is set only if the received information object contains the quality.


- Data request (ASDU-100, C_IC_NA_1):
The message sends a data request to the opposite station. The opposite station then sends all values (these values are then collected by the PmaCommGroup object or by the Slave message of the Data receive type).
It is basicaly the same as sending the query command ASDU-100 using the Master message of the Data send type (the "cause of transmission" can also be set).
There are following variables on the "Data-sent" tab:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the 0=Unbalanced mode type. Specifies the station link address for the communication message.
CmnAddr: (Long) Common address of ASDU.
Oper: (Long) Specifies whether to activate the data request (value 0) or deactivate (value 1).
Type: (Long) Requested data type (20=global, 21=group1, 22=group2 .. 36=group16)
There are following variables on the "Data-received" tab:
Flag: (Long) Flag whether the data was activated (value 7) or deactivated (value 9).
Type: (Long) Requested data type (20=global, 21=group1, 22=group2 .. 36=group16)


- Clock synchronisation command (ASDU-103, C_CS_NA_1):
The message sends the current time to the opposite station.
This message type is implemented only for the IEC 870-5-101 protocol.
There are following variables on the "Data-sent" tab:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the 0=Unbalanced mode type. Specifies the station link address for the communication message.
CmnAddr: (Long) Common address of ASDU.
There is no variable on the "Data-received" tab.

The communication description by means of the PmaCommMsg object - Slave messages:

- Check connection from second station:
The message receives the connection checks and answers automatically.
There are following variables on the "Data-sent" tab:
- ErrorFlag: (Long) The variable value can be set as a constant or it can be for example changed after receive in the onDataReceive event. The value specifies how the opposite side will be responsed:
0 = the response is a positive connection check.
1 = the response is a negative connection check (only for IEC 870-5-101).
2 = no response.
There are following variables on the "Data-received" tab:
- MsgType: (Integer) The value of the variable informs about the checking type.
For IEC 870-5-104 protocol there can be only value:
2=connection test (U-Frame TESTFR).
For IEC 870-5-101 protocol the values can be as follows:
0=connection reset (ResetLink).
2=connection test (TestLink).
9=status request (ReqLinkStatus).


- Receive when nobody want:
The message receives all messages from the opposite station, not accepted by any other message. It allows the identification of for example sending the data, that are not configured in the PmaCommGroup object or in the message of the Data receive type.
Message parameters:
Message contentSpecifies whether and how the message content is stored:
Not save - The content of the received message will not be saved.
Save to "Buffer" variable as PmBuffer - The content of the received message is stored into the PmBuffer object and this object will be stored in the Buffer variable on the "Data-received" tab.
There are following variables on the "Data-sent" tab:
- ErrorFlag: (Long) This variable can be configured as constant (0 is the most common option) or it can be for example changed dynamically in the onDataReceive event according to the received message type. The value specifies how the opposite side will be responsed.
- for IEC 870-5-101 standard: if the ErrorFlag has the value:
0 = the response will be a positive confirmation (ACK)
1 = the response will be a negative confirmation (NAK)
2 = no response follows
- for the IEC 870-5-104 standard: if ErrorFlag has the value:
0 = the message is confirmed positively (by S-FRAME system message, or for commands the answer message ASDU-100 with "cause of transmission"=7=actcon).
2 = no response follows
4 = same as 0 but for the commands 10=actterm will be sent
5 = same as 0 but for the commands 7=actcon and 10=actterm will be sent

If there is no such message (or always ErrorFlag=2), then the opposite side receives no response and closes the connection.
There are following variables on the "Data-received" tab:
- CField: (Byte) The ControlField value of the protocol.
- LinkAddr: (Byte) Link address
- CmnAddr: (Long) Common address of ASDU.
- AsduType: (Long) ASDU type, see List and description of supported ASDU
- Cause: (Long) cause of transmission, see The meaning and values of "cause of transmission"
- NmbObj: (Long) The number of data objects in the received message
- Buffer: (PmBuffer) The variable contains the PmBuffer object, in which the content of the entire received message is stored. This variable is created only if the "Message content" configurator is set.


- Clock synchronisation command:
The message receives the time sent from the opposite station. So far this message is implemented only for the IEC 870-5-101 protocol.
There are following variables on the "Data-sent" tab:
- ErrorFlag: (Long) This variable can be configured as constant (0 is the most common option) or it can be for example changed dynamically in the onDataReceive event according to the received message type. The value specifies how the opposite side will be responsed.
0 = the response is a positive connection check.
1 = the response is a negative connection check.
2 = no response.
There are following variables on the "Data-received" tab:
- CmnAddr: (Long) Common address of ASDU.
- Invalid: (Boolean) Synchronization time validity flag (false = valid time).
- Time: (Date) Time that will be used to synchronize with PROMOTIC application. For example in the onDataReceive event assign:
Pm.Time = pMe.ReadVars("Time").Value


- Data receive:
This message is obsolete and it is better to use the PmaCommGroup object.
The message receives the data sent from another station. The second station sends the values that has been changed. It is possible to receive all types of ASDU data/commands listed below, see List and description of supported ASDU.
There is a message parameter "Received data information type" in the object, that can be set to 0 or 1. This parameter specifies how the received data will be confirmed. For 0 (less general option) there will be FillLastIndex and FillLastAddr items generated on the "Data-received" tab, that will contain the index and address of the last received data. If multiple data messages are going to be received, then it is better to choose option 1. For 1 there will be FillIndexes and Reserve items generated. The FillIndexes item is of the Array type and contains all indexes of all received data in the received message. The Reserve item is not used, it always equals to 0.
There are following variables on the "Data-sent" tab:
- CmdAddr: (Long) Common address of ASDU.
There are following variables on the "Data-received" tab:
- 0th FillCount: (Long) The number of data objects, sent by the opposite station. The common communication setting is to send only 1 object per transfer. In this case the value of this variable is always the 1 value.
- 1st FillLastIndex (or FillIndexes): (Long) Variable index (or variable indexes field), used for storing the transferred object value(s).
- 2nd FillLastAddr (or Reserve): (Long) IO address of the object, from which the value was written do the variable for the last time (or not used).
- 3rd The user data for data objects reception are following. During the first creation the driver adds 6 variables as example (these variables can be deleted, added or modified). The names of such variables are arbitrary. The Note must be filled in correctly. The object address is filled in here according to the following example:
The variable on the index 3 (after the FillLastAddr variable) contains in the note text: v95 (v as value).
The variable on the index 4 (of the Date type) contains in the note text: t95 (t as time).
The variable on the index 5 (of the Byte type) contains in the note text: q95 (q as qualifier).
The variable on the index 6 (of the Byte type) contains in the note text: c95 (c as "cause of transmission").

If the information about the object with address 95 is received, then the value of the object is stored into the v95 variable, the time of the object is stored into the t95 variable, the qualifier of the object is stored into the q95 variable and the "cause of transmission" is stored into the c95 variable. The variables t95, q95 and c95 are not requested (only the value is received in this case), but if present, then these must follow (in arbitrary order) right after the v95 variable.
The v95 variable can be followed by a variety of data filled in using the same principle.
See also: Preconfiguration "PmIEC8705 - Ethernet 104 - Communication set with data and panel"

List and description of supported ASDU

The following ASDU data types can be received (in the PmaCommGroup object or by Slave message of the Data receive type) and sent (by Master message of the Data send type):
ASDUs for process information in monitor direction:
ASDU-1 (M_SP_NA_1) = Single-point information:
- Value is of the Byte type, 0=OFF, 1=ON.
- Qualifier (Qualif) is of type SIQ
- The Time is not used.
ASDU-2 (M_SP_TA_1) = Single-point information, time CP24:
- Value is of the Byte type, 0=OFF, 1=ON.
- Qualifier (Qualif) is of type SIQ
- The Time is not implemented yet.
ASDU-3 (M_DP_NA_1) = Double-point information:
- Value is of the Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualifier (Qualif) is of type DIQ
- The Time is not used.
ASDU-4 (M_DP_TA_1) = Double-point information, time CP24:
- Value is of the Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualifier (Qualif) is of type DIQ
- The Time is not implemented yet.
ASDU-5 (M_ST_NA_1) = Step position information:
- Value is of the Byte type and represents the indication of transitional state for location signalisation. Highest bit of the value: 0 = the device is not in transitional state, 1 = the device is in transitional state.
- Qualifier (Qualif) is of type QDS
- The Time is not used.
ASDU-6 (M_ST_TA_1) = Step position information, time CP24:
- Value is of the Byte type and represents the indication of transitional state for location signalisation. Highest bit of the value: 0 = the device is not in transitional state, 1 = the device is in transitional state.
- Qualifier (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-7 (M_BO_NA_1) = Bitstring of 32 bit:
- Value is of the Long type and represents the binary state 32-bit information (each bit can be read, for example, by the GetBit method).
- Qualifier (Qualif) is of type QDS
- The Time is not used.
ASDU-8 (M_BO_TA_1) = Bitstring of 32 bit, time CP24:
- Value is of the Long type and represents the binary state 32-bit information (each bit can be read, for example, by the GetBit method).
- Qualifier (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-9 (M_ME_NA_1) = Measured value, normalised:
- Value is of the Single type, range from -1.0 to +1.0.
- Qualifier (Qualif) is of type QDS
- The Time is not used.
ASDU-10 (M_ME_TA_1) = Measured value, normalised, time CP24:
- Value is of the Single type, range from -1.0 to +1.0.
- Qualifier (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-11 (M_ME_NB_1) = Measured value, with measure:
- Value is of the Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transferred as 103)
- Qualifier (Qualif) is of type QDS
- The Time is not used.
ASDU-12 (M_ME_TB_1) = Measured value, with measure, time CP24:
- Value is of the Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transferred as 103)
- Qualifier (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-13 (M_ME_NC_1) = Measured value, short floating-point:
- Value is of the Single type and the full available range can be used.
- Qualifier (Qualif) is of type QDS
- The Time is not used.
ASDU-14 (M_ME_TC_1) = Measured value, short floating-point, time CP24:
- Value is of the Single type and the full available range can be used.
- Qualifier (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-15 (M_IT_NA_1) = Integrated totals:
- Value is of the Long type in the whole extent.
- Qualifier (Qualif) is of type BCR
- The Time is not used.
ASDU-16 (M_IT_TA_1) = Integrated totals, time CP24:
- Value is of the Long type in the whole extent.
- Qualifier (Qualif) is of type BCR
- The Time is not implemented yet.
ASDU-30 (M_SP_TB_1) = Single-point information, time CP56:
- Value is of the Byte type, 0=OFF, 1=ON.
- Qualifier (Qualif) is of type SIQ
- The Time is of the Date type.
ASDU-31 (M_DP_TB_1) = Double-point information, time CP56:
- Value is of the Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualifier (Qualif) is of type DIQ
- The Time is of the Date type.
ASDU-33 (M_BO_TB_1) = Bitstring of 32 bit, time CP56:
- Value is of the Long type and represents the binary state 32-bit information (each bit can be read, for example, by the GetBit method).
- Qualifier (Qualif) is of type QDS
- The Time is of the Date type.
ASDU-34 (M_ME_TD_1) = Measured value, normalised, time CP56:
- Value is of the Single type, range from -1.0 to +1.0.
- Qualifier (Qualif) is of type QDS
- The Time is of the Date type.
ASDU-35 (M_ME_TE_1) = Measured value, with measure, time CP56:
- Value is of the Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transferred as 103)
- Qualifier (Qualif) is of type QDS
- The Time is of the Date type.
ASDU-36 (M_ME_TF_1) = Measured value, short floating-point, time CP56:
- Value is of the Single type and the full available range can be used.
- Qualifier (Qualif) is of type QDS
- The Time is of the Date type.
ASDU-37 (M_IT_TB_1) = Integrated totals, time CP56:
- Value is of the Long type in the whole extent.
- Qualifier (Qualif) is of type BCR
- The Time is of the Date type.

ASDUs for process information in control direction:
ASDU-45 (C_SC_NA_1) = Single command:
- Value is of the Byte type, 0=OFF, 1=ON.
- Qualifier (Qualif) is of type QOC
- The Time is not used.
ASDU-46 (C_DC_NA_1) = Double command:
- Value is of the Byte type, 0=not permitted, 1=OFF, 2=ON, 3=not permitted.
- Qualifier (Qualif) is of type QOC
- The Time is not used.
ASDU-48 (C_SE_NA_1) = Set-point command, normalised:
- Value is of the Single type, range from -1.0 to +1.0.
- Qualifier (Qualif) is of type QOS
- The Time is not used.
ASDU-49 (C_SE_NB_1) = Set-point command, with measure:
- Value is of the Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transferred as 103)
- Qualifier (Qualif) is of type QOS
- The Time is not used.
ASDU-50 (C_SE_NC_1) = Set-point command, short floating-point:
- Value is of the Single type and the full available range can be used.
- Qualifier (Qualif) is of type QOS
- The Time is not used.
ASDU-51 (C_BO_NA_1) = Bitstring of 32 bit:
- Value is of the Long type and represents the binary state 32-bit information (each bit can be read, for example, by the GetBit method).
- The qualifier (Qualif) is not used.
- The Time is not used.
ASDU-58 (C_SC_TA_1) = Single command, time CP56:
- Value is of the Byte type, 0=OFF, 1=ON.
- Qualifier (Qualif) is of type QOC
- The Time is of the Date type.
ASDU-59 (C_DC_TA_1) = Double command, time CP56:
- Value is of the Byte type, 0=not permitted, 1=OFF, 2=ON, 3=not permitted.
- Qualifier (Qualif) is of type QOC
- The Time is of the Date type.
ASDU-60 (C_RC_TA_1) = Regulation step command, time CP56:
- Value is of the Byte type, 0=not permitted, 1=next step Lower, 2=next step Higher, 3=not permitted.
- Qualifier (Qualif) is of type QOC
- The Time is of the Date type.
ASDU-61 (C_SE_TA_1) = Set-point command, normalised, time CP56:
- Value is of the Single type, range from -1.0 to +1.0.
- Qualifier (Qualif) is of type QOS
- The Time is of the Date type.
ASDU-62 (C_SE_TB_1) = Set-point command, with measure, time CP56:
- Value is of the Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transferred as 103)
- Qualifier (Qualif) is of type QOS
- The Time is of the Date type.
ASDU-63 (C_SE_TC_1) = Set-point command, short floating-point, time CP56:
- Value is of the Single type and the full available range can be used.
- Qualifier (Qualif) is of type QOS
- The Time is of the Date type.
ASDU-64 (C_BO_TA_1) = Bitstring of 32 bit, time CP56:
- Value is of the Long type and represents the binary state 32-bit information (each bit can be read, for example, by the GetBit method).
- The qualifier (Qualif) is not used.
- The Time is of the Date type.

ASDUs for system information in control direction:
ASDU-100 (C_IC_NA_1) = Interrogation command:
The purpose of this command is more genaral but principialy the same as sending Master message of the Data request (ASDU-100, C_IC_NA_1) type. The "cause of transmission" can also be controled here.
- Value is of the Long type. It is the "cause of transmission": 6=act, 7=actcon, 8=deact, 9=deactcon, 10=actterm.
- Qualifier (Qualif) is of type QOI
- The Time is not used.
ASDU-101 (C_CI_NA_1) = Counter Interrogation Command:
- Value is of the Long type. It is the "cause of transmission": 6=act, 7=actcon, 10=actterm.
- Qualifier (Qualif) is of type QCC
- The Time is not used.
ASDU-102 (C_RD_NA_1) = Read Command:
This command can only be used in the PmaCommMsg object for Read command (ASDU-102, C_RD_NA_1) type. It is a command to read 1 variable.

Types and values of qualifiers (Qualif)

The item qualifier (qualitative descriptor) provides additional information. It may regard the value quality (valid, invalid ...), but also the period, order, etc.

Qualifier types:
- SIQ: It is of the Byte type. This qualifier is used in ASDU-(1,2,30).
0 = normal value
bit 5 = 0/1 = not blocked/blocked
bit 6 = 0/1 = not substituted/substituted
bit 7 = 0/1 = topical/not topical value
bit 8 = 0/1 = valid/invalid value. If this bit is set, then the variable Quality property is set to "0=Bad:NonSpecific".
- DIQ: It is of the Byte type. This qualifier is used in ASDU-(3,4,31).
0 = normal value
bit 5 = 0/1 = not blocked/blocked
bit 6 = 0/1 = not substituted/substituted
bit 7 = 0/1 = topical/not topical value
bit 8 = 0/1 = valid/invalid value. If this bit is set, then the variable Quality property is set to "0=Bad:NonSpecific".
- QDS: It is of the Byte type. This qualifier is used in ASDU-(5-14,33-36).
0 = normal value
bit 1 = 0/1 = no overflow/overflow
bit 5 = 0/1 = not blocked/blocked
bit 6 = 0/1 = not substituted/substituted
bit 7 = 0/1 = topical/not topical value
bit 8 = 0/1 = valid/invalid value. If this bit is set, then the variable Quality property is set to "0=Bad:NonSpecific".
- BCR: It is of the Byte type. This qualifier is used in ASDU-15,16,37. Contains the sequence record:
- bit 0-4 (SQ) is the sequence number
- bit 5 (CY) specifies whether the counter overflow occured (=1) or not (=0) in the corresponding integration period
- bit 6 (CA) specifies whether the counter was set (=1) or not (=0) since the last reading
- bit 7 (IV) specifies whether the counter reading is considered valid (=0) or invalid (=1)
- QOC: It is of the Byte type. This qualifier is used in ASDU-(45,46,58,59,60).
0 = no additional definition
1 = short pulse duration
2 = long pulse duration
3 = persistent output
>3 = reserved
Moreover if bit 8 = 0=execute, 1=select(prepare)
- QOS: It is of the Byte type. This qualifier is used in ASDU-(48,49,50,61,62,63).
0 = default
greater than 0 = reserved
Moreover if bit 8 = 0=execute, 1=select(prepare)
- QOI: It is of the Byte type. This qualifier is used in ASDU-100.
20 = station interrogation (global)
21..36 = group 1..16 interrogation
- QCC: It is of the Byte type. This qualifier is used in ASDU-101. Represents a sum of two numbers:
The first number is the RQT request: 0 = no counter requested, 1-4 = request for counter of the groups 1-4, 5 = general counter request.
The second number is FRZ freeze: 0 = no freeze or zeroing, 64 = counter freeze, no zeroing, 128 = counter freeze with zeroing, 128+64 = counter zeroing.

The meaning and values of "cause of transmission"

There is a "cause of transmission" in each message - specifies the cause of the transfer. The value can consist of 1 or 2 bytes (see the "Size of "cause of transmission" value" configurator).
- Values in the 1st bytes:
- the 0-5 bit specifies the cause number:
- 0: not used
- 1=per/cyc: periodic, cyclic
- 2=back: background scan
- 3=spont: spontaneous
- 4=init: initialised
- 5=req: request or requested
- 6=act: activation
- 7=actcon: activation confirmation
- 8=deact: deactivation
- 9=deactcon: deactivation confirmation
- 10=actterm: activation termination
- 11=retrem: return information caused by a remote command
- 12=retloc: return information caused by a local command
- 13=file: file transmission
- 14-19: reserved for further compatible definitions
- 20=inrogen: interrogated by general interrogation
- 21-36=inro 1-16: interrogated by group interrogation: 1-16
- 37=reqcogen: requested by general counter request
- 38-41=reqco 1-4: reguested by group counter request: 1-4
- 42-47: reserved for further compatible definitions
- 48-63: for special use (private range)
- the 6 bit (P/N) specifies: 0=positive, 1=negative confirmation
- the 7 bit (T) specifies: 0=no test, 1=test
- The value of the 2nd byte (optional) is the "Originator address" (0=default).

Description of data query for IEC 60870-5-104.

The oposite side can send the data automatically (e.g. if change occured, then usually "cause of transmission"=3=spont) and the data is received into variables defined in the PmaCommGroup object (or it can be received as Slave messages of the Data receive type).
If the PROMOTIC application needs to ask for the data from the opposite side (all, not only the changed values), then the PROMOTIC application must send Master message of the Data request (ASDU-100, C_IC_NA_1) type. This message will send ASDU-100 with "cause of transmission"=6=act and then wait for response. The opposite side should send back the message of the same type with "cause of transmission"=7=actcon as response.
Then the opposite side starts to send data messages (with "cause of transmission"=20=inrogen), that will be received into variables defined in the PmaCommGroup object (or they can be accepted by Slave messages of the Data receive type).
After the termination the opposite side sends ASDU-100 message with "cause of transmission"=10=actterm - this message can be accepted by Slave message of the Receive when nobody want type.

The procedure is similar also backwards: the opposite side can send ASDU-100 with "cause of transmission"=6=act, it means that the opposite side requsts data from the PROMOTIC application. This message can be accepted by the Slave message of the Receive when nobody want type with ErrorFlag=0. Then it is necessary to answer ASDU-100 with "cause of transmission"=7=actcon. Then the PROMOTIC system will send the data by Master message of the Data send type. After sending the necessary data (sometimes not requested to) it is possible to send ASDU-100 message with "cause of transmission"=10=actterm - it can also be done by Master message of the Data send type.

History:
Pm9.00.22: New "Message content" configurator in the message of the Receive when nobody want type.
Pm9.00.17: New type of Master message of the Read command (ASDU-102, C_RD_NA_1) type.
Pm8.03.12: Fixed bug: While transferring some message types memory loss accured (PmSNMP, PmMBus, PmIEC8705, PmElgas2).
Pm8.03.08: Fixed bug: After 32000 communications were completed, the system re-established the connection unnecessarily.
Pm8.03.05: Generalization by types ASDU-5 and ASDU-6
Pm8.02.09: If a value is received with flag of wrong qualifier state, then the Quality property of such value is set to the "0=Bad:NonSpecific" value.
Pm8.02.06: Fixed bug: Generalization for the ASDU-103 type.
Pm8.00.11: Fixed bug: Had a problem with storing the values of the configuration window of the protocol parameters.
Pm8.00.09: (for norm 101) Generalization by the Master message of the Data send type by the new "Send mode" configurator (allows to send requested data).
Pm8.00.07:
- Generalization by added receipt of total sums (ASDU 15/16/37).
- Fixed bug: PmaCommGroup object incorrectly receved data from message containing multiple data items.
Pm8.00.05: Fixed bug: When the "ASDU information object address size" configurator was set to the value 3, it was not possible to address register on higher addresses.
Pm8.00.02: Fixed bug: The PmaCommGroup object was not functional
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.