Real Time Clock in PV450

Discuss issues and ideas you have to configuring displays with PowerVision
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Real Time Clock in PV450

Post by gajosz » Mon Jun 22, 2015 2:39 am

I'm using standard datalogger in PV450 and my timestamp is wrong. I have tried to set up the RTC writing a variable but it doesn't work.
e_RTC_Update set RTC to 4/12/2095 and starts from 0:00:00 hour
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Mon Jun 22, 2015 8:22 am

Hello gajosz,

If the time and date variables, RealTimeClock.Day, RealTimeClock.Hour, RealTimeClock.Minute, RealTimeClock.Second, and RealTimeClock.Year display accurately on your display after a power cycle, the same time and date will go in to the data log with the same values.

If I use a spreadsheet to view the data, sometimes the time and date don't look correct because of the format used for date and time in the spreadsheet.

What version of PowerVision Configuration Studio are you using? There are considerable differences in the datalogger between 2.6 and 2.7.

Please let us know if you continue to have a problem.
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jun 23, 2015 5:20 am

Hi,
I can read and write variables, change them, but that can't be stored.
Once I change the minute and write a variable, it stays on the screen until the minute is changing on the clock and coming back to previous value.
Also after the power cycle new values are not stored.
I'm using version 2.7
smRead(VariableIDs.RealTimeClock_Hour, u16_RTC_Value);
if (u16_RTC_Value >= TWENTYTHREE)
{
u16_RTC_Value = ZERO;
}
else
{
u16_RTC_Value++;
}
smWrite(VariableIDs.RealTimeClock_Hour, u16_RTC_Value);
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Tue Jun 23, 2015 7:31 am

Hello gajosz,

There is another group of RealTimeClock variables, RealTimeClock.Set.* that are the write variables. The other group are the read variables.

You need to change the RealTimeClock.Set.* and then tell the system to change the RTC by sending the System Manager Update Clock action. This action will update the clock (the read variable) and reboot the display.

The PV450 and PV780 standard configurations are examples of updating the RTC.
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jun 23, 2015 7:58 am

Thank you.
Once I change one parameter (hour for ex) is going to be stored, but the others are restoring to "0"
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Tue Jun 23, 2015 8:40 am

Yes, if you want a RTC variable to remain unchanged, you need to set the write variable to the read variable value.
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jun 30, 2015 8:23 am

Thank you for a help.
I'm still have a problem with a Error items.
Using Standard PV450 application, I have implement a User Setting page into my project.
By my mistake, iI have an Error and I can't find a solution.
I have calculation event which is empty and can't find it's owner.
Because of that i can't go any further as my application is ready for test but Can't Create the project.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Tue Jun 30, 2015 8:32 am

Hello gajosz,

Can you get a snippet of the error and post or send it to me?
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jun 30, 2015 8:42 am

Hi.
I'm not sure if that explain anything.
Please see attached screenshot.
Attachments
Capture_error.PNG
Capture_error.PNG (118.06 KiB) Viewed 190 times
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Tue Jun 30, 2015 8:56 am

What happens when you search for the calculation event?
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jun 30, 2015 9:02 am

Informational-Reference found on: Script - Set_isLeapYear-Reference:ScriptText
Informational-Reference found on: Script - Set_daysInMonth-Reference:ScriptText
Informational-Reference found on: Script - sc_USB_Handling-Reference:ScriptText
Informational-Reference found on: Script - sc_USB_Handling-Reference:ScriptText
Informational-Reference found on: Script - Modbus-Reference:ScriptText
Informational-Reference found on: Script - Modbus-Reference:ScriptText
Informational-Reference found on: Script - Module_Boolean_Handler-Reference:ScriptText
Informational-Reference found on: Script - Module_Handler-Reference:ScriptText
Informational-Reference found on: Script - Module_Handler-Reference:ScriptText
Informational-Reference found on: Script - Live-Reference:ScriptText
Informational-Reference found on: Script - Historic-Reference:ScriptText
Informational-Reference found on: Script - Historic-Reference:ScriptText
Informational-Reference found on: Script - sc_Page_Timer-Reference:ScriptText
Informational-Reference found on: Script - sc_Page_Timer-Reference:ScriptText
Informational-Reference found on: Script - New Script-Reference:ScriptText
Informational-Reference found on: Script - New Script-Reference:ScriptText
Informational-Reference found on: Script - sc_Password_Script-Reference:ScriptText
Informational-Reference found on: Script - sc_Analysis-Reference:ScriptText
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Thu Jul 02, 2015 8:09 am

Problem not fixed.
Thank you for help.
I'm still having a problem with a day displaying as on my day window i see only number of the day and when i change it - becomes text "nan".
I can't find it why.
The other thing is the date and 12 or 24 clock option is stored but time not.
When month changed - saves wrong one. When st 11, saves 10, etc ???
I need a help!!!
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Fri Jul 03, 2015 4:10 am

RTC fixed.
Just problem with "nan" value on day change
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Real Time Clock in PV450

Post by stalley » Mon Jul 06, 2015 8:37 am

Hello gajosz,

"nan" indicates an invalid value. In many cases, a variable is not be initialized properly. That is where I would start to try to find the problem.

Make sure that the variable used in the display gauge is initialized and any variables being used to calculate the increment or decrement.
Sara Talley
Software Engineer
Enovation Controls
gajosz
Posts: 9
Joined: Fri May 08, 2015 9:18 am

Re: Real Time Clock in PV450

Post by gajosz » Tue Jul 07, 2015 1:41 am

Thank you for a help.
My RCT is working fine.
There's no "nan" anymore.