09-23-2010 11:44 AM
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?
09-23-2010 12:01 PM
use a timed loop
09-24-2010 11:57 AM - edited 09-24-2010 12:02 PM
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?
09-24-2010 01:23 PM
Use the VISA read/ write with a GPIB instr class
09-24-2010 01:23 PM
Use the VISA read/ write with a GPIB instr class
09-24-2010 02:57 PM
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.
09-24-2010 05:49 PM
Time to post some code
09-24-2010 08:27 PM - edited 09-24-2010 08:28 PM
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.