LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program and send several coordinates for steeper motor operation. Arrays?

Hello,

 

I am a beginner in LabVIEW and currently I am developing a project to design and build a Cartesian robot.

 

I have a generic VI to control my stepper motors in which I only can introduce one target position and then execute it. I would like to introduce several positions and execute them in one click, I mean, for example enter several coordinates instead only one at time, then execute the profile and get the motor perform them one after another.

 

To do it I am thinking in doing it by an array in which I introduce the values of my target positions and then the array would send them one by one once the previous one has finished.
First of all would you do it like that using arrays?

 

If so please if someone has an idea of how to achieve it I would be grateful to hear it.

 

I enclose the Vi I'm using. As you can see I can introduce only one value in the "target position" field whereas I need to have for example a column of values and perform the one after another until the last one just clicking "start profile"

 

Thank you very much in advance, all ideas/examples are welcome.

 

 

0 Kudos
Message 1 of 5
(2,262 Views)

Dear perez-fernandez,

 

I looked over your Code and have a view Questions:


1. Have you every time to push "Change Position" when you want to set a new position and then to push "Start Profile" to perform the move to this position?
2. How do I know if the current position is reached and the move is ready?

 

Regards,
Oleg Scherling, M.Eng | Applications Engineering | National Instruments | NIG |

0 Kudos
Message 2 of 5
(2,204 Views)

Hello!

 

 Thanks very much for replying!

 

The answers to your questions are:

 

1. Have you every time to push "Change Position" when you want to set a new position and then to push "Start Profile" to perform the move to this position?

 

Yes, actually that is one of my problems, I have implemented an array which is able to send positions stored in it, but I have to click an ok button to send the next position, then change the position and finally start profile. The current sequence is:

- When executing the VI the array send the value stored in 0 position --> Click in "Change Position" --> Click in "Start Profile" --> Performing the profile --> Click in "Next position" --> Click in "Change Position" --> Click in "Start Profile" --> Execution of second position and so on.

 

What I would need to do is automatically to perform all the positions with a single "Start profile" button click.

 

2. How do I know if the current position is reached and the move is ready?

 

There is a led labeled "ready" which is an indicator that the motor has finished to execute the profile.

 

So currently I need to press manually 3 Booleans and the goal is do it automatically as sequence or so.

 

All ideas/solutions are welcome.

 

Thanks again for replying again.

 

I enclose the latest VI and a picture as an explanation.

 

Kind regards.

 

 

Download All
0 Kudos
Message 3 of 5
(2,198 Views)

Dear perez-fernandez,

 

Ok I think this should not be such big problem to implement this.

 

You just have to do a view thinks:

 

1. Initialize the array with the positions

2. Creates a For-Loop in which is reading if the current move is ready and initializes the next move by taking the next position and auto run the profile by a true Constant and this as long until the position array is empty.

3. Don’t forget to implement the abort Button in the for loop to stop the move if something happens!

 


Regards,
Oleg Scherling, M.Eng | Applications Engineering | National Instruments | NIG |

0 Kudos
Message 4 of 5
(2,192 Views)

Dear SG3,

 

Thank you for your prompt reply I will try what you are advising but I am a bit confused, I have been using labview only for 2 weeks and so everything is very new. I would be really grateful if you could detail a little bit more your solution.

 

Sorry and thank you!

 

Best regards.

0 Kudos
Message 5 of 5
(2,189 Views)