Jump to content

New to LABVIEW: Need to control 2 motors from one VI.


Recommended Posts

Hello Everyone,

I am just currently getting acquainted with the LABVIEW program for an undergraduate project I am working on. So far I have become familiar and proficient in some simpler (mathematical numeric operations) programs through tutorials on YouTube, but have yet to come across any useful info on how to get started interfacing with hardware such as motors. I was wondering if you all could suggest some resources for me to look at. I have looked at a few texts from my school library, but so far they have been almost useless.

The project I am working on will have to control:

Stepper Motor through a Motor Controller

Speed

Acceleration

Distance

Servo Motor through a simple Arduino In and Out Board.

Angle Rotated

I would also like to be able to turn on and off a power source, but am not sure this is possible as I haven't been able to find any really helpful text.

Thank you for your time and help,

John

Edited by jde08
Link to comment
...have yet to come across any useful info on how to get started interfacing with hardware such as motors.

"Motors" is a big topic - there are so many different kinds and sub kinds, and each motor (and motor controller) manufacturer has different way of controlling them (often mutliple simultaneous ways). Are you using the NI-Motion toolkit (it's a LabVIEW plugin)? Can you give us the manufacturer and model of the motors and motor controllers? How are you planning on talking to them (RS-232, 0-10V analog signal, ethernet, etc)?

I suggest you talk to the lecturer who gave you this task, and see what their suggestions are - they might even have some code that you can use.

Link to comment

I second crelf's questions and suggestions.

I would also like to be able to turn on and off a power source, but am not sure this is possible as I haven't been able to find any really helpful text.

Without knowing what kind of power source you are trying to switch, what load you are driving, and how fast you want to switch it, you can achieve this with a suitable relay and a single digital output line.

If you have an ni motor controller for the stepper motor you mentioned you can likely find and example for it in the example finder in LabVIEW (Help->Find Examples...)

Link to comment

Hello Everyone,

I am just currently getting acquainted with the LABVIEW program for an undergraduate project I am working on. So far I have become familiar and proficient in some simpler (mathematical numeric operations) programs through tutorials on YouTube, but have yet to come across any useful info on how to get started interfacing with hardware such as motors. I was wondering if you all could suggest some resources for me to look at. I have looked at a few texts from my school library, but so far they have been almost useless.

The project I am working on will have to control:

Stepper Motor through a Motor Controller

Speed

Acceleration

Distance

Servo Motor through a simple Arduino In and Out Board.

Angle Rotated

I would also like to be able to turn on and off a power source, but am not sure this is possible as I haven't been able to find any really helpful text.

Thank you for your time and help,

John

I have had good luck with small USB step motor controllers from Peter Norberg Consulting. I have used the SS4D type controller with the line driver output for interfacing the Gecko G202 step motor driver amp. The SS4D will control up to 4 step motors for around $120. The G202 is an older drive that has been replaced with the G203. The Peter Norberg controllers come with two types of firmware. One will allow you to program point-to-point moves, while the other will allow coordinated the multi-axis moves required for CNC-style contouring (drawing circles, etc.). Norberg has good service, and the prices are very reasonable (Though not as cheap as the Arduino) . These are not high performance controllers , but they will get simple jobs done very cheaply. The USB interface is handled by a FTDI chip that has virtual COM port drivers for Mac, Windows, and Linux. Since it is a Virtual COM port USB device, you can just use the VISA library in LabVIEW and program it the way you would a standard RS-232 serial port. You'll have to download the programming manual to learn what strings to send to the controller to program things like acceleration, velocity, distance, etc. Contact Norberg and tell them what you need to do, and they will fix you up with the right controller and explain how to connect it to the Gecko Drive. They will also make sure you buy the right motors, etc. They are a small business and usually very good about helping beginners, etc.

As far as the Arduino/Servo system goes, you'll have to program the Arduino board in C (using the Wiring library) to respond to commands sent to it from LabVIEW. If I am not mistaken, it also uses a Virtual COM driver that you send strings to from LabVIEW with the VISA library. There's tons of code online in the Arduino forums, so there is likely what you need there in some form to get you started. You can also control small step motors with the Arduino motor shield, so you might consider using it for both stepper ans servo control.

I am not connected with these companies (Norberg/Gecko) , but I have found their products to be good quality, easy to use, and very cheap if you have a limited budget and a simple hardware requirement. Of course if you are programming a sophisticated high-speed system with intricate moves, large motors, high accuracy and repeatability, etc., you will need something to match the job, and might be better off using NI-Motion with the selected compatible motors and drives.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.