jjylf Posted June 25, 2008 Report Share Posted June 25, 2008 Hi. I am programming a VI that mainly consists of three while loops: (1) The main while loop takes input from a java program (TCP/IP) manipulates the data and puts it in the queue.(2) The second while loop deques elements and sends it to an electric motor. (3) The third while loop gets input (meassurements) using the DAQ Assistant express VI and sends it to the java program (Also TCP/IP, different port). Developing this program I first made two while loops, (1) and (2), and it executes well in paralell. Then I added the last (3) while loop for meassurements and it won`t execute. Not untill i press the stop button for the first (1) while loop. But I want all three to run in paralell. I`m using the "Wait Until Next ms Multiple" VI with 50 ms in all the three while loops. I do this because the sampling period from the java simulator is 50 ms. Any suggestions to what might cause the last (3) while loop not to run will be greatly appreciated. Thank you. Quote Link to comment
LAVA 1.0 Content Posted June 25, 2008 Report Share Posted June 25, 2008 QUOTE (jjylf @ Jun 24 2008, 10:58 AM) Hi.I am programming a VI that mainly consists of three while loops: (1) The main while loop takes input from a java program (TCP/IP) manipulates the data and puts it in the queue. (2) The second while loop deques elements and sends it to an electric motor. (3) The third while loop gets input (meassurements) using the DAQ Assistant express VI and sends it to the java program (Also TCP/IP, different port). Developing this program I first made two while loops, (1) and (2), and it executes well in paralell. Then I added the last (3) while loop for meassurements and it won`t execute. Not untill i press the stop button for the first (1) while loop. But I want all three to run in paralell. I`m using the "Wait Until Next ms Multiple" VI with 50 ms in all the three while loops. I do this because the sampling period from the java simulator is 50 ms. Any suggestions to what might cause the last (3) while loop not to run will be greatly appreciated. Thank you. Hi jjylf, Can you post a screen shot of you main diagram (the one with the 3 while loops), it sounds like there is a dependance between loop 1 and 3, that could explain the behaviour you described. Hope this helps Quote Link to comment
jjylf Posted June 25, 2008 Author Report Share Posted June 25, 2008 QUOTE (Antoine @ Jun 24 2008, 10:04 AM) Hi jjylf,Can you post a screen shot of you main diagram (the one with the 3 while loops), it sounds like there is a dependance between loop 1 and 3, that could explain the behaviour you described. Hope this helps The stop button in loop (1) is connected to the stop in loop (3). That is the only dependence I can think of. QUOTE (jjylf @ Jun 24 2008, 10:18 AM) The stop button in loop (1) is connected to the stop in loop (3). That is the only dependence I can think of. Hi. I removed the stop button connection, and it worked. Thank you very much! Quote Link to comment
LAVA 1.0 Content Posted June 25, 2008 Report Share Posted June 25, 2008 QUOTE (jjylf @ Jun 24 2008, 11:21 AM) The stop button in loop (1) is connected to the stop in loop (3). That is the only dependence I can think of. If you execute in highlight mode you will see why it can't work QUOTE (jjylf @ Jun 24 2008, 11:21 AM) I removed the stop button connection, and it worked. Thank you very much! You're welcome There are different way of stopping several loops with only one button, do you need help on this ? Quote Link to comment
jjylf Posted June 25, 2008 Author Report Share Posted June 25, 2008 QUOTE (Antoine @ Jun 24 2008, 12:10 PM) If you execute in highlight mode you will see why it can't work You're welcome There are different way of stopping several loops with only one button, do you need help on this ? I`m now using a local Variable. I don`t think that will cause problems. Thanks again. But I`ve got a problem with everything running very slow. I want the loops to execute at 20Hz, but when I run it only executes at about 1-2Hz. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.