CFBFP Posted January 20, 2016 Report Share Posted January 20, 2016 Dear all In my application I have to measure the elapsed time between 2 events that can happen on 2 different timestamps on the calender. Example: What is the time elapsed between 20-01-2016 16:35:55 and 19-04-2015 14:41:22? If I can have the elapsed time value as a number that can be converted afterwards in Years, Months, Days, Hours, Minutes and Seconds, that's ok. If it can be directly displayed as a result from a End Time and Start Time Substraction, is also ok. I'm using the V350 and can display the actual time using the link to SI30 to the Variable UTC, this works. The problem is that when I store SI30 to a DW variable it only saves the seconds and not the complete time stamp (= Year, Month, Day, Hours, Minutes, Seconds) in seconds, so every 60s it goes back to 0s. As a consequence the elapsed time is corrupt: sometimes values are also negative and only in seconds, 45s-59s= negative value of course I would like to store the Start Time Stamp in DW0 as a number and the End Time Stamp in DW1 as a number and substract DW1-DW0 and save it in DW3. DW3 should then give me the elapsed time in Years, Months, Days, Hours, Minutes, Seconds. Here it gives me only seconds and wrong values. It seems SI30 is giving me the complete Time Stamp on the Display if using a Variable UTC but if you work with the SI30 and store it in DW variables it only stores seconds and not the complete Time Stamp. I would like some help to calculate the elapsed time between 2 calender events. Any help is welcome! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.