LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronous loop ticker

LV: 8.6.1 Developer

 

Issue:  I have a while loop with a 1s ticker.  Inside this loop contains 2 processes that are running parallel.  Let's say process A completes in 200ms while process B completes in 400ms.  It seems that my loop iteration isn't 1s but 1s+0.4s, which is 1.4s.  Is there a way to synchronize the loop ticker so that the loop iteration will always iterate at exactly 1s instead of 1s + changes? I don't know exactly how long process A, B, C ...to N run, but one thing for sure is that they each run under 1s.  How do I synchronize these guys to 1s ticker?

 

 

0 Kudos
Message 1 of 8
(3,416 Views)

use a timed loop


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 8
(3,405 Views)

Does anyone know why using "GPIB 488.2" VIs causing Labview to either frozen or crash if I use them inside a timed-while-loop?  I did not experience any problem when using TCP socket VIs inside a timed-while-loop and GPIB 488.2 VIs as stand alone.  Is there a way to work around this issue?

0 Kudos
Message 3 of 8
(3,385 Views)

Use the VISA read/ write with a GPIB instr class


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(3,364 Views)

Use the VISA read/ write with a GPIB instr class


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(3,363 Views)

I'll take back what I said about TCP socket VIs.  Those guys did crashed after a few minutes.  VISA with GPIB instr class also crashed.  But none of these guys were having problem when running as standalone, so why is timed-loop giving me problem?  I can't even click on the stop/run button once it locked up.  Sometimes, Labview just totally crashed.

0 Kudos
Message 6 of 8
(3,349 Views)

Time to post some code


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(3,334 Views)

Since we all probably don't have the same GPIB instruments so it'll probably impossible to replicate my exact problem.  I noticed that my problem also pertained to TCP socket VIs and since everyone has access to that so let's pick that topic as to what I might have done wrong.  I'm sure I must've done something and something just didn't seem right.  It works for normal VIs but why the instrument related VIs gets this problem is beyond me. 

 

Open my project file, then run "server.vi" then run "client.vi", in my client vi code, you can toggle between normal or timed-loop.  You'll notice that by using normal while loop, everything runs smoothly but if you enable the timed-loop, it either crashes or gets frozen.

 

I would be appreciated to whoever took a look and made changes, please save it as LV 8.6 because that's what I'm currently using.

 

Thanks, all.

0 Kudos
Message 8 of 8
(3,325 Views)