LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Softmotion Module to control 4 stepper motor for 3D printer

Solved!
Go to solution

Hello,

 

I have a project to control 4 stepper motors for a 4 axis 3D printer. I know using soft-motion one can control the motors by defining the axes. But I wanted to use my-Rio for this purpose. I am not sure that my-rio can handle all 4 axes. With my-rio, it gives me two options either simulated axis or unbound axis. I don't know what is unbound axis and there is no option for user defined axis. I was not able to find the tutorial for this.

 

If my-rio doesn't work, I want to use C-Rio and one NI 9263 voltage output module. Can anybody help me out with this ?

 

Regards,

Kashish Dhal

0 Kudos
Message 1 of 15
(4,031 Views)

Hi Kashish,

 

It's not possible to use SoftMotion with a myRIO. There are options though so check this other thread:

https://forums.ni.com/t5/Motion-Control-and-Motor-Drives/motors/m-p/3221614

 

About using cRIO with an NI 9263, I'm afraid that I don't get this option. The 9263 is an analog output module so it won't work with some motors that require PWM (like a stepper) for example

 

There are some drives that can drive motors using analog signals but this is an old technology where you generate the trajectory profile and different things to keep in mind. In this case, you wouldn't use SoftMotion either, you'll need to develop the code in RT of FPGA.

 

Check this guide for selecting hardware compatible with SoftMotion

http://www.ni.com/product-documentation/9414/en/

 

Regards,

PedroR

0 Kudos
Message 2 of 15
(3,996 Views)

Dear Pedro,

 

I thought the SoftMotion is made for custom FPGA as well and can be used with other modules using DI/O pins. But I was wondering that how to assign my-rio DI/O pins to unbound axis in softmotion.

Please look at this link:-

http://www.ni.com/product-documentation/53594/en/#toc7

 

Regards,

Kashish Dhal

0 Kudos
Message 3 of 15
(3,988 Views)

Kashish,

 

You are right, I am sorry for the confusion. I would suggest having a look at the examples in "C:\Program Files (x86)\National Instruments\LabVIEW 2017\examples\motion\UnboundAxis"

 

These are examples using SoftMotion with unbound axes. You can change the DIO and AIO from the 9263 and 9401 for the ones in the myRIO.

 

I'm not completely sure if it will work though. There might be limitations in the myRIO in comparison with a cRIO target.

 

Regards,

PedroR

0 Kudos
Message 4 of 15
(3,977 Views)

Dear Pedro,

 

Thanks for replying. I will look over the examples and let you know about it.

 

Thanks,

Kashish Dhal

0 Kudos
Message 5 of 15
(3,968 Views)

Dear Pedro,

 

I tried working on the unbound axis example VI's but I was not able to understand that how it works. However, I would like to mention that I compiled it on my-Rio FGPA and it is running. Sometime it gives me error in regard to NI Scan Engine(switching to active or configuration mode or I\O buses). I just started working on Softmotion and I don't know much about it. Is there any tutorial where I can just start working with single open loop stepper motor then 2 motors coordinated straight line motion and finally 2 axis circular motion. I don't need spline, camming, gearing, etc. 

 

Also, I was not able to understand that when we define soft motion axis then where do we define which I\O pins to trigger for that particular axis. Please help me with the basic tutorials.

 

Regards,

Kashish Dhal

0 Kudos
Message 6 of 15
(3,948 Views)

Hi Kashish,

 

There is a tutorial for that example. There are some differences in the platform that might complicate the development in myRIO. This device doesn't have scan engine and this example is synchronized with it using the CalculateLoopRates.vi. The other difference is that myRIO has its digital IO incorporated. You need to route the signals properly from the C series modules (9263 and 9401) to the IO of the myRIO

http://www.ni.com/pdf/manuals/372597a.pdf

 

Regards,

PedroR

0 Kudos
Message 7 of 15
(3,930 Views)

Thanks Pedro,

 

So, if working with my-Rio is too hectic. Can I work with C-Rio and 9263 module instead? Are they alone sufficient enough to control 4 open loop stepper motor for 4 axes 3D printer or do I need additional hardware as well? If they are sufficient, which examples should I refer to? If not, what additional hardware do I need? As I mentioned in the previous post, I don't know anything about Soft-Motion. Is the document you provided in last post enough to get started?

 

Also, you didn't answer that while defining the SoftMotion axis where do we specify that which I/O pin on the module will talk to the a particular axis? Because when we right click the axis and go to its properties, it has no information about the I/O pins. Is the pin assignment done in the FPGA VI?

 

Thank you so much Pedro for the help. I really appreciate it.

 

Regards,

Kashish Dhal

0 Kudos
Message 8 of 15
(3,923 Views)

Hi Kashish,

 

I am sorry I confused the examples. The one I told you about is for servo, the one for stepper is in the same folder and it's called "Stepper Interface (9401)".

 

I'm afraid that both approaches you are contemplating are really complicated. The SoftMotion is made for working with specific C series modules (950x and 951x). You are thinking of using a C series Analog Output module which will give you a lot of work and I'm pretty sure it won't work at certain speeds. Using the myRIO is also quite complicated because you need to understand FPGA programming (SoftMotion is made for working in a more high-level way) and myRIO doesn't have Scan Engine and this example is synchronized with it.

 

The NI-9401 is a digital output module, the myRIO has DO so it'll be basically changing them for the ones in the myRIO in the FPGA. For controlling 4 motors you'll need 4 NI-9401

 

If you don't have any experience with SoftMotion, this is definitely the more complicated way to start with it. 

 

Regards,

PedroR

 

0 Kudos
Message 9 of 15
(3,904 Views)

Thanks Pedro,

 

So what do you suggest if I have to start? If I buy motor drive module, do I need 4 C series modules (950x and 951x). or Is there any module which can handle multiple axis? My aim is to keep the cost minimum so if I buy 4 of them then it will increase the cost as well. Also, I came across the following thread which says you can handle multiple axis using same module.

https://forums.ni.com/t5/Example-Program-Drafts/Scalable-Multi-Axis-SoftMotion-Architecture-for-cRIO...

 

Please give me feedback on it.

 

Thanks,

Kashish Dhal

0 Kudos
Message 10 of 15
(3,895 Views)