Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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

The driver communicates by the protocol based on the IEC 60870-5 standard.
 
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communicaton using the PROMOTIC drivers.
 
Basic properties of the driver:
- Using this driver is bound to purchase the license: PmIEC8705. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- The communication is done via Ethernet or via standard serial link (COM1, COM2 ...).
- The IEC 60870-5-101 protocol is used for serial link. It has been implemented for balanced mode transfer. 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 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. I.e. 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 PmComm object.

Driver supports the usage of both PmCommMsg and PmCommData objects. For common data transfers, it is easier to use the PmCommData object.

For easy integration of this driver into the application it is handy to use: Preconfigurations in group "IEC8705 protocol"

- For an example of simple use see: Example of communication by IEC 870-5-101 protocol.
 

Recommended parameters values:

Recommended values for the Serial link parameters:
Baud rate4800 Bd (and higher)
Number of 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". While you can change it here, be aware that using another parity setting cannot guarantee the same data integrity level.
Number of stop bits1 (mandatory)
Recommended values for the Ethernet parameters:
TCP/UDP port number2404 (according to IEC 60870-5-104 standard)
Ethernet transfer typeTCP (mandatory)
Number of repeats after unsuccessful 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, the transfer of the message is terminated (event onEndOfTransfer fires with error 24 or 66).
TypeDetermines the basic type of transmission 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 byte count (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 comunicates with:
For "Balanced mode": Communcation only with one station. Variable LinkAddr in Data-sent page of every Master message is not taken into consideration.
For "Unbalanced mode": This configurator is not shown. The address is filled in LinkAddr variable in Data-sent page 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. Also the IEC 870-5-101 standard implementation is planned (for communication via "serial link-Ethernet" converter)
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.
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 byte count (octets) for the ASDU Common address data: 1/2 Bytes
ASDU information object address sizeThe byte count (octets) for data object adress: 1/2/3 Bytes
Size of "cause of transmission" valueThe byte count (octets) for the "cause of transmission": 1/2 Bytes
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 lenght). For the current communication system these values are set and these protocol parameter values must be entered.

The communication description by the PmCommData objects

For this driver, it is possible to use the PmCommData objects (only data receive working so far). For regular ASDU variable receiving, it is more advantageous than using the PmCommMsg 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 configurator PmCommData > Parameters > Communication refresh rate [ms] 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" type.
For IEC 60870-5-104 it is necessary to call the Master messgae of the "Data request" (see Description of data query for IEC 60870-5-104.) type, from the PROMOTIC side.

 
There can be multiple PmCommData objects in one PmComm object. The variables defined in different PmCommData must differ by the value of their common address (ASDU Common Address). I.e. there can be 2 variables with different common addresses in one PmCommData object, but there must not be two variables with the same common address in two PmCommData objects.
 
Description of the ItemID configurator:

ItemId is the text identifier of the item that is used for addressing the value 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 while the application is launching).

The text can be e.g. "CA1501.v6".

- The first part defines the ASDU common address (CA1501 = Commnon Address 1501).
- The second part defines the address of the information object and a value type of this object (v6 = The value on address 6). The types are:
v = Value = item value
q = Qualif = qualifier, see Types and values of qualificators (Qualif).
t = Time
c = cause of transmission, see The meaning and value of "cause of transmission".
 
Description of the PmCommData > Parameters > Special Parameters configurator:
This configurator is not used for given driver.

The communication description by the PmCommMsg objects - 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 transfered on communication start.

For the IEC 870-5-104 standard the connection check is done automaticaly 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 page:
- LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the "Unbalanced mode" type. It defines the station link address for the communication message.
There are following variables on the Data-received page:
- State: (Integer) defines the result of the check (0=not initialized, 1=check OK, 2=check error).
 
