Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI 9512 with Position Step Frequency Modulation? (cRIO)

Solved!
Go to solution

I am attempting to power a stage for an experiment that requires a frequency modulation on the step signal sent to a stepper motor. I am using a cRIO-9076, an NI-9512 and a NI P70530 stepper driver to drive a third party stepper motor. the Position Step Frequency Modulation VI appears to be exactly what I need for my application, but I am having some difficulties working with it and the NI 9512.

 

Is it possible to use the 9512 in a FPGA VI?  The PSFM requires use in a single-cycle timed loop, so I would like to send the Step and Direction signals directly to FPGA I/O for the 9512. However, the 9512 does not configure for use as FPGA I/O. In researching, I found examples using the 9501 module instead of the 9512, but that would require a lot of new equipment that I do not think I should have to purchase.

 

I would greatly appreciate some suggestions as to what to do, and even ideas as to how else I could tackle this problem.

 

Thank you,

 

Enan

0 Kudos
Message 1 of 5
(5,722 Views)

Hi Enan,

 

The NI 9512 has a built in Position Step Frequency Modulation (PSFM) algorithm that does that same thing as the Position Step Frequency Modulation VI. The implementations are slightly different due to data type differences, but they do the same thing. I would recommend using the NI 9512 in scan mode. There is a getting started guide here that will show you how to do that.

 

To answer your question directly, the PSFM VI cannot be used with the NI 9512, even in FPGA mode. The NI 9512 always runs the PSFM algorithm on the module itself. You must provide the 9512 Write IO node either a set of spline coefficients or a position setpoint. You cannot directly control the step and direction signals of the module. If you want to do that, you can use a generic digital IO module instead. Keep in mind, though, that since the step and direction inputs on most stepper drives are optoisolated, they require more current than standard TTL modules are able to supply.

 

Thanks,

0 Kudos
Message 2 of 5
(5,715 Views)

Hi Paul,

 

Your response is very helpful, and kept me from many hours of needless work. I am new to cRIO and NI SoftMotion, so forgive me if my questions are elementary.

 

What I got from what you said is that the PSFM is always run by the 9512 and I do not need a VI to do that for me. I just need to pass spline coefficients or position setpoints to the module, correct?  

 

In my project I need to have a sinusoidal driving force from the motor to the stage that I am powering, which implies that I will also need sinusoidal position coefficients. However, from what I am reading on the 9512, each setpoint is treated as a destination, and there is a motion trajectory produced for each setpoint sent to the module. If this is the case, it would not truely be sinusoidal driving force, but a series of small shocked system pulses, which would not give me the smooth motion I want. Is there a way to change this?  Or am I thinking about this all wrong?

 

Thank you for your help,

 

Enan

0 Kudos
Message 3 of 5
(5,695 Views)
Solution
Accepted by topic author ezelinski

Hi Enan,

 

When using the 9512 in scan mode, the NI SoftMotion Module will send a position setpoint to the 9512 once every scan period (the scan period is usually around 1 to 10 msec). The 9512 does not generate a trajectory; it only interpolates between setpoints that it is given. It would be your responsibility as the programmer to make sure that the setpoints being sent to the 9512 are sinusoidal. The easiest way to do this is to use a contour move and fill the contour buffer with a sine wave profile. You can generate a sine wave profile using something like the sine pattern VI. There are shipping examples in SoftMotion that show how to perform a contour move.

 

I believe contour moves require SoftMotion Standard or Softmotion Premium. If you only have SoftMotion Lite, the only way to get a true sine wave trajectory is to generate the sine wave pattern on the RT host and send it to the FPGA through a FIFO. You could also generate the sine wave pattern directly on the FPGA. You would then write the sine wave point by point to the 9512 Write method. This is more difficult to implement, so if you have SoftMotion Standard or Premium, I would recommend the contour move approach.

 

Thanks,

0 Kudos
Message 4 of 5
(5,677 Views)

Hi Paul,

 

Thank you for your help!  I have the sine values being passed to the 9512 currently using the FIFO and FPGA. I do however have SoftMotion Premium, so I am going to attempt the contour move method too.

 

I will let you know if I encounter problems, but as of right now, I have the frequency modulation that I was looking for.

 

Thank you very much!

 

Enan

0 Kudos
Message 5 of 5
(5,645 Views)