Before using this driver in the PROMOTIC application it is highly recommended to watch "
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.
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
t = Time
This configurator is not used for given driver.
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 content | Specifies 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
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.
- 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).
-
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:
- Qualifier (
Qualif) is of type
QCC
- The Time is not used.
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.
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.