08-26-2010 07:35 AM
Hi there,
I have a vi that will step the motor and move in by the digital output of the daq device but now i'm facing a problem with it because whenever i stop the vi and run the vi again it does not resume to it's starting position but just run the vi again from the last position it is stopped.
Is there a way to make it resume from when it's stop and start stepping again? Attached is the vi i used please advice.
Thanks
Solved! Go to Solution.
08-26-2010 07:44 AM
Hi!
If you don't have an absolute encoder is up to you to count how many steps/counts you have performed.
So in your application you have to store the current position somewhere and implement a "return home" function.
Marco
08-26-2010 08:13 AM
thanks for the reply but how to u get the boolean value when the vi is stopped i have no idea how to store the current position
08-26-2010 08:29 AM
If you don't want to have a running application,
you can store the values you need in a functional global (and rememebring that it must be always in memory).
Just an example:
Marco
08-26-2010 10:06 AM
reading the value and saving it to a file, which is then read in to tell where the motor was when stoped would allow totally stopping the program and the rerunning it. Of course it will have no way of knowing whether the motor's position has been physically altered. To do that would require an absolute position encoder, as a previous poster mentioned. Otherwise, having a "home postion" to which you can always return to, such as a home position switch, or physical stop.
08-29-2010 09:45 PM
Hi there, i have managed to read the value and save in to a database but how do you read the value again when it is stopped? attach is the vi i've modified thanks.
08-30-2010 02:56 AM
ignore my previous post i have managed to achieve what i wanted thanks for the reply