B99_PCTIMENODE
PROGRAM TEST B99 VAR LINT1 : LINT; // CAS V SEKUNDáCH SINT1,SINT2,SINT3 :SINT; END_VAR LINT1 := LIB.CORE.V1_0.B99_PCTIMENODE(LOCAL:=TRUE, SEC=>SINT1,MIN=>SINT2,HOUR=>SINT3); END_PROGRAM
LIB\CORE
V1.0
The block returns UTC or local time, together with iother time units.
Input | Type | Description | Default value |
LOCAL | BOOL | Local or UTC time? (UTC = false, Local = true) | True |
Output | Type | Description |
⇒ | LINT | Time in s |
MSEC | INT | Milliseconds (May not be supported for certain platforms) |
SEC | SINT | Seconds |
MIN | SINT | Minutes |
HOUR | SINT | Hours |
DAY | SINT | Days |
WDAY | SINT | Day of week (0 = Sunday, 1 = Monday, …, 6 = Saturday) |
MON | SINT | Months |
YEAR | INT | Years |
DAYLIGHT | BOOL | daylight=true means that the Daylight saving time (DST) is active (only makes sense for local time) |
REMAINDAY | SINT | Remaining days until end of the month (last day: remainday = 0) |
The block outputs the real time of the SoftPLC. The output ⇒ gives total time in seconds starting at 1.1.1970, 0:00, and the wday output indicates the day of week (0 = Sunday, 1 = Monday, …, 6 = Saturday).
The parameter local specifies if the time to consider is UTC or local time (local=true means time of the PC or PLC-preset time zone).
For MiniPLC platform-based controllers, the msec output = 0.