03-05-2010 02:23 PM
Hi, I am student at the George Washington University working on my senior design project and I am trying to create a VI that would allow me to read in data (numbers) from MATLAB and use them to control a 6 stepper motors using an NI ELVIS board. I realize there may not be enough ports to control them all but that can be ignored for the time being. I know that there are digital output ports on the upper right hand side of the board but I don't know how to access them with LABVIEW. I have both bipolar and unipolar steppers. I have a ULN2803A current driver IC and also a BASIC Stamp 2 microcontroller. I understand how stepper motors operate but how do I program that in LABVIEW and have it generate the appropriate pulses? Thank you for any assistance.
-Allan
03-08-2010 05:27 PM
Hi Allan,
What kind of ELVIS board do you have? The most recent one or the older version?
There are two different drivers for ELVIS, one is traditional NI-ELVIS, and the newer one is NI-ELVISmx. One of these drivers is required for programming in LabVIEW with ELVIS. There are some examples that are given by the drivers that could help you out. Try looking in Example Finder, I would start there if you are just beginning to use LabVIEW. I would focus on digital generation examples as well. If you can't find any that are applicable there, you can try our community forums and see if you can find anything there.
As far as bringing in values from MATLAB to LabVIEW, here is more info: Options for Working with NI LabVIEW; The MathWorks, Inc. MATLAB® Software; and M-File Scripts
03-08-2010 09:55 PM
Hi Kyle,
Thank you for the help.
I am using the older version of ELVIS.
I will look for digital signal generation in the Example Finder tomorrow. Basically all I need is to generate x number of pulses/steps for each stepper, where x is given by MATLAB, to move a certain distance and reverse those steps once a task is done.
Also, once I generate a signal, how do I send it to one of the digital output ports on the board and assuming that this will be a 5V TTL signal, do I just connect that to the input of my ULN2803A to drive my motors?
-Allan
03-10-2010 10:26 AM
Allan,
What DAQ card are you using to communicate with your ELVIS? This is going to determine which version of NI-ELVIS you can install on your computer.
Since you are using the older version of ELVIS, I would recommend before you start programming to update to the latest version of the driver, which I believe will be 3.0.4. There are several good reasons for doing this, most notably that the driver uses DAQmx to communicate with the ELVIS. But as I stated above, you need to check your DAQ card to make sure that the driver is compatible with it. The readme's offer alot of help with determining compatibility between ELVIS and your DAQ card driver.
Once we determine the driver version, then you will be able to look at either DAQmx examples for digital generation or Traditional DAQ examples for digital generation. I would highly recommend programming in DAQmx, as it is easier and more straightforward than our older Traditional DAQ driver.