wehg Posted May 17, 2016 Share Posted May 17, 2016 Hello, Is there a convenient way to distinguish between a cold startup condition, versus a Build & Download of the project? We have some time related requirements that need to be monitored following a cold startup, but don't want them to be reset upon a Build & Download. Thanks Link to comment Share on other sites More sharing options...
steve.milici Posted May 17, 2016 Share Posted May 17, 2016 A global variable (P-variable or CS Q-variable) will maintain a preset value through a “Build and Download”. They are however cleared to zero on a reset. In my Power Clipper I have the following in pp_startup.txt: Clipper[0].GpioData[0].16 = p999 If I set p999=1 just before a “Build and Download” it will set the output. On a “$$$” it does not. Link to comment Share on other sites More sharing options...
wehg Posted May 18, 2016 Author Share Posted May 18, 2016 A global variable (P-variable or CS Q-variable) will maintain a preset value through a “Build and Download”. They are however cleared to zero on a reset. In my Power Clipper I have the following in pp_startup.txt: Clipper[0].GpioData[0].16 = p999 If I set p999=1 just before a “Build and Download” it will set the output. On a “$$$” it does not. Thanks Steve, I think I can work with something similar. Link to comment Share on other sites More sharing options...
Recommended Posts