10-29-2008 06:11 AM
Hello All,
I'm using LabVIEW 7.0 for my first project, I hope my question is not too stupid.
I need my system to move a motor in different positions with its sub-VI, acquire data from sensors in each position
with a for loop, all repeated within a bigger for loop to cover all positions. The problem is that when motor sub-VI is running, Vi settled down there and continue to run only that sub-VI, repeating the same command (move to the first position). I just add that I want to force motor to stay in that position until sensor acquired data and use a condition using i value on the smaller for loop for that purpouse.
Thanks in advance for any help.
10-29-2008 06:20 AM
Could you please post all the vi's and subvis.
Mathan
10-29-2008 08:18 AM
find attached VI (totale cella...) and sub-VI (ESP... is the one settled). Thanks!
10-29-2008 08:27 AM
Attachments are missing.
By what you are describing, it sounds like you want a State Machine Architecture with at least 2 key states: Move machine, stop and read, executing back and forth. On each Move machine, you feed a different position to it, possibly taken out of an array of positions.
10-29-2008 08:41 AM
Right I've got a list of possible positions, actually coorresponding to laser lines, and I need extactily what you said, move - stop - read, calculate and save - move to the next one, etc...
File now are attached in any case.
any help would be appreciate.
Thanks again.
10-29-2008 09:03 AM
10-29-2008 10:27 AM
As Dennis set, you have 2 subVI's called, one has a run forever while loop, the other requires a stop button to be pressed. (Note, use Stop on True, then you don't need to NOT the boolean value coming out of the stop button.)
But you also have a big problem in the Total Cell VI. You have a STOP sign function in your large while loop. That function should probably never be used. It is equivalent to hitting the abort button on your VI which brings the program to a crashing halt. The code after the For loop would never run if that STOP sign function ever gets a True value.
11-14-2008 03:23 AM