![ALTUS Hadron Xtorm Скачать руководство пользователя страница 137](http://html1.mh-extra.com/html/altus/hadron-xtorm/hadron-xtorm_user-manual_2914394137.webp)
4. Configuration
136
Parameter
Type
Description
bRequest
BOOL
When TRUE, executes the command
dwVariableAddr
DWORD
Command variable address to send
udiCommandTimeOut
UNSIGNED
DOUBLE INT
Time for timeout of this command
Table 4-89. DNP3_ColdCommand Block Input Parameters
Parameter
Type
Description
eExecStatus
ENUM (BYTE)
Status of execution, indicates if a new command can be sent.
The values are as follows:
DNP3_COMMAND_EXEC_STATUS_DONE (0)
DNP3_COMMAND_EXEC_STATUS_RUNNING (1)
eErrorStatus
ENUM (BYTE)
Indicates whether the last command was successful.
DNP3_COMMAND_ERROR_STATUS_NO_ERROR (0)
DNP3_COMMAND_ERROR_STATUS_TIMEOUT (1)
DNP3_COMMAND_ERROR_STATUS_NO_SELECT (2)
DNP3_COMMAND_ERROR_STATUS_FORMAT_ERROR (3)
DNP3_COMMAND_ERROR_STATUS_NOT_SUPPORTED (4)
DNP3_COMMAND_ERROR_STATUS_ALREADY_ACTIVE (5)
DNP3_COMMAND_ERROR_STATUS_HARDWARE_ERROR (6)
DNP3_COMMAND_ERROR_STATUS_UNDEFINED (7)
DNP3_COMMAND_ERROR_STATUS_INVALID_ADDRESS (8)
DNP3_COMMAND_ERROR_STATUS_WRONG_TIMEOUT (9)
DNP3_COMMAND_ERROR_STATUS_INVALID_VALUE (10)
DNP3_COMMAND_ERROR_STATUS_UNINITIALIZED (11)
Table 4-90. DNP3_ColdCommand Block Output Parameters
Application example, in ST:
The user sends the Select Before Operate command to an IED via DNP3.
PROGRAM UserPrg
VAR
SendAnalogOutReal : DNP3_AnalogCommandReal;
END_VAR
SendAnalogOutReal.dwVariableAddr := ADR(GVLData.SingleAnalogOutReal);
SendAnalogOutReal();
IF(SendAnalogOutReal.eExecStatus = DNP3_COMMAND_EXEC_STATUS_DONE) THEN
IF SendAnalogOutReal.bRequest = TRUE
AND SendAnalogOutReal.eCommand = DNP3_COMMAND_TYPE_SELECT
AND SendAnalogOutReal.eErrorStatus = DNP3_COMMAND_ERROR_STATUS_NO_ERROR
THEN
SendAnalogOutReal.eCommand := DNP3_COMMAND_TYPE_OPERATE;
ELSE
SendAnalogOutReal.bRequest := FALSE;
END_IF
END_IF
Status Codes for DNP Commands
Several DNP3 commands may return status codes. Such codes are shown in the following situations:
response to output commands, associated to control blocks, analog output blocks and output
command events. Table 4-91 indicates a list of valid status codes: