01-13-2021 03:09 AM
I want to accomplish the following tasks:
1) Whenever Boolean value is "True"
2) “True” Value will be hold on Boolean for given time interval (assume interval is 5000 msec)
3) After given interval is over Boolean to be written as False
4) I wish to know the completed time in seconds as well as %
Completed time (in %)= Time completed *100/ Total Time
But code is showing different results
Kindly help me out to complete above mentioned task
01-13-2021 03:34 AM
First, using Tick count (ms) is much like watching at the clock; you want to measure a time span, so wouldn't be better to watch the clock two times and then calculate the difference between the results? You should also consider when your first watch should be put in your code: you mean the total time of what interval precisely?
Second, you probably don't understand data flow: in your vi, calculation of the percent time is not done after the pause interval, rather as soon as the pause started. You should make sure to make the second watch after the Wait function. The easiest way is to use the output of the Wait as your second watch.