07-10-2013 01:43 AM
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:
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:
In the RT software, I made all the axis interface VIs and subVIs reentrant (preallocated clone), and ran 5 axis interface VIs in parallel:
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:
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:
Thanks in advance!
07-11-2013 08:10 AM
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/