beautypg.com

Special message 13: set clock using variable data – Rockwell Automation 2706 DL20 SERIES G USER MANUAL User Manual

Page 59

background image

Chapter 5
Run Mode

5–11

Special Message 13: Set Clock Using Variable Data

Hosts that have real time clocks should use special message #13 to set the
clock. To set the clock using special message #13, up to eight variables must
be sent. These eight variables represent (in order) seconds, minutes,
12/24-hours mode, hours, day, date, month and year. Table 5.A lists the
variable order and the allowable data ranges:

Table 5.A
Clock Variable Data

Variable

Meaning

Range

1

Seconds

0 - 59

2

Minutes

0 - 59

3

Mode

0 = 12 hour
1 = 24 hour

4

Hours

1 - 12 (12 hour mode)
0 - 23 (24 hour mode)

5

Day

1 - 7

6

Date

1- 31

7

Month

1 - 12

8

Year

0 - 99

To set the clock, send the variables in the correct order and trigger special
message #13. The variables are checked for out-of-range and used to set the
clock.

An out of range variable leaves the clock unchanged. For example, if the
variable containing the seconds count is set to 80 (80 seconds being an
invalid number of seconds), the old setting is maintained. This allows you to
selectively update one or more clock settings.

Note: You can set an illegal number of days for the month. You can never
set over 31 days per month, or that setting is rejected; but you can still set 31
days for a short month.