LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show current time - hh.mm.ss

Hello - This is my first week dealing with
LabView, so I guess my question is rater
stupid - but I do have problem displaying the
current time (hh:mm:ss) continuously in LabView.

I have made a .VI that communicates with an
instrument (GPIB 488.2). When placing this VI in a
for-loop (N=124), one reading could take up to
approx. 2 secunds. The measured values are
displayed in a graph (updated every 2nd sec.).
When I then try to diplay current time -hh.mm.ss -
the slower loop makes it (for me) impossible to
show current time continuously - it jumps
over approx. every 2nd. secund - it follows the
slower for-loop. I have tried to place the "get
date/time string" -VI both inside and outside the
for-loop, just to experience the s
ame result. How
can I overcome this problem ?

Best regards
Trygve Knatterud


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 4
(3,293 Views)
Hope you can receive attachments there, here is an example of one way to
display a continuous clock. Once you see this, other methods may come to
you. This is very basic, but it works. That's what counts, isn't it?
Hope this helps,
Craig
PS, if you can't get attachments, let me know if there is another email
address I can send this example to you. It is just an image.
Message 2 of 4
(3,293 Views)
I'm sorry, didn't mean to put this attachment here, please forgive my
slip of the enter key.
0 Kudos
Message 3 of 4
(3,293 Views)
Hi Trygve,

Use two threads, one for your reading process and another one for your time display process. Two threads mean two loops side by side. For example, create a while loop beside your current for loop. Inside that while loop put what you need to display the current time ("Get Date/Time String" and "Wait Until Next ms Multiple" VIs). If you want to display time every second connect the value 1000 to the "Wait Until Next ms Multiple" VI...

Hope this will help,

Benoit
0 Kudos
Message 4 of 4
(3,293 Views)