Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate fast pulses (microseconds) from the USB6221 DIO

I am trying to generate ~300uS pulses from the Digital I/O port of the USB6221 DAQ.  I am using Labview 8.2.1.  I created a VI that can sequentially pulse 16 I/O ports . . .  However, the minimum pulse duration appears to be about 1 mS, and varies greatly.  Using Labview (Windows) control, it appears it is impossible to generate such fast I/O pulses.
 
Is there a way, with counters and an onboard clock for example, that I can LOCALLY (on board the USB6221) control the pulse duration, yet still have the flexibility of Labview programming?  For example, can I create a VI that tells a digital I/O port on the USB6221 port to stay high for X number of counter readings of an onboard clock?
 
Or, if there is a better way, that would be fine too :-).  Keep in mind I would like to generate such short pulses from 16 of the I/O ports sequentially.
 
Thanks for any assistance you can provide.
0 Kudos
Message 1 of 5
(3,050 Views)
you want to precisely control the pulse width, but what is your time-control requirement between the channels? is this also important, or only the pulse width matters?
0 Kudos
Message 2 of 5
(3,035 Views)
Timing between pulses is not critical, as long as I can know when the pulse has ended, and can do an A/D sample immediately afterward.  Roughly, 10 mS +/- 2 mS would be fine.
 
I discovered that the counter output IS capable of precise pulsing at 300 uS.  However, my dilemma is that there are only 2 counter outputs, and I need 16.  So, a followup question may be:  Can I create these precise counter outputs on the digital I/O lines?  Based on what I have read in the Measurement and Automation Help, I think this cannot be done.
 
Thanks for the input.  Given that my timing between pulses is not critical, what do you suggest?
0 Kudos
Message 3 of 5
(3,023 Views)
yes you are right, only the counter can be precicely timed-controlled. The DO does not have this capability.
I see 2 options:
- either you buy a card with more counters (like the PCI-7811R).
- or you can make an external circuit with 16 AND gates (each gate's input connected to 1 DO channel and the other input connected to the CO (counter cutput). That allows you to control wich output is active and also the pulse width precisely. This is a fast and cheap solution and requires only basic electronic knowledge.  
 
 
Nicolas

Message Edited by titi_nicolas on 05-02-2007 11:53 AM

0 Kudos
Message 4 of 5
(3,013 Views)
Hi TomSSD,

You can generate a hardware-timed digital waveform on port0 using a counter as the sample clock. The LabVIEW example "Multi-Function-Synch Dig Read Write With Counter.vi" shows how to do this, and it's located in LabVIEW 8.21\Examples\DAQmx\Synchronization\Multi-Function.llb. If you need pulses on 16 lines, you might need to use a different board (like a USB-6229) or some external circuitry, since the USB-6221 only has 8 lines on port0.

Brad
---
Brad Keryan
NI R&D
0 Kudos
Message 5 of 5
(3,006 Views)