Jump to content

parallel timer


Recommended Posts

i would like to have an elapsed time feature in my program, but i want it to update every 10-100 milliseconds. i need it to run in parallel with a variable wait (not after the wait is executed, because then the timer would update variably and probably less frequently dependant on the wait time). i have tried queueing, but i cannot get it to work. i think it has something to do with the enqueueing/dequeuing speed matching the wait time, correct me if i am wrong? i dont have a very strong knowledge of queueing, so this is a problem for me. so what method/structure would i have to use in order to do this?

thanks in advance

Link to comment

Oh sorry about not posting code previously; I have attached an example now. It is without the queue structures so I can get fresh advice on how to run the timer and wait methods in parallel.

EDIT: It is probable that I will have to undergo data acqusition in parallel of these two things as well. I have read somewhere that if dll libraries are used for DAQ (or anything), then they are automatically run in parallel. Is this true? If not, I would have to have another parallel loop for data aquisition, right? I want the data from, say, a digital thermometer of sorts, to update every 100ms or so.

Many thanks

Download File:post-2608-1144346718.vi

Link to comment
Is this what you're trying to do?

Hah, thanks for that addition, but I already know how wait per multiple of 10 ms (forgot to include it in my post). The problem I had was running the loops in parallel, but now that I ran the example for the first time on my computer, I realized that it runs perfectly in parallel if two different loops are used (DUH! I'm a moron...). Previously, I was trying to run the timer and the wait in the same loop in a different test program I made, so LabVIEW would not run it in parallel. I guess I automatically assumed that the same action would of occured using two separate loops. Thanks though, for I wouldn't of realized that LabVIEW automatically runs separate loops on the same frame in parallel unless I used the two loops in an example to post for help.

stupid mistake, huh? :wacko:

again, thanks everyone for the help :thumbup:

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.