I want to have a PAC Display project write an historic log file every 30 seconds containing the latest values for a number of variables.
Every time the file is written, I want it to overwrite the previous file so that at any given time, this file (if it exists) will contain only one “line” of data, that data being the latest values for these variables.
The purpose of this file is to allow a separate program to look for, and read (if the file exists) these latest values without needing to scan down through an ever-lengthening file to find the last line and read that single line’s data. So naturally, this file needs to have the same filename every time.
This seems like it should be possible. I do it in Visual Basic in a number of situations as a way to transfer information over a network. But I just can’t figure out how to do it within Pac Display.
All I’ve been able to do is have it append to a file that gets longer and longer as new data is added with every “trigger”.
There’s probably something easy I’m overlooking.