xLadder user manual-V2.0.0.6

6.2 Clock instruction

6.2.1 Read and set the real time clock

Operand

Input / output

Data type

T

VB, IB, QB, MB, SMB, SB, LB, *VD, *AC, *LD

Byte

TODR instruction reads the current time and date from the

hardware clock and load it into the time buffer of 7bytes

starting at the address T.

The TODW instruction writes the current time and date to

the hardware clock that is specified by the 7 bytes time

buffer at the beginning of the T .

All date and time values must be encoded in USINT format.Please refer to the

following table.

T byte

direction

byte data type

0

second

USINT

1

minute

USINT

2

hour

USINT

3

date

USINT

4

week

USINT

5

month

USINT

6

year

USINT

83

Made with FlippingBook - Online magazine maker