Multifunction DAQ

cancel
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? 

 

Thanks 

0 Kudos
Message 1 of 2
(775 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(722 Views)