EasyManuals Logo

Panasonic FPG-COM2-A User Manual

Panasonic FPG-COM2-A
332 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
Page #56 background imageLoading...
Page #56 background image
FPΣ User's Manual
3.6 Clock/Calendar Function
39
ST Body
if (DF(bStartCompensation)) then
(* Read the current time from the RTC *)
dtbcdCurrent.MinSec:=sys_wClockCalendarMinSec;
dtbcdCurrent.DayHour:=sys_wClockCalendarDayHour;
dtbcdCurrent.YearMonth:=sys_wClockCalendarYearMonth;
(* Decide whether to round up (seconds>=30) *)
if ((dtbcdCurrent.MinSec AND 16#00FF)>30) then
(* To round up 1 minute (16#100) is added to the current
time *)
F157_ADD_DTBCD_TIMEBCD(s1_DTBCD := dtbcdCurrent,
s2_TIMEBCD := 16#100,
d_DTBCD =>
dtbcdCurrent);
end_if;
(* Set the seconds to zero *)
dtbcdCurrent.MinSec:=dtbcdCurrent.MinSec AND 16#FF00;
(* Write the current time into the RTC and set the RTC using
'sys_wClockCalendarSet' *)
sys_wClockCalendarMinSec
:=dtbcdCurrent.MinSec;
sys_wClockCalendarDayHour:=dtbcdCurrent.DayHour;
sys_wClockCalendarYearMonth:=dtbcdCurrent.YearMonth;
sys_wClockCalendarSet:=16#8000;
end_if;

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Panasonic FPG-COM2-A and is the answer not in the manual?

Panasonic FPG-COM2-A Specifications

General IconGeneral
BrandPanasonic
ModelFPG-COM2-A
CategoryController
LanguageEnglish

Related product manuals