BeamMEUp123
Member
I am working on a project where I need to accumulate the amout of Runtime of a machine. I am presently able to display the length of the "Current Runtime" (in minutes) when the machine is running. Now when the machine stops I want to save THAT accumulated data and display it as "Total Runtime". Now I need to add all the "Current Runtime" together and display that as "Total Runtime". Ie: If there were 5 runs all 10 minutes long, the total runtime would be 50 minutes.
Here is a sample of the code I have so far:
Runtime....................0
RuntimeStartTime......if(DigitalInput1=1,GetTickCount))
RuntimeStopTime.......if(DigitalInput1=0,GetTickCount))
RuntimeCalculation....if(DigitalInput1=1,RuntimeStartTime - RuntimeStopTime) / 60000
Runtime...................if(DigitalInput1=1,RuntimeCalculation)
Thanks for you help in advance
Scott
Here is a sample of the code I have so far:
Runtime....................0
RuntimeStartTime......if(DigitalInput1=1,GetTickCount))
RuntimeStopTime.......if(DigitalInput1=0,GetTickCount))
RuntimeCalculation....if(DigitalInput1=1,RuntimeStartTime - RuntimeStopTime) / 60000
Runtime...................if(DigitalInput1=1,RuntimeCalculation)
Thanks for you help in advance
Scott