Time #W
Command group to work with the built-in RTC.
Set time (Watch Time Date set) |
Hour, Minute (act. time), Second (act. time), Day (act. time), Month (act. time), Year (act. time), Adjust (0) |
|
Define object group as watch (Watch Group Clock) |
Group-ID, HourHand-ID, MinuteHand-ID, SecondHand-ID(none) |
|
Define print format for RTC (Watch Define Format) |
"Dateformat" |
|
Define month names (Watch Define Month strings) |
"JAN";"FEB";"MAR";"APR";"MAI";"JUN";"JUL";"AUG";"SEP";"OCT";"NOV";"DEC" |
|
Define day of week names (Watch Define Day strings) |
"SUN";"MON";"TUE";"WED";"THU";"FRI";"SAT" |
|
Send time (ASCII) (Watch Send Ascii) |
"Dateformat"; date (act. time); 1/100sec |
|
Send time (Unicode) (Watch Send Unicode) |
"Dateformat"; date (act. time); 1/100sec |
|
Send time (Binär) (Watch Send Binary) |
"Dateformat"; date (act. time) |
|
Define base year for time calculation (Watch Define base Year) |
Year |
#WTD |
Hour, Minute (act. time), Second (act. time), Day (act. time), Month (act. time), Year (act. time), Adjust (0) |
The command sets the current time. If the optional parameter Adjust is set to 1, the internal crystal will be calibrated the next time (Adjust must also be 1).
#WGC |
Group-ID, HourHand-ID, MinuteHand-ID, SecondHand-ID(none) |
The command converts an existing group into a clock. HourHand-ID specifies the Obj ID for the hour hand, MinuteHand-ID the Obj ID for the minute hand, SecondHand-ID the Obj ID for the second hand.
... #PPP 1,<P:picture/Clock.evg>,120,120,5,200,200,0 #PPP 2,<P:picture/Needle.evg>,120,156,5,6,100,0 #PPP 3,<P:picture/Needle.evg>,120,146,5,6,80,0 #WGC 4,3,2 ... |
#WDF |
"Dateformat" |
The command changes the date format.
#WDM |
"JAN";"FEB";"MAR";"APR";"MAI";"JUN";"JUL";"AUG";"SEP";"OCT";"NOV";"DEC" |
The command is used to set 12 individual strings for the month names.
#WDW |
"SUN";"MON";"TUE";"WED";"THU";"FRI";"SAT" |
The command is used to set 7 individual strings for the weekday names (starting with Sunday).
#WSA |
"Dateformat"; date (act. time); 1/100sec |
The command places the date and time as an ASCII string in the send buffer. The feedback is structured as follows:
ESC |
W |
S |
A |
ASCII-String |
Ending |
... |
|
$1B |
$57 |
$53 |
$41 |
$00 |
See also year(), month(), day(), weekday(), hour(), minute(), second()
#WSU |
"Dateformat"; date (act. time); 1/100sec |
The command places the date and time as a Unicode string in the send buffer. The feedback is structured as follows:
ESC |
W |
S |
U |
Unicode-String |
Ending |
... |
|
$1B |
$57 |
$53 |
$55 |
$00 |
See also year(), month(), day(), weekday(), hour(), minute(), second()
#WSB |
"Dateformat"; date (act. time) |
The command puts the date and time in the send buffer as a signed 32-bit value. The feedback is structured as follows:
ESC |
W |
S |
B |
Hour |
Minute |
Second |
Day |
Month |
Year |
Weekday |
... |
$1B |
$57 |
$53 |
$42 |
16-Bit value |
16-Bit value |
16-Bit value |
16-Bit value |
16-Bit value |
16-Bit value |
16-Bit value |
See also year(), month(), day(), weekday(), hour(), minute(), second()
Define base year for time calculations (from V1.3)
#WDY |
Year |
The command changes the base year for the time calculation. Possible values are 1970,1980,1990,2000,2010,2020,2030. The range of values is -68 to +67 years. The preset second count starts on January 1st, 2000 at 0: 0: 0. This leads to a possible range from 1932 to the end of 2067.
Date formats
Format |
|
%[ ]h |
Hour |
%[ ]m |
Minute |
%[ ]s |
Second |
%1t |
1/10 Second |
%t |
1/100 Second |
%[ ]D |
Day |
%[ ]M |
Month |
%[ ]Y |
Year |
%[ ]W |
Day of week (String) |
%[ ]N |
Month (String) |
Optional [ ] |
|
0 |
Two digits with leading 0 (Default) |
1 |
Minimum 1 digits without leading character |
2 |
Two digits with leading spaces |
4 |
Four digits (default for year) |
Week string and month string:
Optional [ ] |
|
0-9 |
x chars are shown for the week string or month string. |
Examples |
|
"%h:%m:%s"; |
09:25:04 |
"%D.%M.%Y"; |
20.12.2019 |
"%D %N %Y"; |
20 December 2019 |
"%W, %D.%M.%Y"; |
Friday, 20.12.2019 |