03-20-2007 04:56 AM
03-20-2007 07:31 AM
03-20-2007 07:47 AM
You should easily be able to do this with a state machine architecture.
States:
initialize
run motor
acquire data
user input
more points?
done
error
Paul
03-20-2007 07:50 AM
I will try to explain it better.
I have to make a program to 'calibrate' an instrument.
On the main VI the user is asked how many measerments he wants.
Let say he wants to have 8 measurements.
When the user clicks on the OK button, the motor has to run for 5 seconds.
After the five seconds, the motor stops and the DAQ has to acquire data from the sensor and calcutate the mean.
If that is done the user recieves a pop-up window with the question to fill in the value of fysical dimension (displacement, force,...)
The data from the sensor and the user has to be inserted into an array.
If the user has filled in the value and clicked on OK, the next cycle should start (5 seconds motor turning, 1 second data acquisition and finally the user input) and this 8 times in total
If all the measuremenst have been made, the data has to be processed.
The subVI's for the motor, DAQ and user input are already made and work.
The problem is that I have problems making the loop.
At first I recieved an endless loop with the user input
I have managed to let the first cycles execute (motor, daq and user input) and the following cycles only the user input was executed.
I hope this gives a better image about the situation
03-21-2007 06:02 AM
Thanks falkpl
I think that it will work with the standard state machine.