silogarrett Posted September 3, 2010 Share Posted September 3, 2010 Hello, I've created a variable value component that counts elapsed time from when my start button is pressed. It uses two global variables nested inside one of my auto-start sequences: global timecounter = 0 global totaltime = 0 The code for the variable value component is : formatdatetime("%H:%M:%S", (systime()-timecounter) * (timecounter != 0) + totaltime) How can I capture this value in a channel so that I can read it in an export set that gathers info when I stop the machine (press the stop button)? Mike Link to comment Share on other sites More sharing options...
AzeoTech Posted September 3, 2010 Share Posted September 3, 2010 If you are using an export set you can just put that expression directly into the export set. If you want it in a channel, then you'll either need to create a sequence with a little loop that sets the channel value to this expression every second or whatever interval you want, or you can do it in the Event of another channel that is already being read at constant interval. Link to comment Share on other sites More sharing options...
silogarrett Posted September 3, 2010 Author Share Posted September 3, 2010 That worked great, thank you!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.