8 realtime clock (only etcxm), Realtime clock (only etcxm), Plc programming – Lenze ETC Motion Control User Manual

Page 417

Advertising
background image

PLC programming

Library

Realtime clock (only ETCxM)

8

8.8

8.8.8

l

417

EDSTCXN EN 2.0

8.8.8

Realtime clock (only ETCxM)

8.8.8.1

RTC_GetTime_DT (only ETCxM)

FUNCTION RTC_GetTime_DT: BOOL

VAR_INPUT

GetTime_pr

: DWORD;

END_VAR

This function allows for the realtime clock of the control to be read. The
function must be given the address of a variable of type DT (see example).
The return value TRUE of the function indicates that the time could be read.

ret_bit

: BOOL;

time_dt

: DT;

ret_bit = RTC_GetTime_DT(ADR(time_dt));

8.8.8.2

RTC_SetTime_DT (only ETCxM)

FUNCTION RTC_SetTime_DT: BOOL

VAR_INPUT

SetTime_dt

: DT;

END_VAR

With this function the realtime clock of the control is set to the transferred
value. The return value TRUE of the function indicates that the time has been
written to the clock component.

ret_bit

: BOOL;

time_dt

: DT := dt#2003−11−15−00:00:00;

ret_bit = RTC_SetTime_DT(time_dt);

Declaration

Description

Example

Declaration

Description

Example

Advertising