T_CP40Time2a

Binary (5 byte) time format.

Syntax

TYPE T_CP40Time2a :
STRUCT
    IVTisMinute : BYTE := 16#00;
    SURes1Hour  : BYTE := 16#00;
    DOWDay      : BYTE := 16#01;
    PtiEtiMonth : BYTE := 16#01;
    Res2Year    : BYTE := IEC870_DEFAULT_CP56TIME2A_YEAR;
END_STRUCT
END_TYPE

IVTisMinute: Bit 7 = IV := <0=valid, 1=invalid time>, bit 6 = Tif (tariff information) := <0..1>, bits 0..5 = minute := <0..59>.

SURes1Hour: Bit 7 = SU := <0=standard time, 1=summer time>, bits 5..6 = res1 (reserved) := <0>, bits 0..4 = hour := <0..23>.

DOWDay : Bits 5..7 = DOW (day of the week) := <0=not used, 1=Monday..7=Sunday>, bits 0..4 = day (day of the month) := <1..31>.

PtiEtiMonth: Bits 6..7 = Pti (power tariff information) := <0..3>, bits 4..5 = Eti (energy tariff information) := <0..3>, bits 0..3 = month := <1..12>.

Res2Year: Bit 7 = res2 (reserved) := <0>, bits 0..6 = year := <0..99>.

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)
Tc2_SerialCom (Communication->Serial)
Tc2_TcpIp (Communication->TcpIp)
Tc2_Utilities (System)