Historic data log in PAC Display - how to log at specific time?

I’m modifying a PAC code that I’ve inherited from someone else, so I’m trying to make minimal changes to achieve my goal (I have no experience with PAC).

The goal is simply to make a log file that logs some values at the end of every day (11:59:59 pm). I’ve found out about Historical Data Logging in PAC Display Configurator which works well (as I avoid meddling with the control strategy code), except that the logging time is based on when the program was started up (so daily logging ends up logging one entry at 1:28pm every day, and then changes again whenever the computer gets rebooted).

Is there a simple way to make the Historical Data Logging feature start logging at a specific time (i.e. midnight) ?

Thank you for your help!
William

Hi William,

Welcome to the forums! Don’t forget we have free training here at opto in Temecula (if you see a 0 for the seats left, sign up anyway to get on the wait list for that month, we often have folks drop as schedules change and we draw from those lists).

On this question, some suggestions from our support team:

If you want to log at a certain time each day, it would be best to configure the Historic Data Log to be based on a Start Trigger with the number of samples set to 1. Also configure a Notification to reset the trigger.

In your PAC Control strategy, you would add an integer variable to be used as the trigger. Then add logic such that when the time you want to log occurs, you set the trigger. PAC Display will scan this integer variable and when it see’s the value you’ve configured for the trigger, it will log a sample of data. The notification then sets the variable back to 0. Your PAC Control strategy logic will have to take into account that it should only set the trigger when there is a transition from the previous time being before the event time and the current time being after the event time.

It would also be good to configure PAC Display to sync the controller time to PC time daily because the controller time can drift.

Hoping that helps! Let us know how you go…
Thanks,
OptoMary

1 Like