Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Program phase shifted pulses from DIO/counter lines in USB-6343

I am trying to generate 3 phase shifted pulse trains (with variable frequency)

from DIO lines of a USB-6343 device. This is to simulate a hall effect speed sensor.


I haven't used DIO/Counter lines for this purpose before and just started learning Labview. Can anyone help me with this problem or direct me to relevant resources? 



0 Kudos
Message 1 of 2

I know I've posted about similar things before but couldn't seem to find those msgs just now.  I only have time to describe things now, you may have to search out some terms to help "fill in the blanks".  But here's the main idea:


The first important thing is to configure 1 counter to generate a continuous pulse train which you use to drive the timing of the 3 pulse trains you care about.  You'll be able to change the frequency of this pulse train on the fly, without stopping to simulate the effect of variable speed.  Doing things this way keeps the 3 pulse trains in relative sync with one another.


You could configure your other 3 counters to be the pulse trains of interest (Continuous Sampling again), using different "initial delay" values (in units of "Ticks") to set their relative phasing.  They would configure the 1st counter's output as their "timebase source" in order to use it to control their own output timing.  After all that, start the 3 counters first and start the 1 time clock counter last.


That would consume all 4 of your device's counters though.  So another method is to configure a DO task to use the 1 counter's output as its sample clock.  Then you'd define 1 rev worth of digital samples for 3 digital lines.  The relative phasing will be controlled by the data you define.  Set the DO task for Continuous Sampling, start it first, and start the 1 time clock counter last.


Note: It's possible (but I don't know for sure) that you can use the DO method with an internal sample clock and still change the frequency on the fly.  I know that a lot of devices support that for AO, but not AI.  Maybe DO is treated similarly to AO that way?



-Kevin P

0 Kudos
Message 2 of 2