10-19-2006 10:49 AM
10-19-2006 11:11 AM
parallel while loops don't "race themselves" if you place small waits in each. Often you need to do different things at different rates, so this is an easy solution.
For example:
One of the great powers of LabVIEW is the easy capability of (seemingly or real) parallel execution. If you have a computer with multiple CPU cores, the advantage is even more apparent.
So, use as many loops as you need. 😄
10-19-2006 11:21 AM
For some easy reading about related issues, head over to Joel's blog and browse the following articles:
Asynchronous versus Synchronous Nodes
😄
10-19-2006 11:47 AM
11-09-2006 09:59 AM
Hello to all.
I am doing a vi, in which I must read the value of a sensor and depending on the out it does a process or another one. In my case the sampling of the sensor is 1 seg, and the processes are of a much greater duration.
At first I have thought to use several while loops in parallel, but this method sometimes gives problems me, some loops are not executed, I suppose that because does not exist order in execution, and loops have to race.
I have read several messages of the forum and some ones recommend to use “producer/consumer”, although I believe that for my application I do not need this method, on the other hand I have read this message with the same doubt that I have.
The answer of Altenbach, says that to use multiple loops does not have any problem, but I am not sure to do it of the correct form.
I have attached a example of my multiple loop vi, would thank much if somebody tell me the best method to do several tasks at the same time using while loops.
For example:
1. One loop containing an event structure to handle the user interface.
2. One (timed) loop handling the data acquisition in a strictly timed fashion.
3. One slow loop for occasional logging or report generation.
4. etc.
Greetings.
11-09-2006 11:28 AM
02-14-2007 04:00 AM