03-11-2012 02:40 PM
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.
03-12-2012 06:33 AM
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
03-12-2012 01:26 PM
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.
03-12-2012 01:53 PM
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.
03-12-2012 03:12 PM
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