LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Arduino to Control Stepper Motors, do I need LINX?

Hello,

I have build a scanning rig that measures the magnetic field outside a pipe. A magnetic field sensor is placed on a linear actuator which moves using a stepper motor. Once a scan along the axis of the pipe has been completed, the sensor moves back to the start position.

Another stepper motor is then used to rotate the pipe a number of degrees so the next linear movement can be made and a full scan can be completed. I am reading the sensors via a lock in amplifier using LabView, and I am currently moving the linear positioning stepper motor by providing a square wave from a function generator. This only allows me to move the one motor at time a however (only one output from function generator), so I have purchased an Arduino microcontroller which I hope to be able to pass the step function to each of the two stepper motor drivers so that I can control both the linear positioning of the sensor and the rotation of the pipe. I have two Geckodrive G203V stepper motor drivers. One for each motor.

I have a NI6009 which I bought originally as I thought I could use the digital output ports to provide the step function to the drivers, but this didn't work as the hardware is only capable of generating a square wave ~<200Hz. For now, I am only using the 6009 to set the direction of the motors.

I want to replace the function generator with the Arduino so I can generate a step pulse function to move each of the stepper motors independantly. My question is, how can I get labview to tell the Arduino to generate the pulse that will move the motor? Does this have to be done with LINX? If so, please could you explain/send an example of how this could be done? I found some threads here but they seem to be based off old information or not fully working.

https://labviewhacker.com/forums/viewtopic.php?f=12&t=396&p=2531#p2531 LINX and Stepper Motors (Can't find the digital out file they refer to)

Inaccuracy in running stepper motor with arduino interface for Labview compared to plain arduino cod...(I can't afford missed steps)

Thanks very much!

0 Kudos
Message 1 of 4
(8,485 Views)

The following is from <https://groups.google.com/forum/#!topic/accelstepper/KsIBBPDUIjQ>

"Hi everybody hier:

http://www.geckodrive.com/ the high performance stepper motor driver

and ACCELSTEPPER,

The driver need just 3 signals, step direction and ENABLE

ist it possible to work with the accelstepper library, it would be

preatrty nice::

Thanks

Yup. The interface to the Gecko drives are the same as to any step and direction drive (like the EasyDriver or BigEasyDriver) and they work just fine with AccelStepper. Make sure you specify the right interface when creating your stepper object.

The Enable pin is not handled by the library - you have to handle that in your own code.

*Brian"

The above reply means you can use LIFA's Big Easy Stepper Motor driver with your Gecko Drives.  However, LIFA's Big Easy Step0per Motor Driver only implements the step and direction signals.  You will need to add code to implement the enable signal. 

hrh212

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

Okay perfect, this is what I wanted to know. I am not using the enable pin anyway. Could you please tell me where I would find the VI for the Big Easy Stepper Motor in LIFA/LINX? I am new to this and am not sure where to start

0 Kudos
Message 3 of 4
(5,680 Views)

An Arduino Stepper Motor VI comes with LIFA.  This VI is designed to work with Big Easy Stepper Drivers.  If you haven't installed LIFA then on this forum's main page click on the "Documents" tab and look for "Labview Interface for Arduino Setup Procedure".  Follow the steps given in the procedure to install LIFA.

hrh212 

0 Kudos
Message 4 of 4
(5,680 Views)