From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

P70530-SDN Stepper Drive stepper motor control and labview

Solved!
Go to solution

Hello all,

First time posting on the fourms. I am quite new to LabVIEW and working with stepper motors and I was wondering if I can get some suggestions from you guys. I have a P70530-SDN Stepper Drive and I would like to use that along with a custom LabVIEW program to control a single linear stage. The stepper motor I am using is a CTM22NLF31NAA00, CTM SERIES AMP Stepper with a 48V power supply. All I want to do for now is to move a carriage on the stage back and forth using the keyboard on a computer. 

 

I have been reading up on several documents about getting started with the P70530 Drives and the docs all seem to mention using a UMI and motion controllers as shown below: (from http://www.ni.com/pdf/manuals/372324d.pdf)

70530 UMI.png

I have heard somewhere that I would not need any further hardware if I utilize the P70530 driver, however I cannot confirm that. Would I also need to purchase additonal hardware to properly use my stepper motor? 

 

Also, from some of my early research into how to control a stepper motor using labview, I have seen some users interface with the motor using a VISA configuration, 73xx VIs or DAQmx. I am quite new to all of this and from what I can understand, I could use the NI-DAQmx if I have the the controller connected to a data acquisition board?  Also considering I do not have a 73xx series controller, what would be a recommended method of using LabVIEW to interface with my motor?

 

Are there any further documentation or threads I should read that might be releated to these issues? I apologize if my explanation of my problem is confusing. This is based off of my understanding of how everything works and I am not fully acquatinted with all aspects of LabVIEW or stepper motor control. Please do not hesitate to ask me futher questions regarding my project if you require more information.

 

Thanks. 

0 Kudos
Message 1 of 12
(7,869 Views)
Solution
Accepted by topic author Toby005

Hi Toby,

 

To control a motor, generally you need a drive and a controller. You can think of the drive as the muscle and the controller as the brain. The drive physically moves the motor but the controller sends the signal to the drive and tell it how to move the motor. Take a look at the motion system selection guide and this page. They are nice overview of motion systems.

 

So what you have now is the muscle, and need a controller to tell the drive how to move. As you stated, all the documentation involves a controller from NI.

 

Using DAQmx to controll stepper motion is a posibility. However, since you are new to LabVIEW, it might not be a good idea since it requires to learn another set of API. It is also not the best practice for industrial applications. This community example is on using DAQmx to control stepper motors.

 

Using the serial port is a bit tricky. There are two version of the P70530 drive. One is the P70530-SDN (this one NI sells) and the other one is the P70530-PN (sold by Kollmorgen). My understand is that for the SDN version, the serial port is only used for configuration. For the PN version, you can use the serial port for modbus communication to controll the drive. Seems like someone was able to do it in the past. To confirm this, I think it is a good idae to contact Kollmorgen. If you can control the SDN version with modbus, Kollmorgen probably has some documentation on the commands you can send as well.

Ren H.
Applications Engineering
National Instruments
Message 2 of 12
(7,773 Views)

Hello RenKylo2,

 

Thanks for the response. Do the controllers configure the output so the motor doesn't behave unexpectedly (i.e. jerking or excessive torquing)? 

 

Also, when you said controlling the motor serially with the stepper drive, is that done with or without a controller? galanm from the thread you linked mentioned, "Using portmon we were able to determine the commands used through P7000 tools. We have since incorporated modbus code into the labview code and are able to control speed and direction through the serial interface." P7000 tools looks to be a configuration software for the P70530 drives. Wouldn't properly configuring the drive (such as using P7000 tools or the dip switches) essentially be doing what the controller would be doing?

 

Thank you again for your help. 

0 Kudos
Message 3 of 12
(7,769 Views)

That is one aspect of the controllers do. They also take in consideration of other constraints, such as max velocity, acceleration, jerk, etc., to make sure the motor reach the desired position properly.

 

When I mentioned controlling the stepper drive using the serial port, I meant doing so without using a controller. You can think of the modbus communication handled in LabVIEW as the de facto controller.

 

You can use the DIP switch to configure the P70000 drive for a set of compatible motors as listed in the Getting Started Guide. If the motor is not listed, you can use the P70000 Tools to configure a custom motor. If the characteristics of a compatible motor is similar to the custom motor, I would try using the DIP switch settings for the specific compatible motor first.

 

The P70000 Tools configure the drive so it matches the motor. If it is not configured properly, it could also lead to unexpected movement. The P70000 Tools is mainly for configuring the drive and the controller is designed to control the drive and move the motor.

 

The P70000 Tools is made by Kollmorgen, so I don't know too much about it. The most common use case is using it with a NI controller and a compatible motor, so you don't have to use the P70000 Tools at all. Looking at the manual, the P70000 Tools does seem like it can move the motor clockwise/counter-clockwise and stop the motor. If you know the command it is sending, it seems like it can be controlled via modbus in LabVIEW.

 

With a NI motion controller, the driver is already written. If you want to use modbus communication to control the motor, essentially you will be writing your own controller driver. NI motion controllers also work with more than 1 motors, this is very useful if you want to sync multiple motors to do contour moves or follow a specific trajectory.

 

For your use case, it seems like you only want to move one motor back and forth, so if you can control the drive using modbus, using the NI motion controller is probably not necessary. You just need to figure out what command set it takes and whether or not the drive you have is capable of taking modbus commands. Again, I think the version that NI sells does not. You can give it a try or talk to Kollmorgen to find out. Hopefully all of this makes sense.

Ren H.
Applications Engineering
National Instruments
Message 4 of 12
(7,745 Views)

Ren,

Thank you for explaining everything. Kollmorgen sent me a document regarding modbus communcation with the P70530. Modbus communication seems to be very intricate, time comsuming for a beginner and complex. Considering I have the SDN version, I think it would be better to purchase a UMI-7764 and interface with that with the 7xxx VIs in LabVIEW which seems ideal. Thanks again!

0 Kudos
Message 5 of 12
(7,738 Views)

Not at all! I think using the NI-Motion controllers might be a bit of an overkill since the motor movement doesn't seem to be too complicated, but I do think it will save you the hassle figuring out modbus.

 

Feel free giving our sales department a call. They can do a proper assessment on how well the 73xx controllers fit with your application. You can reach them at (877) 387-0015

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 12
(7,729 Views)

Hello everyone

 

I am developing a vi to run stepper motor using arduino and easydriver motor controller. I need that the vi closes automatically when the motor stops executing the steps entered. I connected the step remaining logic output to an inverter and that the conditional stop of while loop, but that is not working.

 

Any help will be appreciated and will helps a lot

you find the vi and screen shot of the block diagram attached

Download All
0 Kudos
Message 7 of 12
(7,229 Views)

Have you been able to probe the wires or run highlight execution? I am not familiar with the Arduino VIs and personally do not have them installed, but it looks like your logic should stop the VI when 'Steps Remaining?' is false.

Madison T
0 Kudos
Message 8 of 12
(7,211 Views)

Hi Metrz

yes it looks like it should do so, but the problem is that the while loop stops execution as soon as I press the vi run button. I don't know why. it seems like it reads the ancient value from a previous run which would be zero.

I tried to disconnect the conditional stop from the Step Remaining and connect it to a button, the motor works just fine. but this is not what I want, I wan the vi to stop automatically as soon as the motor stops stepping.

Any help would be appreciated!

0 Kudos
Message 9 of 12
(7,197 Views)

Hi

 

I solved the problem explained in my first question. It was small mistake. the new vi is attached below.

However, in this new vi, there is another problem. When I reverse the motor by sending negative value to the # of steps using the switch, the Steps Remaining value indicator plays a random number every time. This number varies when selecting different speed or applying different # of steps.

This is not good for my project because I want to save the position of the motor to a file in the PC using the number of steps. In this way, I can read the exact position of my motor when running the vi another time.

 

Is there any way to modify the vi so that the Remaining Steps start from a specific number every time? just like it does when sending positive number to the  # of steps

 

Regards

Download All
0 Kudos
Message 10 of 12
(7,181 Views)