Sunteți pe pagina 1din 6

HVAC&R Library:

RTC Set Date Time


Product Specification

The content of this document is the property of Schneider Electric. It may not be reproduced in
whole or in part without written permission of the owners.
Schneider Electric, All rights reserved.

Revision History
Version
V1.0

Date
05-10-11

V1.1

13-10-11

Author
Marcin
Wojciechowicz
Marcin
Wojciechowicz

Description
Initial Release
Update after review

Toolbox - Hx_Calculator

Page 2 of 6
Schneider Electric

Table of Contents
1

Function Block Description ........................................................................................... 5


1.1
Function Block RTC Set Date Time ..................................................................................... 5
1.1.1 Function Block Pin Diagram ................................................................................................ 5
1.1.2 Input Pin Description ........................................................................................................... 5
1.1.3 Output Pin Description ........................................................................................................ 5
1.2
Design ..................................................................................................................................... 6
1.2.1 Internal structure ................................................................................................................. 6

Toolbox - Hx_Calculator

Page 3 of 6
Schneider Electric

Table of Figures
Figure 1: Function Block Pin diagram .................................................................................................. 5
Figure 2: Function Block UML diagram................................................ Error! Bookmark not defined.
Figure 3: Hx diagram...............................................................................Error! Bookmark not defined.

Toolbox - Hx_Calculator

Page 4 of 6
Schneider Electric

Function Block Description

1 Function Block Description


The function is used to set the controller Real Time Clock (RTC). After the clock is set the
function block will send the broadcast message to synchronize all the other Real Time Clocks
in the devices connected to the expansion bus (for example RTC clock in the remote display).

1.1 Function Block RTC Set Date Time


1.1.1 Function Block Pin Diagram

Figure 1: Function Block Pin diagram

1.1.2 Input Pin Description


Input

Data Type

dtDateTime

CJ_DATETIME

xTrigger

CJ_BIT

Description

Range

New date and time value


0...214748
to be set during the next
3647
xTrigger event.
The rising edge of the
xTrigger input will write
the dtNewDateTime to
the local RTC clock and
TRUE
send the broadcast
or
message to
FALSE
synchronize all the
other RTC clocks
connected to the
expansion bus.

Scaling/
Unit

Remarks

n/a

n/a

1.1.3 Output Pin Description


Output

xResult

Data Type

Description

CJ_BIT

Returns the result of


the last set date time
operation.
FALSE last operation
was successful
TRUE last operation
was failed

Toolbox - Hx_Calculator

Range

TRUE
or
FALSE

Scaling/
Unit

n/a

Remarks
The output is
not
persistent; is
reset to
FALSE after
power cycle.

Page 5 of 6
Schneider Electric

Function Block Description

1.2 Design
1.2.1 Internal structure
Internally the function block is using the system function RTCWrite(CJ_BYTE ClockID: 0 = M168
controller clock, CJ_DATETIME DateTime: dtDateTime) function to set the controller RTC clock. After
that the system command is send to synchronize all RTC clocks connected to the expansion bus
CJ_SendCommand(CJ_BYTE channel: 0 = CAN local, CJ_BYTE node: 255 = Broadcast, CJ_BYTE
command: 3 = CJ_CMD_SYNC_CLOCK, CJ_SHORT par1: 0);

Toolbox - Hx_Calculator

Page 6 of 6
Schneider Electric

S-ar putea să vă placă și