LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different starting point of stepping a motor when vi is stop and run again

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(3,065 Views)

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

0 Kudos
Message 2 of 7
(3,059 Views)

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

0 Kudos
Message 3 of 7
(3,046 Views)

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:

22413iC9030D34DB71D30A

 

Marco

0 Kudos
Message 4 of 7
(3,037 Views)
Solution
Accepted by topic author bloodxrage

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 7
(3,031 Views)

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.

0 Kudos
Message 6 of 7
(2,984 Views)

ignore my previous post i have managed to achieve what i wanted thanks for the reply

Message 7 of 7
(2,971 Views)