The CALENDAR device is used to get and set the current date and time information.
The device does not use hardware resources. It is not necessary to define the sampling time because the operation is carried out in a time not significantly. In the INTDEVICE section of the configuration unit must be add the following definition:
;--------------------------------- ; Device declaration ;--------------------------------- INTDEVICE <device_name> CALENDAR
Where:
<device_name> | device name assigned |
CALENDAR | keyword that identifies the device calendar. |
Declaration example:
;--------------------------------- ; Device declaration ;--------------------------------- INTDEVICE myCalen CALENDAR
The device continuously updates the current date and time data.
Name | Dimensions | Default value | Access type | Unit of measure | Valid Range | Write conditions | Description |
---|---|---|---|---|---|---|---|
sec | Byte | - | RW | s (seconds) | from 0 to 59 | - | Seconds The parameter indicates the seconds the current time. |
min | Byte | - | RW | minutes | from 0 to 59 | - | Minutes The parameter indicates the minutes of the current time. |
hour | Byte | - | RW | hours | from 0 to 23 | - | Hour The parameter indicates the time current local time. |
date | Byte | - | RW | days | from 1 to 31 | - | Day The parameter indicates the day of the current date. |
month | Byte | - | RW | mounth | from 1 to 12 | - | Mounth The parameter indicates the month of the current date using the following 1 January 2 February 3 March 4 April 5 May 6 June 7 July 8 August 9 September 10 October 11 November 12 December |
year | Word | - | RW | year | from 2000 to 2100 | - | Year The parameter indicates the current year. |
There aren't the states.
There aren't commands.