Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Two out of phase outputs on the 9472

I am trying to control a stepper motor with the 9472 through a PWM motor driver.  The 9472 is on a cDAQ-9172.  I need to generate two square wave signals(1kHz) with the 9472, one of them with a slight(.5ms) delay.  Is this possible?  I have found an example by searching the forums for "9472" in changing the duty cycle, but I was not able to get this example working the way I needed it to for my particular situation.
 
Thanks
0 Kudos
Message 1 of 2
(3,472 Views)
Hi Abraham,

The way you can go about doing this is by creating 2 counter output tasks in the same application.  The second counter would be configured for a digital start off of the internal output of the first counter.  By setting the initial delay of the 2nd counter to 0.0005s, you can cause it to have a phase shift in relation to the first.  I am assuming that you are using LabVIEW, so I have attached a VI that implements this.  I developed this VI by combining two of the shipping examples for continuous pulse train generation (one with and one without a digital start trigger).  Keep in mind that the 9472 will need to be in either slot 5 or 6 of the cDAQ chassis to have access to the counters.  Let me know if you have any questions.

Regards,
Andrew W
National Instruments
0 Kudos
Message 2 of 2
(3,457 Views)