Jump to content

Time


Recommended Posts

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:

Link to comment
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

Link to comment
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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.