Project goal is to be able to control and test the operation of linear actuators powered by stepper motors. For this project I decided to use Arduino UNO microcontroller.
The software should incorporate, steps input, speed input, acceleration, backwards forwards movement, emergency stop button.
For this purpose I chose LabView which has an arduino package ready to install.(LabView Interface for Arduino)
This package allows the Labview to communicate with Arduino board via serial port communication.
There is also an example for controlling stepper motors.
This example works but is limited to, only one way direction (clockwise) and the steps (max distance) I can input is 32000 steps which I cannot understand why?
I want to add these two capabilities to the programme, but my knowledge of labview language is limited.
I would also like to know if this software is able to be programmed on LINX rather than LIFA.
Any help or guidance would be appreciated.
I have attached some pictures to your interest.
Thanks in advance
the steps (max distance) I can input is 32000 steps which I cannot understand why?
Because that control is set to I16 datatype, which limits the allowed input range.
I guess that LIFE VI only accepts I16 values here, so you cannot change that…
What's the problem in doing two (or more) moves of 30.000 steps each?
only one way direction (clockwise)
As that input is of I16 datatype it also accepts negative numbers.
What's the problem of going -30.000 steps when you want to move in the other direction?
From your questions I want to suggest you to take the free beginner tutorials offered in the header of this LabVEIW board!
I have tried but negative numbers do not work, it still moves on the same direction.
But if you change the pin numbers on block diagram it does move the other way but I want the setting on the front panel.
Some additional questions:
If I want to move e.g. 60000 steps, is there a way to put a multiplier on the front panel
(2x(no. of steps))?
Can I rebuild that block diagram on LINX and is there a point in doing so?
I will take the beginners tutorials thank a lot for the recommendation.
Ok whoever has another idea or can help further please post.
I will be watching it 🙂
I am have problem with controlling the direction.
I have four stepper motors and they works fine in terms of speed, acceleration but in terms of direction the first and the third one they works ( i can control the direction by introducing a negative number) for the second and the fourth stepper they don't it's really weird and i don't know what's i am going to do to solve this problem.
Please check the attachment below for the Vi file.
I will be appreciate any kind of contribution.
Yeah that's the whole code for one servo motor and 4 stepper motors the servo works and the stepper they works just the problem is for the direction for the second and last stepper.
As per Sam Kristoff:
There is a potential for issues when using 'Stepper Wait Till Steps Complete' with multiple steppers. It looks like the firmware sums the distance remaining for all steppers and then the LabVIEW side checks if it's not equal to 0. If one stepper has positive x steps to go and another stepper has negative x steps to go the VI would report that there are no steps remaining and the VI would unblock.
Do you think that this is an issue with your layout?