- Data send: This message sends data/command to opposite station.
In the configurator PmCommMsg > Parameters > Message parameters the following data is set:
- Send data type: It is possible to send all types of ASDU data/commands listed below, see List and description of supported ASDU.
- Items count: It 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 mode: This configurator is used for the IEC 870-5-101 protocol. 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 transmission without waiting for data request.
1 = Sending spontaneously requested data: Data transmission after data request for differential (spontaneous) data. The data is transmmitted with the transmission cause 3=spont without waiting for any confirmation.
2 = Sending data requested by general query: Data transmission after all data request. The data is transmmitted with the transmission cause 20=inrogen without waiting for any confirmation.
There are following variables on the Data-sent page:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the "Unbalanced mode" type. It defines 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 qualificators (Qualif).
There is no varible on the Data-received page.
 
- Data request: The message sends a data request to the opposite station. The opposite station then sends all values (these values are then collected by the PmCommData 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 page:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the "Unbalanced mode" type. It defines the station link address for the communication message.
CmnAddr: (Long) common address of ASDU
Oper: (Long) Defines 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 page:
Flag: (Long) The attribute shows 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: 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 page:
LinkAddr: (Long) The variable is relevant only for IEC 870-5-101 of the "Unbalanced mode" type. It defines the station link address for the communication message.
CmnAddr: (Long) common address of ASDU
There is no varible on the Data-received page.

The communication description by the PmCommMsg objects - Slave messages:

- Check connection from second station: The message receives the connection checks and answers automatically.
There are following variables on the Data-sent page:
- ErrorFlag: (Long) The variable value can be set as a constant or it can be changed after receive in the onDataReceive event. The value defines how the opposite side will be answered:
0 = the answer is a positive connection check.
1 = the answer is a negative connection check (only for IEC 870-5-101).
2 = no answer.
There are following variables on the Data-received page:
- MsgType: (Integer) The value of this 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).
 
- Clock synchronisation command: The message receives the time sent from the opposite station. So far this message is implemented only for IEC 870-5-101 protocol.
There are following variables on the Data-sent page:
- ErrorFlag: (Long) This variable can be configured as constant (0 is the most common setting) or it can be changed dynamicaly in the onDataReceive event according to the received message type. The value defines how the opposite side will be answered.
0 = the answer is a positive connection check.
1 = the answer is a negative connection check.
2 = no answer.
There are following variables on the Data-received page:
- CmnAddr: (Long) common address of ASDU
- Invalid: (Boolean) Synchronization time validity attribute (false = valid time).
- Time: (Date) Time that will be used to synchronize with PROMOTIC application. For example in onDataReceive event assign:

Pm.Time = pMe.ReadVars.Item("Time")

 
- 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 PmCommData object or in the "Data receive" message.
There are following variables on the Data-sent page:
- ErrorFlag: (Long) This variable can be configured as constant (0 is the most common setting) or it can be changed dynamicaly in the onDataReceive event according to the received message type. The value defines how the opposite side will be answered.
- for IEC 870-5-101 standard: if the ErrorFlag equals to:
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 equals to:
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 page:
- CField: (Byte) Value of ControlField 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 value of "cause of transmission"
- NmbObj: (Long) The number of data objects in received message
 
- Data receive: This message is obsolete and it is better to use the PmCommData object instead.

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 defines how the received data will be confirmed. For 0 (less general option) there will be FillLastIndex and FillLastAddr items generated in the Data-received page, that will contain the index and address of the last received data. If multiple data items are going to be received it is better to choose option 1. For 1 there will be FillIndexes and Reserve items generated. The FillIndexes item is of Array type and contains all indexes of all received data in the message. The Reserve item is not used, it always equals to 0.

There are following variables on the Data-sent page:
- CmdAddr: (Long) common address of ASDU
There are following variables on the Data-received page:
- 0. 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 such case the value of this variable is always 1.
- 1. FillLastIndex (or FillIndexes): (Long) Variable index (or variable indexes field), used for storing the transfered object value(s).
- 2. 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).
- 3. 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 adress is filled in here according to the following example:
The variable on index 3 (after the FillLastAddr variable) contains in the note text: v95 (v as value).
The variable on index 4 (Date type) contains in the note text: t95 (t as time).
The variable on index 5 (Byte type) contains in the note text: q95 (q as qualifier).
The variable on index 6 (Byte type) contains in the note text: c95 (c as "cause of transmission").

If the information about the object adress 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), 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: Example of communication by IEC 870-5-101 protocol and Preconfigurations PmIEC8705 - Ethernet 104 - Communication set with data and panel

