Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper Motor Control, and Force vs. Diplacement vi

I am looking for example code that will be used to communicate through a serial port with a stepper motor.  The stepper motor is made by Parker.  I need this to allow for velocity, dwell time, and displacement of the motor to be controlled.
I also need the vi to be able to read two input singals, from a Load cell and LVDT (force vs. Displacement).  The input signals will be controlled with a NI PCI-6040E data acquisition board.
Message 1 of 7
(5,732 Views)

j.loot,

"I am looking for example code that will be used to communicate through a serial port with a stepper motor.  The stepper motor is made by Parker.  I need this to allow for velocity, dwell time, and displacement of the motor to be controlled"

National Instruments sells motion control boards for controlling stepper motors.  Below is the link to the Motion Board section of our website.

Motion Control - Motion Controllers and Advanced Motion Control Systems

You said you want to communicate with your stepper motor through a serial port.  I am not sure this is possible unless Parker has provided you some sort of seriel interface to your stepper motor, is this the case?

"I also need the vi to be able to read two input singals, from a Load cell and LVDT (force vs. Displacement).  The input signals will be controlled with a NI PCI-6040E data acquisition board."

In order to measure your load cell you will need to condition your signal before you feed it into your PCI-6040E.  Depending on the type of load cell you have, you will need to amplify the signal and possibly need bridge completion resistors.  What type of load cell do you have?

National Instruments sells 2 signal conditioning platforms that will interface with your PCI-6040E, SCXI and SCC.  Follow the links below for more information about these two product lines.

Signal Conditioning

Could you provide me with a more detailed explaination of what you would like to do?

Thanks,
Lorne Hengst
Application Engineer
National Instruments

0 Kudos
Message 2 of 7
(5,702 Views)

Lorne,

 

I already have the system in place with a motor controller and signal conditioning.  I am already capable of operating it.  However, the current tester does not run off of LabVIEW and I am looking to convert it to LabVIEW.

I am looking help setting up a vi capable of operating this tester.  I need a vi I that has the potential of taking in two input signals one from the load cell and one from the LVDT position sensor.  These two relationships is the data I am trying to obtain and I need to be able to plot these two signals against each other. 

 

Also with this I would like the same vi to be able to control the stepper motor.  I am not very familiar with how this communication throught the serial port works.  But, I need the motor to be able to have its velocity, dwell time, and displacement for each cycle to be able to be controlled and at the same time this is running the input data from the load cell and LVDT is also being recorded. I am looking for a vi example with these capablilities.  The best place that I could think that this type of vi may have been used in the past is for some sort of spring tester. 

0 Kudos
Message 3 of 7
(5,689 Views)

j.loot,

I still need a little bit of clarification.

I am not aware of a way to control a stepper motor with your serial port without having some type of motor drive connected between the serial port and the stepper motor.

Do you have a motor drive between the stepper motor and the serial port?

If so, who makes it, what model is it, do you have link to its manual?

"I am looking help setting up a vi capable of operating this tester.  I need a vi I that has the potential of taking in two input signals one from the load cell and one from the LVDT position sensor.  These two relationships is the data I am trying to obtain and I need to be able to plot these two signals against each other."

There will not be an example that does exactly what you want.  There are examples which will allow you to read both of your signals as a raw voltage and then in either LabVIEW or through a task Scale you can convert the raw voltage into displacement and force.  Then you can use the X-Y graph to plot both sets of data against each other.

If I were you I would start by looking at the "Acq&Graph Voltage-Int Clk.vi" shipping example.

This can be found by going into LabVIEW and clicking on the help toolbar.  Then select "Find Examples".

Look at the folders in the middle of the example finder and goto...

Hardware Input and Output -> DAQmx -> Analog Measurements -> Voltage -> "Acq&Graph Voltage-Int Clk.vi"

I hope this helps,
Lorne Hengst
Application Engineer
National Instruments

 

Thanks,
Lorne Hengst
Application Engineer
National Instruments

0 Kudos
Message 4 of 7
(5,664 Views)
Lorne,
 
Yes there is a drive between the serial port and the stepper motor.  The drive is a Parker S Microstepping Drive:
 
 
 
User Guide:
 
 
Thank you for your help
 
Regard,
 
Jeff
0 Kudos
Message 5 of 7
(5,659 Views)
 
I am also interested in setting up a system that would allow me to control a stepper motor based on a separate analog input from a signal conditioned LVDT.  I already have my LVDT signal up and running through a PCI-6229 DAQ board.    At the moment I haven't purchased any stepper motor or driver/controller.  I was wondering how do you know which of these motor & driver combinations would be the easiest to run with LabVIEW.  Is it necessary to purchase the LabVIEW motor control software? Do I have to buy a separate DAQ board for the stepper motor  or can I control it from my current PCI-6229?
 
Any input you could provide on selecting a compatible stepper motor and driver would be great.

Thanks,
Michael
0 Kudos
Message 6 of 7
(5,159 Views)

Michael,

 

The best way to begin choosing components for your system would be to look at our Motor/Drive advisors, linked here:

 

http://www.ni.com/devzone/advisors/motion/

 

You can choose a motor based on the amount of torque you will need to move the specific loads in your system.  Then based on the motor you have chosen, you can pick out a driver that will work with it.

 

It is possible to control a stepper motor with either a DAQ or Motion card.  However, there is a great deal of difference when it comes to programming for these two cards. 

 

If using DAQ to control the motor, you will need to program at a very low level.  This means generating the finite digital pulse trains that correspond to the type of signal the motor is expecting to facilitate its movement, these being either CW/CCW or Step/Direction.  You can do this on your existing card, assuming you have enough lines available.  Keep in mind you will need two counters for every finite pulse train you need to generate.

 

Programming the Motion controller card would be a great deal simpler; for example, you can simply tell the device to move 10 steps forward.

 

For more detailed help in one of these areas, please create a new thread on the Multifunction DAQ board:

http://forums.ni.com/ni/board?board.id=250

or the Motion Control and Motor Drives board:

http://forums.ni.com/ni/board?board.id=240

 

0 Kudos
Message 7 of 7
(5,119 Views)