LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the direction of motion before number of steps?

Hi all,

There's probably some really obvious answer to this that I'm just missing, but I need to separate (delay) the signal for direction change from the clock pulse train when driving a stepper motor. I'm using Labview 6.1 (oldish system) and PCI-7334 motion control card and basically need a way to set the direction for the motion before the number of steps.

Thanks.
0 Kudos
Message 1 of 4
(2,969 Views)
Would it be acceptable to make a first extra step ?
  • Make extra step in the direction of the movement (to set the DIR output to the desired value)
  • Wait some time
  • Make movement
Another solution would be to use a digital output of the motion (or some DAQ) card instead of the DIR output. This gives you the ability to set its level and to wait before sending the pulses. However, this wouldn't allow to use the reference (home, limit switch) search functions of the motion library.

A last recommendation would be to post your question to the motion board. Then Jochen will chime in and everything will become clear...
0 Kudos
Message 2 of 4
(2,964 Views)
Hi JB,

Thanks for the snappy reply.

Because of the nature of the what I'm doing with the motors, it's not possible for me to take that first extra step - I need it to be very accurate.  Thanks for the advice though, and I think I should post it on the motion boards, which I had somehow missed before.
0 Kudos
Message 3 of 4
(2,958 Views)

I'm supposing your issue is that you don't want the state of the direction bit to be transitioning at the same instant as the active edge of the pulse.

I'm not sure how well this thought applies to the motion control board, but here's a technique I've used when generating pulse trains and direction bits with a hardware-timed digital task:  If the motor driver is sensitive to rising edges, I generate an inverted pulse train that is normally high.  I set direction on the leading edge of the pulse (the falling edge) so the circuit properly deals with that direction when it gets its active rising edge (the pulse's trailing edge). 

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(2,946 Views)