List and description of supported ASDU

The following ASDU data types can be received (by PmCommData 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) = One bit information:
- Value is of Byte type, 0=OFF, 1=ON.
- Qualificator (Qualif) is of type SIQ
- The Time is not used.
ASDU-2 (M_SP_TA_1) = One bit information:
- Value is of Byte type, 0=OFF, 1=ON.
- Qualificator (Qualif) is of type SIQ
- The Time is not implemented yet.
ASDU-3 (M_DP_NA_1) = Two bits information:
- Value is of Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualificator (Qualif) is of type DIQ
- The Time is not used.
ASDU-4 (M_DP_TA_1) = Two bits information:
- Value is of Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualificator (Qualif) is of type DIQ
- The Time is not implemented yet.
ASDU-5 (M_ST_NA_1) = Step position information:
- The 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.
- Qualificator (Qualif) is of type QDS
- The Time is not used.
ASDU-6 (M_ST_TA_1) = Step position information with time tag CP24:
- The 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.
- Qualificator (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-7 (M_BO_NA_1) = Bit string of 32 bits:
- The value is of a Long type and represents the binary state 32 bit information (each bit can be read, for example, by using the Bit property).
- Qualificator (Qualif) is of type QDS
- The Time is not used.
ASDU-8 (M_BO_TA_1) = Bit string of 32 bits:
- The value is of a Long type and represents the binary state 32 bit information (each bit can be read, for example, by using the Bit property).
- Qualificator (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-9 (M_ME_NA_1) = Measured normalized value:
- The value is of Single type, range from -1.0 to +1.0.
- Qualificator (Qualif) is of type QDS
- The Time is not used.
ASDU-10 (M_ME_TA_1) = Measured normalized value:
- The value is of Single type, range from -1.0 to +1.0.
- Qualificator (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-11 (M_ME_NB_1) = Measured value with with measure:
- The value is of Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transfered as 103)
- Qualificator (Qualif) is of type QDS
- The Time is not used.
ASDU-12 (M_ME_TB_1) = Measured value with measure with time mark:
- The value is of Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transfered as 103)
- Qualificator (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-13 (M_ME_NC_1) = Measured value, short float:
- The value is of Single type and the full available range can be used.
- Qualificator (Qualif) is of type QDS
- The Time is not used.
ASDU-14 (M_ME_TC_1) = Measured value, short float:
- The value is of Single type and the full available range can be used.
- Qualificator (Qualif) is of type QDS
- The Time is not implemented yet.
ASDU-15 (M_IT_NA_1) = Integrated totals:
- The Value is of the Long type in the whole extent.
- Qualificator (Qualif) is of type BCR
- The Time is not used.
ASDU-16 (M_IT_TA_1) = Integrated totals with time tag:
- The Value is of the Long type in the whole extent.
- Qualificator (Qualif) is of type BCR
- The Time is not implemented yet.
ASDU-30 (M_SP_TB_1) = One bit information with time mark CP56:
- Value is of Byte type, 0=OFF, 1=ON.
- Qualificator (Qualif) is of type SIQ
- Time is of Date type.
ASDU-31 (M_DP_TB_1) = Two bits information with time mark CP56:
- Value is of Byte type, 0=indeterminate or intermediate state, 1=determinate state OFF, 2=determinate state ON, 3=indeterminate state.
- Qualificator (Qualif) is of type DIQ
- Time is of Date type.
ASDU-33 (M_BO_TB_1) = Bit string of 32 bits with time mark CP56:
- The value is of a Long type and represents the binary state 32 bit information (each bit can be read, for example, by using the Bit property).
- Qualificator (Qualif) is of type QDS
- Time is of Date type.
ASDU-34 (M_ME_TD_1) = Measured normalized value with time mark CP56:
- The value is of Single type, range from -1.0 to +1.0.
- Qualificator (Qualif) is of type QDS
- Time is of Date type.
ASDU-35 (M_ME_TE_1) = Measured value with meter with time mark CP56:
- The value is of Integer type (range from -32536 to +32535) and represents a value with firm scale (e.g. the voltage of 10.3kV will be transfered as 103)
- Qualificator (Qualif) is of type QDS
- Time is of Date type.
ASDU-36 (M_ME_TF_1) = Measured value, short float with time mark CP56:
- The value is of Single type and the full available range can be used.
- Qualificator (Qualif) is of type QDS
- Time is of Date type.
ASDU-37 (M_IT_TB_1) = Integrated totals with time tag CP56:
- The Value is of the Long type in the whole extent.
- Qualificator (Qualif) is of type BCR
- Time is of Date type.

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

- The value is of Long type. It is the "cause of transmission": 6=act, 7=actcon, 8=deact, 9=deactcon, 10=actterm.
- Qualificator (Qualif) is of type QOI
- The Time is not used.
ASDU-101 (C_CI_NA_1) = Counter Interrogation Command:
- The value is of Long type. It is the "cause of transmission": 6=act, 7=actcon, 10=actterm.
- Qualificator (Qualif) is of type QCC
- The Time is not used.

Types and values of qualificators (Qualif)

The item qualificator (qualitative descriptor) provides additional information. It may regard the value quality (valid, invalid...), but also the period, order, etc.
 
Qualificator types:
- SIQ: It is of Byte data type. This qualificator is used in ASDU-1, ASDU-2, ASDU-30.
0 = normal value
5.bit = 0/1 = not blocked/blocked
6.bit = 0/1 = not substituted/substituted
7.bit = 0/1 = topical/not topical value
8.bit = 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 Byte data type. This qualificator is used in ASDU-3, ASDU-4, ASDU-31.
0 = normal value
5.bit = 0/1 = not blocked/blocked
6.bit = 0/1 = not substituted/substituted
7.bit = 0/1 = topical/not topical value
8.bit = 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 Byte data type. This qualificator is used in ASDU-(5-14), ASDU-(33-36).
0 = normal value
1.bit = 0/1 = no overflow/overflow
5.bit = 0/1 = not blocked/blocked
6.bit = 0/1 = not substituted/substituted
7.bit = 0/1 = topical/not topical value
8.bit = 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 Byte data type. This qualificator is used in ASDU-15, ASDU-16, ASDU-37. Contains the sequence record:
- 0-4.bit (SQ) is the sequence number
- 5.bit (CY) defines whether the counter overflow occured (=1) or not (=0) in the corresponding integration period
- 6.bit (CA) defines whether the counter was set (=1) or not (=0) since the last reading
- 7.bit (IV) defines whether the counter reading is considered valid (=0) or invalid (=1)
- QOC: It is of Byte data type. This qualificator is used in ASDU-(45-46), ASDU-(58-60).
0 = no additional definition
1 = short pulse duration
2 = long pulse duration
3 = persistent output
>3 = reserved
Moreover if 8.bit=0=execute, 1=select(prepare)
- QOS: It is of Byte data type. This qualificator is used in ASDU-(48-50), ASDU-(61-63).
0 = default
>1 = reserved
Moreover if 8.bit=0=execute, 1=select(prepare)
- QOI: It is of Byte data type. This qualificator is used in ASDU-100.
20 = station interrogation (global)
21..36 = group 1..16 interrogation
- QCC: It is of Byte data type. This qualificator is used in ASDU-101. Represents a sum of two numbers:
The first number is the RQT request: 0 = no counter requested, 1-4 = counter of the groups 1-4 requested, 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 value of "cause of transmission"

There is a "cause of transmission" in each message, defining the cause of transfer. The value can consist of 1 or 2 Bytes (see the configurator "Size of "cause of transmission" value").
- Values in the 1st Byte:
- the 0-5 bit defines 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 transfer
- 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) defines: 0=positive, 1=negative confirmation
- the 7 bit (T) defines: 0=no test, 1=test
- The value of the 2nd Byte (optional) defines 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 the variables defined in the PmCommData 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" type. This message will send ASDU-100 with "cause of transmission"=6=act and then wait for reply. The opposite side should send back the same message with "cause of transmission"=7=actcon.

Then the opposite side starts to send data messages (with "cause of transmission"=20=inrogen), that will be received into the variables defined in the PmCommData 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, i.e. that the opposite side requsts data into 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.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice