With a program using PreserveVariables, is there any programming technique which will allow me to detect when the logger program was just loaded (as opposed to restarted due to a power outage)?
You can examine the value of the ProgSignature value in the status table. If anything in the program has changed, this value will be different from the previous run.
Thank you very much. I was hoping as much.
What I'm really trying to do is simulate the CR10X situation where all the variables are initialized to zero when a new program is loaded by my users. You wouldn't happen to have a approach for that would you?
The CRx000 dataloggers have a value in the Status table that might give you what you want. There is a StartUpCode. This value is 0 if a program is sent to the datalogger or if the user triggers a recompile of the program (or the datalogger does a watchdog reset and the program is recompiled, I think -- haven't confirmed the watchdog case). However, if the datalogger is power cycled and the program recompiles, the startup code will be set to 1.
You can access this value programmatically using the Data Table Access syntax (explained in the help). So, for instance, you could populate a variable that could be monitored using:
MyStartUpVar=Status.StartUpCode
Dana W.