05-10-2016 11:45 PM
I am trying to log timestamps and time interval between these timestamps to .csv file. Digital input is used as a trigger.
I want to design logic such that, timestamps gets logged both the times when digital input goes off-on and on-off. Program should also calculate time interval between timestamps and add it to .csv file. Also, this file should be overwritten only after 12 hours.
please guide me in right direction. I did not post my code because its just a garbage.
Solved! Go to Solution.
05-11-2016 04:56 AM
Hi vinod,
use BooleanCrossing function to detect changes of your "digital input". When there is a state change you store the current timestamp in an array and calculate the difference to the previous timestamp. Store that difference too…
What have you tried so far?
Where are you stuck?
We will be glad to help you, but we will not do your (home)work for you!
05-11-2016 05:22 AM
05-11-2016 09:02 AM
I cannot thank you enough for your guidance sir. I had been struggling to make this logic work using various stuctures but BooleanCrossing function did the trick.
I am sharing my code and would request you to take a look and suggest any optimization changes to it.
Thank you again.