Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Run program code only once


Birk Aug 9, 2012 03:24 PM

Hi everybody,

I'm trying to include a routine in my CR1000 program that does some external device configuration (via RS232)upon program start.

I'd like to have the program do this only once, and never again - even not after I do a logger reset by switching power on and off.

Is there any possibility to do so?

A constant with an if-clause does not work because I cannot change the constant from within the program. A variable with an if-clause does not work because at power off the logger will forget this variable.


aps Aug 9, 2012 03:28 PM

Include the Preservevariables declaration in the program. It will preserve variables through power cycles and certain ways of restarting programs. (See the help for more details)

Log in or register to post/reply in the forum.