Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-7730 does not sequentially move motor different directions?

Solved!
Go to solution

I have a 7330 motion control card that I am trying to drive one axis at a time on (so only ever 1D moves). I need to be able to move in both directions, which is easy enough to do using a modified (modified to include limits and home) example VI (I think it was the straight line 1D motion example). To effectively run my stepper motor for my application, in step/direction mode, when moving to the negative step direction (for me this is to the "blue" in my dye laser) I need to overshoot and then come back so that the motor always ends a move by coming to the red. I have tried several solutions to this problem, including:

 

1. in one VI copy/paste the necessary motion sub-VIs in sequence, but specify a "number of steps to move" for the second piece

2. call sequentially the same sub-VI (so rather than one long VI, a VI with calls to a main motion sub-VI) with various implementations of delays and sequencing

 

The problems I encounter are as follows:

 

When using a single move VI (so go only one direction until move complete), I can almost always successfully move, whether to positive or negative direction. Occasionally, and mostly when attempting to move in a different direction than the previous move, the motor isn't driven. I can watch this on my oscilloscope by monitoring the steps returned by the motor. The steps start, but about 4 pulses in, the VI quits with no error reported (and with the output I call for, it appears that the program thinks the move is successful). In contrast, when using the VI that calls one direction and then the other I can *never* get the second (opposite direction) move to happen. I've even put in 20s delays between the two in a flat sequence structure to no avail. However, I can move one direction and then immediately the same direction successfully with the exact same code.

 

I cannot find a "clear channel" or the ability to independently set the direction behavior (for instance, set direction output for a negative move before the negative move, then reset for a positive move before the move is actually called for). It is entirely possible I am missing some crucial part in my main motion VI, but then I would think that the repeated single direction moves would fail more frequently.

 

Is there a way to set the direction before a move? Or has someone else encountered this problem and found a more 'elegant' solution?

 

Thanks!

 

A. Berke

 

Of note: in order to generate enough current to drive my motor driver (it has optically isolated inputs), I have added my own resistors to both the step and direction wiring as they head out towards the motor driver.

0 Kudos
Message 1 of 2
(4,583 Views)
Solution
Accepted by topic author aberke

I've solved this in case anyone else has a similar problem. It turns out that you have to be careful with Board ID. It can only be called once (so multiple calls to sub-VIs that utilize the same Board ID in a 'main' program won't work unless the ID is passed from the top level) in a program.

Message 2 of 2
(4,528 Views)