Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up parallel SoftMotion axes on a single FPGA?

I'm trying to drive 5 independent stepper motors through 1 CompactRIO controller, but am encountering strange behaviours (I think it might be a timing issue).

 

This is my hardware:

  • Controller: cRIO-9081 (scan period = 5ms)
  • Modules for reading encoders: NI 9411
  • Modules for driving steppers: NI 9474
  • Modules for limit detection: NI 9421

 

Here's what I've tried so far.

 

For software, I took the code from official examples (LabVIEW 2012\examples\Motion\UnboundAxis\Stepper Interface (9401)), and cloned them for each axis.

 

In the FPGA software, I simply cloned the various loops and hooked them to the same synchronization loop:

SoftMotion_Parallel_FPGA.png

 

 

In the RT software, I made all the axis interface VIs and subVIs reentrant (preallocated clone), and ran 5 axis interface VIs in parallel:

SoftMotion_Parallel_RTAxis.png

 

 

The two big issues I've noticed so far are:
1) I can't start all 5 copies of the axis interface VI simultaneously; if an axis is started within 300ms of another, its Loop Timer VI in the Position Loop (FPGA) will say "Fault Occurred?" == TRUE, and "Scan Running?" == FALSE indefinitely. I worked around this by staggering their start times:

SoftMotion_Parallel_RTRun.png

 

 

2) If I use the asynchronous SoftMotion Express VIs, there are times when the Express VIs' outputs don't appear when they should. E.g. I call Stop Move while a Straight Line Move is in progress. The Straight Line Move VI is supposed to produce an "aborted" signal, but sometimes it doesn't. (http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Do-all-of-SoftMotion-s-express-VIs-produce-a...) This is a reproducible behaviour. I can't think of any good workarounds, except to use redundant checking so as to not rely on a single signal only to drive logic. This is obviously not ideal.

 

I guess my questions are:

  • Is my hardware capable of controlling + monitoring 5 steppers simultaneously?
  • What's causing these symptoms?
  • Are SoftMotion axes reentrant?
  • What's the recommended way of running multiple axes simultaneously?

 

Thanks in advance!

Certified LabVIEW Developer
0 Kudos
Message 1 of 2
(5,842 Views)

Hi JKSH,

 

Take a look at these examples:

https://decibel.ni.com/content/docs/DOC-23401

http://zone.ni.com/devzone/cda/epd/p/id/6552

 

 

 

They might provide you with some context. You can also take a look at the Softmotion help here: http://zone.ni.com/reference/en-XX/help/371093G-01/

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