Sarah83 Posted April 21, 2005 Report Share Posted April 21, 2005 Hi! I will read out my start time and my end time of the vi. The outcome of this is the durability. I read the start time with "get date/time in sec" wired this with "format date/time string" (%H.%M.%S) and show this in a field (string). Same with the Start date ("format date" %A, %d.%m.%y). I wired the stop button of a while case with a case structure and so I try to get the end time/end date. Again with "Get date/time in sec" - "format date/time string"- field (string). Now my problem, the period. I tried out subtraction. But there is a problem with the format. I must change the string into number. "String to byte array" won't work (I only get #8 as value) or I have done something wrong. Maybe there is a simple solution for my problem :headbang: Quote Link to comment
Randall Thurman Posted April 21, 2005 Report Share Posted April 21, 2005 Hi! I will read out my start time and my end time of the vi. The outcome of this is the durability. I read the start time with "get date/time in sec" wired this with "format date/time string" (%H.%M.%S) and show this in a field (string). Same with the Start date ("format date" %A, %d.%m.%y). I wired the stop button of a while case with a case structure and so I try to get the end time/end date. Again with "Get date/time in sec" - "format date/time string"- field (string). Now my problem, the period. I tried out subtraction. But there is a problem with the format. I must change the string into number. "String to byte array" won't work (I only get #8 as value) or I have done something wrong. Maybe there is a simple solution for my problem :headbang: 4582[/snapback] Try using the Get Date / Time in seconds function for the stop and start times. You may then subtract the two and display the total time with a numeric indicator. Set the indicators property Quote Link to comment
Sarah83 Posted April 21, 2005 Author Report Share Posted April 21, 2005 Try using the Get Date / Time in seconds function for the stop and start times. You may then subtract the two and display the total time with a numeric indicator. Set the indicators property Quote Link to comment
didierj Posted April 21, 2005 Report Share Posted April 21, 2005 Do you mean something like this? 4584[/snapback] I think Randall thought of something like this: ...most simple as possible... :headbang: Quote Link to comment
regisphilbin Posted April 21, 2005 Report Share Posted April 21, 2005 Here's another example getting the time from start of run to end of run. obtain the start time using "Get Date/Time in Sec". Then run your program. On the close of the program, read the end time again using the same "Get Date/Time in Sec", Subtract the two and your done.... Regis Download File:post-127-1114105818.vi Quote Link to comment
Randall Thurman Posted April 21, 2005 Report Share Posted April 21, 2005 Here's another example getting the time from start of run to end of run.obtain the start time using "Get Date/Time in Sec". Then run your program. On the close of the program, read the end time again using the same "Get Date/Time in Sec", Subtract the two and your done.... Regis 4590[/snapback] Regis & didierj both have it. Here is a modification of Regis's example that provides your start and stop time. Download File:post-274-1114112558.vi Quote Link to comment
Sarah83 Posted April 22, 2005 Author Report Share Posted April 22, 2005 Regis & didierj both have it.Here is a modification of Regis's example that provides your start and stop time. Download File:post-274-1114112558.vi 4592[/snapback] Oh, this is a very nice solution! :thumbup: I would not come to this result :headbang: Thanks :worship: Quote Link to comment
Ale914 Posted April 22, 2005 Report Share Posted April 22, 2005 Hi, this is my preferd solution. In this mode i can get msec time directly and don't use useless data such as year, day of weak ecc. used by "Get Date/Time in Sec" function. Bye, Alessandro. Download File:post-399-1114157424.vi Quote Link to comment
Mark Balla Posted April 22, 2005 Report Share Posted April 22, 2005 Taking it to the next level Try these vis I have several time vis in my toolbox that I use all the time. I posted an explanation on the custom time probes here. http://forums.lavausergroup.org/index.php?...2359entry2359 Download File:post-584-1114183839.llb Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.