F_iecSetDPI

This function encodes the double point information in the byte variable. One byte variable yields up to 4 double point information. Every double point information occupies 2 bits.
FUNCTION F_iecSetDPI: BYTE
VAR_INPUT
in : BYTE; (* Byte variable where the new double point information have to be encoded. *)
offset : UDINT(0..3);(* Double point information offset. *)
eDPI : E_IEC870_5_101DPI; (* The new value of double point information. *)
END_VAR
Example:
Setting the information of 4 double points to ON.
PROGRAM MAIN
VAR
memarea AT%MB0 : 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 | PLC libraries to include |
---|---|---|
TwinCAT v2.10.0 Build >= 1324 | PC or CX (x86, ARM) | TcIEC870_5_101.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib are included automatically ) |
See also