F_iecSetDPI

This help function copies double point information to a byte variable. In the TwinCAT PLC the double point information occupies 2 bit of process data. In a byte variable, the information of up to 4 double points can therefore be mapped.
Syntax
FUNCTION F_iecSetDPI: BYTE
VAR_INPUT
in : BYTE;
offset : UDINT(0..3);
eDPI : E_IEC870_5_101DPI;
END_VAR
Inputs
in: Target variable into which the double point information is to be copied.
offset: Bit offset of the double point information.
eDPI: The new value of the double point information.
Sample in ST
The information of the four double points is set to ON.
PROGRAM MAIN
VAR
memarea AT%M* : ARRAY[0..10] OF BYTE;
END_VAR
memarea[0] := F_iecSetDPI( memarea[0], 0, eIEC870_DPI_ON );
memarea[0] := F_iecSetDPI( memarea[0], 1, eIEC870_DPI_ON );
memarea[0] := F_iecSetDPI( memarea[0], 2, eIEC870_DPI_ON );
memarea[0] := F_iecSetDPI( memarea[0], 3, eIEC870_DPI_ON );
Requirements
Development environment | Target system type | PLC libraries to be linked (category group) |
---|---|---|
TwinCAT v3.1.4012.0 | PC oder CX (x86, x64, Arm®) | Tc2_IEC60870_5_10x (Communication->IEC60870) |