Chapter 6. Service Request Function
288
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
POSIX
The POSIX format of the Time-of-Day clock uses two signed 32-bit integers (two DINTs) to represent
the number of seconds and nanoseconds since midnight January 1, 1970. Reading the clock in POSIX
format might make it easier for your application to calculate time differences. This format can also
be useful if your application communicates to other devices using the POSIX time format. To read
and/or change the date and time using POSIX format, enter SVC_REQ 7 with this parameter block:
Parameter Block Format
Address
Example: December 1, 2000 at 12 noon
1 = change or 0 = read
Address
0
4 (POSIX format)
1
4
seconds (LSW)
2
975,672,000
(MSW)
3
nanoseconds (LSW)
4
0
(MSW)
5
The PACSystems CPU’s maximum POSIX clock value is F48656FE (hexadecimal) seconds and
999,999,999 (decimal) nanoseconds, which corresponds to December 31st, 2099 at 11:59 pm. This is
the maximum POSIX value that SVC_REQ 7 will accept for changing the clock. This is also the
maximum POSIX value SVC_REQ 7 will return once the Time-Of-Day clock passes this date.
If SVC_REQ 7 receives an invalid POSIX time to write to the clock, it does not change the Time-Of-Day
clock and disables its power-flow output.
Note:
When reading the PACSystems CPU clock in POSIX format, the data returned is not easily
interpreted by a human viewer. If desired, it is up to the application logic to convert the
POSIX time into year, month, day of month, hour, and seconds.
Note:
At 03:14:08 UTC on 19 January 2038, 32-bit versions of the Unix time stamp will cease to
work, as it will overflow the largest value that can be held in a signed 32-bit number
(7FFFFFFF16 or 2,147,483,647). Before this moment, software using 32-bit time stamps will
need to adopt a new convention for time stamps, and file formats using 32-bit time stamps
will need to be changed to support larger time stamps or a different epoch.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...