LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

have 2 while loops in parallel. one loop only executes sporadically

Hello,

I have a VI that runs two parallel while loops, one is the prog. main loop, the other is a timer. The problem is that the timer loop only execute sporadically. I never had this problem since today. I already tried to get them on the same level, with the same ending condition and without global variables. The only trick that seems to work is restarting Labview.

Thanks in advance

Alex
0 Kudos
Message 1 of 6
(3,119 Views)
Post your VI so we can take a look. It might be as simple as adding a wait to one of the loops so it doesn't take over the entire CPU.
0 Kudos
Message 2 of 6
(3,113 Views)
The problem is that I'm at home and the problem is 30km away now and I cannot connect on the machine.

I already tried to put a delay in the loop. The problem is that Labview doesn't even step into the loop. As I said, I removed all global variables to prevent double access. The loops are at the same level. I tried to 'stimulate' the loop by directly wiring it but it had no effect. It's really weird.

Once the loop is activated, it continues to execute normally. The problem is to start it.

I never had any problem with this architecture before. We upgraded to Labview 8 recently and I wonder if it's related. If I do not find a solution within a few days I will adopt a sequential design.

Alex
0 Kudos
Message 3 of 6
(3,109 Views)
What do you mean by "The loops are at the same level".  Their position on the diagram has nothing to do with their execution order in case this is what you mean.

If the loop does not start, it's probably waiting for an input.  Make sure you don't have any wires going from one loop to the other.  This will automatically create a data dependance and will prevent the second loop from executing until the first is finished.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 6
(3,103 Views)
Well a loop won't simply not start. As soon as all the wires sending data into the loop are available, the loop will begin. If it's not even starting, it's because it's waiting for data on one of the wires connected to it. If you have an indicator in this loop and it's sporadically updating, I'd say it's a problem with one of your loops hogging the cpu. I really can't say unless I can see the VI, though. Post it as soon as you get a chance and we'll take a look at it.
0 Kudos
Message 5 of 6
(3,099 Views)
OK thanks. I'll post it tomorrow as soon as I can. It's probably much simpler like this.

Alex
0 Kudos
Message 6 of 6
(3,097 Views)