LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does two timed loop work together? is it possible....

Hello

I use Crio in scan mode and have problem with timed loop.  I use two timed loop for two different PID loop. I need to get 1ms delay for PID loop. But When I two run realtime side with timed loop, only one of them work (when ı send command from host side). Is it possible to run two time loop 1ms. How can I configure each timed loop work together properly? (ı configured the each time loop as synchron scan enginee 1ms)

Both array are used for sinusoidal position data form host vi. I use time delay (1 ms) to make certain frequency with sample size(I adjust sample size for 1000 for 1 hz 500 for 2 hz).Each loop control  to position of servo system with PID. So I use two VI in my host side and I send two different sinus data with array. I tested with one timed loop it works vey well. But When I try it two time loop it dosent work.

0 Kudos
Message 1 of 5
(2,222 Views)

Two loops in parallell is quite easy, you just need two unconnected loops. If there's a wire in between you get data dependency which means the 2nd loop will wait until the 1st one finishes.

 

Is that what happening to you? (I cant open the file)

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(2,200 Views)

Can you share the host VIs?  As I mentioned in response to your previous question, I think you're getting an empty array, in which case the for loop will not run.  What have you done to debug this so far?

 

Also, consider cleaning up your block diagram and straightening wires.  I'm not always a fan of the automatic cleanup tool, but it does a pretty good job with your VI.

0 Kudos
Message 3 of 5
(2,175 Views)

Dear Nathand

When I use one timed loop system working perfect performance . But if I try to work it two timed loop it dosent work.I also try it   with use to two while loop it works but bad performance (while loop dont have good timing).Ofcourse I can share my host.vi.

0 Kudos
Message 4 of 5
(2,167 Views)

1st Windows isn't a deterministic system. 1ms loop time wont keep the timings very well. 

 2nd You have a 100ms wait in the loop, that makes it very hard to loop at 1 ms ...

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,157 Views)