NoTmE Posted April 4, 2006 Report Share Posted April 4, 2006 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 Quote Link to comment
Guillaume Lessard Posted April 4, 2006 Report Share Posted April 4, 2006 You should show what you've tried, because you mention parallelism but then your description sounds sequential... Can't you just put a second loop that displays something and waits for a set number of milliseconds? Quote Link to comment
NoTmE Posted April 6, 2006 Author Report Share Posted April 6, 2006 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 Quote Link to comment
Gary Rubin Posted April 6, 2006 Report Share Posted April 6, 2006 Is this what you're trying to do? Download File:post-4344-1144348534.vi Quote Link to comment
NoTmE Posted April 6, 2006 Author Report Share Posted April 6, 2006 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? again, thanks everyone for the help :thumbup: 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.