LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a stepper with 6024e?

I'm trying to control an escap p520 with an edm-453 controller. The
DAQ is an 6024e.

I'm using 3 digital inputs on the stepper controller for pulse,
direction, and enable. The enable and the direction pins are connected
to DIO4 and 5 of the DAQ. The pulse pins are connected to CPCTR_0.

I can move the stepper manually with MAX, but how to set it up on
Labview?

Currently i'm using a while loop to check if enable and direction are
true/false. If i put the pulsetrain sub-vi into the loop, I get
"jumps" on the step frequency signal. Waiting time in the while loop
didn't solve the problem.

Are there examples on how to do it?

Thanks
Dietmar
0 Kudos
Message 1 of 2
(2,536 Views)
Dietmar,

It sounds as if you are actually generating the pulses inside the while loop. This causes the frequency of the pulses to be software timed. In this case, the frequency will not be constant and will be hard to control because the timing depends on when the processor actually processes the commands to generate a pulse.

A better method would be to start the pulse train generation before the while loop and end it once the loop completes. I recommend taking a look at the Generate Pulse Train (DAQ-STC).vi example in LabVIEW. To view this example, Open LabVIEW 6.1 and select Find Examples. Select Hardware Inputs and Output >> DAQ >> Counters >> DAQ-STC. You could modify this program to check the enable and direction lines in the while loop.

Rega
rds,

David Shatila
Applications Engineer
National Instruments
Message 2 of 2
(2,536 Views)