M60870_5
Communication control for the IEC 60870-5 client driver, IEC 101 and IEC 104.
This instruction replaces the M104 instruction in version 15.1 onwards. The instruction M104 is still supported at run-time for backwards compatibility but must not be used for new projects.
WebVue support - Yes.
|
Mode |
Mnemonic |
Syntax |
| 1 | START | 1 |
| 2 | STOP | 1 |
| 3 | CFG | 2 |
| 4 | CLOCKSYNCHRO | 3 |
| 5 | TEST | 3 |
| 6 | RESET | 4 |
| 7 | SWITCHOVER | 8 |
| 8 | GENINT | 3 |
| 9 | GRPINT | 5 |
| 10 | GENINT_COUNTER | 3 |
| 11 | GRPINT_COUNTER | 5 |
| 12 | CMD_EXECUTE | 6 |
| 13 | CMD_SBO_SELECT | 6 |
| 14 | CMD_SBO_CANCEL | 7 |
| 15 | CMD_SBO_OPERATE | 7 |
| 16 | READ_IOA | 9 |
| 17 | READ | 7 |
| 18 | SETPARAM | 10 |
| 19 | SETPARAM_MNV | 11 |
| 20 | SETPARAM_MSV | 11 |
| 21 | SETPARAM_MFP | 11 |
Common arguments
|
Argument |
Meaning |
|
CommObjectName |
The name of an IEC 60870-5 communication object, under the form Network, Network.Device or Network.Device.Sector. Type STR. |
|
SectorName |
The name of an IEC 60870-5 sector under the form Network.Device.Sector. Type STR. |
| ResultVar |
The name of a register variable in which information resulting from the instruction will be placed. Type STR. Possible values are: 1 - Command in progress |
Syntax 1
IntVal = M60870_5(Mode, CommObjectName, Destination[, ResultVar]);
Return type: INTEGER.
|
Argument |
Meaning |
| Destination | Destination of the command. Type STR.LOCAL - The command is run locally. There is no effect on a station that does not produce the communication object. |
Execution
|
Mode |
Mnemonic |
Action |
|
1 |
START |
Start an IEC 60870-5 communication object. |
| 2 | STOP | Stop an IEC 60870-5 communication object. |
|
Return: 0: Command sent |
Syntax 2
IntVal = M60870_5(Mode, CommObjectName, PropertyName, PropertyValue[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
PropertyName |
The name of the property to modify. See the list below. Type STR. |
| PropertyValue | The new value to set for the property. See list below. Type STR. |
|
Property name |
Property value |
Description |
|
"IpAddress" |
"x.x.x.x" |
String containing an IP V4 address. |
Execution
|
Mode |
Mnemonic |
Action |
|
3 |
CFG |
Modify the configuration of an IEC 60870-5 communication object. |
|
Return: 0: Command sent |
Syntax 3
IntVal = M60870_5(Mode, SectorName[, ResultVar]);
Return type: INTEGER.
Execution
| Mode | Mnemonic | Action |
| 4 | CLOCKSYNCHRO | Send a clock synchronization request to the sector. |
| 5 | TEST | Send a Test request to the sector. |
| 8 | GENINT | Send a general interrogation request to the sector. |
| 10 | GENINT_COUNTER | Send a general counter interrogation to the sector. |
|
Return: 0: Command sent |
Syntax 4
IntVal = M60870_5(Mode, SectorName, Qualifier[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
| Qualifier |
Qualifier of the request. Type INTEGER. Possible values: 1 - General reset of process Private values of the Qrp can also be used as described in the IEC 60870-5 standard. |
Execution
|
Mode |
Mnemonic |
Action |
|
6 |
RESET |
Send a Reset request to the sector. |
|
Return: 0: Command sent |
Syntax 5
IntVal = M60870_5(Mode, SectorName, GroupNumber[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
GroupNumber |
Group number. Type INTEGER. |
Execution
|
Mode |
Mnemonic |
Action |
|
9 |
GRPINT |
Send a group interrogation to the sector. GroupNumber must be between 1 and 16. |
| 11 | GRPINT_COUNTER | Send a counter group interrogation to the sector. GroupNumber must be between 1 and 4. |
|
Return: 0: Command sent |
Syntax 6
IntVal = M60870_5(Mode, VariableName, Value[, Qualifier [, ResultVar]])
Return type: INTEGER.
|
Argument |
Meaning |
|
VariableName |
Name of the variable that is the target of the request. Type STR. |
| Value |
Value to send. Type DOUBLE or STR. Step position commands uses the following values: 0 or "UP" - Send a step up command |
| Qualifier |
Qualifier of the request if one wants to override the one defined at the variable level. The value can be either a predefined string or an analog value. Type STR or INTEGER. Numeric values greater than 3 can also be used for private values of the Qoc.Qu as described in the IEC 60870-5 standard. |
| String qualifier | Integer qualifier | Notes | |
| "" | Not supported | Use the empty string "" to apply the qualifier defined at the variable configuration level. | |
| "NO" | 0 | ||
| "SHORT_PULSE" | 1 | ||
| "LONG_PULSE" | 2 | ||
| "PERSISTENT" | 3 |
Execution
|
Mode |
Mnemonic |
Action |
| 12 | CMD_EXECUTE | Send an Execute command to the variable VariableName. |
| 13 | CMD_SBO_SELECT | Send a Select command for the variable VariableName. |
|
Return: 0: Command sent |
Syntax 7
IntVal = M60870_5(Mode, VariableName[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
VariableName |
Name of the variable that is the target of the request. Type STR. |
Execution
|
Mode |
Mnemonic |
Action |
|
14 |
CMD_SBO_CANCEL |
Send a Cancel command for the variable VariableName. |
|
Return: 0: Command sent |
||
| 15 | CMD_SBO_OPERATE | Send an Operate command for the variable VariableName. |
|
Return: 0: Command sent |
||
| 17 | READ | Send a Read request for the variable VariableName. |
|
Return: 0: Command sent |
Syntax 8
IntVal = M60870_5(Mode, DeviceName[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
DeviceName |
Name of the IEC 60870-5 device or standby device to force active. Type STR. The name shall be: For a main device: Network.Device |
Execution
|
Mode |
Mnemonic |
Action |
| 7 | SWITCHOVER | As part of field device redundancy, send a switchover command to force the device DeviceName active. |
|
Return: 0: Command sent |
Syntax 9
IntVal = M60870_5(Mode, SectorName, IOA[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
IOA |
Information Object Address to read. The value can be either a string or a raw analog value. Type STR or INTEGER. |
| String IOA | Description | |
| "x" | Structured 1 byte | |
| "x#y" | Structured 2 byte | |
| "x#y#z" | Structured 3 byte |
Execution
|
Mode |
Mnemonic |
Action |
| 16 | READ_IOA | Send a Read request for the Information Object Address IOA of the sector SectorName. |
|
Return: 0: Command sent |
Syntax 10
IntVal = M60870_5(Mode, VariableName, Qualifier, Value[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
VariableName |
The name of the variable that is the target of the request. Type STR. |
| Value | Value of the parameter to be set. Type DOUBLE. |
| Qualifier |
Identifier of the parameter to be set. Numeric values greater than 4 can also be used for private values of the Qpm.Kpa as described in the IEC 60870-5 standard. |
| String qualifier | Numeric qualifier | |
| "THRESHOLD_VALUE" | 1 | |
| "SMOOTHING_FACTOR" | 2 | |
| "LOW_LIMIT" | 3 | |
| "HIGH_LIMIT" | 4 |
Execution
|
Mode |
Mnemonic |
Action |
| 18 | SETPARAM | Send a request to set the parameter Qualifier to Value for the IOA mapped on the variable VariableName. |
|
Return: 0: Command sent |
Syntax 11
IntVal = M60870_5(Mode, SectorName, IOA, Qualifier, Value[, ResultVar])
Return type: INTEGER.
|
Argument |
Meaning |
|
IOA |
The Information Object Address that is the target of the request. The value can be either a string or an raw analog value.
Type STR or INTEGER. |
| String IOA | Description | |
| "x" | Structured 1 byte | |
| "x#y" | Structured 2 byte | |
| "x#y#z" | Structured 3 byte |
| Value | Value of the parameter to be set. Type INTEGER. |
| Qualifier |
Identifier of the parameter to be set. Numeric values greater than 4 can also be used for private values of the Qpm.Kpa as described in the IEC 60870-5 standard. |
| String qualifier | Integer qualifier | |
| "THRESHOLD_VALUE" | 1 | |
| "SMOOTHING_FACTOR" | 2 | |
| "LOW_LIMIT" | 3 | |
| "HIGH_LIMIT" | 4 |
Execution
|
Mode |
Mnemonic |
Action |
| 19 | SETPARAM_MNV | Send a request to set the parameter Qualifier to Value for the Information Object Address IOA of sector SectorName for a measure normalized value. |
| 20 | SETPARAM_MSV | Send a request to set the parameter Qualifier to Value for the Information Object Address IOA of sector SectorNamefor a measure scaled value. |
| 21 | SETPARAM_MFP | Send a request to set the parameter Qualifier to Value for the Information Object Address IOA of sector SectorName for a floating point value. |
|
Return: 0: Command sent |