4. Configuration
147
DNP3 Client Driver
If the variable is associated to an IED point in a DNP3 Client driver, the command is redirected and
sent to be executed by the IED itself and the value of the variable stored in the CPU memory is not
updated. In case of trip/close commands, typically the variable must be of type DBP. However, the
redirection works in the same way even if a variable of type BOOL is used.
Notice that due to protocol features, the DNP3 client driver is able to execute only one command at a
time. That is, while a command to a particular point is not finalized (response or time-out), you
cannot trigger a new command, even to a different point. Thus, if a command is redirected from the
DNP3 Server to an IED associated to a busy DNP3 Client driver, it returns the error code 0x05
(already active).
Commands Interception
The interception of commands received by the DNP3 Server driver is accomplished through the
CommandReceiver function block as described in section Interception of Commands from Control
Center. This feature allows the interception of selection and operation commands (functions 3, 4, 5
and 6 of DNP3 protocol).
Below is shown an example of an application in ST. It shows the interception of a command for a
DNP3 point mapped to the variable “Singlepoint”.
PROGRAM UserPrg
VAR
bSetup: BOOL:= TRUE;
CRReceive: CommandReceiver;
CComamnd: COMMAND_T;
CRResult: COMMAND_RESULT:= COMMAND_RESULT.SUCCESS;
END_VAR
IF bSetup THEN // It executes the function Setup in the first cycle
CRReceive.dwVariableAddr:=ADR(GVLData.SinglePoint);
CRReceive.bExec:= TRUE;
CRReceive.eCommandResult:= COMMAND_RESULT.NONE;
CRReceive.dwTimeout:= 500;
bSetup:= FALSE;
RETURN;
END_IF
IF CRReceive.bCommandAvailable THEN // Case the command is intercepted:
CComamnd:= CRReceive.sCommand; // It saves the command data
CRReceive.eCommandResult:= CRResult; // It sends the “SUCCESS” answer
CRReceive.bDone:= TRUE;
END_IF
CRReceive();
IF CRReceive.bDone THEN
CRReceive.bDone:= FALSE;
END_IF
IEC 60870-5-104
– Data Types
Table 4-101 shows the type of the variable supported by HX3040 for each one of the IEC 60870-5-
104 protocol data types.