EasyManua.ls Logo

Fuji Electric SPH Series - How to Monitor and Set the Calendar from an Application Program

Fuji Electric SPH Series
151 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1-62
Section 1 Specications
1-9-4 How to monitor and set the calendar from an application program
1) HW_RTC (Hardware RTC) - Original FB
Use the hardware RTC function block (HW_RTC) to monitor and set the calendar from an application program. For details, see
the description of HW_RTC.
Notes:
DT type (date and time type) data should be specied for HW_RTC. The range of DT data is from 1970-01-01 00:00:00 to
2106-02-07 06:28:15. However, the setting range of HW_RTC is from 1970-01-01 00:00:01 to 2069-12-31 23:59:59.
(If any date and time after 2070 is specied, an unexpected value will be set.)
To set the calendar using data input from an external device, convert it to DT type. DT type data are equivalent to a 32-bit
unsigned integer in seconds that starts at January 1st, 00:00:00, 1970.
Examples:
(1) 1970-01-01 12:34:56
g
DINT#45296 WORD#16#0000B0F0
(2) 1998-01-01 00:00:00
g
DINT#883612800 WORD#16#34AADC80
2) RTC (real-time clock) - IEC standard FB
The IEC standard function block RTC cannot be used to set the calendar value. If RTC is used to make calendar settings, a
relative value to the calendar is set in the instance area and the calendar will run with the set value.
3) Accessing the calendar from SPF original special relay
The “year,” “month,” “day,” “hour,” “minute,” “second,” and “day of the week” data of the built-in calendar are automatically set in
the SPF original special register. You can directly access them from an application program. In addition, calendar values can be
written to the built-in calendar from the SPF original special register.
Address Name Description
%MW1.61442 Year data
Sets the year data (last two digits of Christian year) of the built-in calendar.
(BCD: 00 to 99)
Example: 17 for 2017
%MW1.61443 Month data Sets the month data of the built-in calendar. (BCD: 01 to 12)
%MW1.61444 Day data Sets the day data of the built-in calendar. (BCD: 01 to 31)
%MW1.61445 Hour data Sets the hour data of the built-in calendar. (BCD: 00 to 23)
%MW1.61446 Minute data Sets the minute data of the built-in calendar. (BCD: 00 to 59)
%MW1.61447 Second data Sets the second data of the built-in calendar. (BCD: 00 to 59)
%MW1.61448 Day of the week data
Sets the day of the week data of the built-in calendar.
0: Sun, 1: Mon, 2: Tue, 3: Wed, 4: Thu, 5: Fri, 6: Sat
Address Name Description
%MX1.61449.0 Calendar write request
When this ag is set ON, “year, month, day, time, minute, and second data” set
in the “built-in calendar data (%MW1.61442 to %MW1.61447)” are written to the
built-in calendar.
This bit is automatically set OFF.
The set data are written to the calendar at the end of the default task. Set the calendar data and set ON “Calendar write “request”
within the same scan.

Table of Contents

Related product manuals