Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a 5V step of various durations and intervals with the USB-6229

Hello there,

I have a USB-6229, which I want to use for continuous recording of analogue (voltage) input (the output from an analogue amplifier) in response to a digital output stimulus (a 5V LED). I am thoroughly confused by the M-series manual (sorry - biologist not electrical engineer so the vocabulary is unfamiliar to me), and I cannot tell whether one of the DIO channels on my USB-6229 can be configured to generate a 5V step, of a given duration (that I specify, likely in the range 10ms to 500ms) and a given interval (which I also specify, likely in the range of minutes) while also recording the analogue input from several channels simultaneously.

I guess my immediate problem is that I can't tell whether I can use the USB 6229 alone to generate the digital waveforms described above, or whether I need some other device to "trigger" the USB 6229 to generate the waveform of a given duration and interval (related problem - I think I am confused by the definitions of "triggering" and "clock" in the manual).

Any help or direction to get me started on this project would be very gratefully received.

Many thanks in advance,

Lene.

0 Kudos
Message 1 of 5
(3,742 Views)

Hello Lene,

 

The easiest way to generate and control a digital pulse will be with a counter.  You can go into Example Finder in LabVIEW and go to Hardware Input and Output » DAQmx » Generating Digital Pulses and go to Gen Dig Pulse-Retriggerable.vi.  What this does is it allows you to generate a digital pulse based on an external trigger. The external trigger can be done in many ways, but if you wanted to have user control over the time the pulses are generated, this is what you would use.

 

Depending on how you want to generate the pulses, you can generate a pulse train of specified duration and interval with the Gen Dig Pulse Train examples.  There are several here that have their own features, and depending on your application some may be better suited for you.  This will give you a good spot to begin looking at different ways that a counter can be used to generate 5V steps for your application.  

 

A trigger is a hardware/software condition that begins your task.  The clock is the timing engine that is used to generate or acquire samples.  A 20MHz clock will allow you to have a resolution of 1/20MHz for your digital pulses, which is plenty of resolution if you plan on using 10ms to 500ms digitial pulse rise time.  

 

You can do all of this on your USB-6229.  I would recommend generating pulses with one of your counters on your DAQ, and reading an analog channel continuously in parallel will not be a problem.   There are examples under the DAQmx Synchronization folder that use two tasks on one device.  This is under  Hardware Input and Output » DAQmx » Synchronization » Multi-Function.  The examples here can be modified for your application.

 

Hopefully this gives you a good starting point, good luck with your project!

Kyle A.
National Instruments
Chief Applications Engineer
0 Kudos
Message 2 of 5
(3,723 Views)

Hi Kyle,

Thanks for your response. I should have made it clear that I am using LabVIEW Signal Express. Where are the equivalent examples located in SignalExpress? I can't immediately find them!

Cheers,

Lene.

0 Kudos
Message 3 of 5
(3,711 Views)

Hello Again,

I just downloaded the evaluation version of LabVIEW 2009 (30 day free trial) and although I see example finder, the .vi files you mention are not under Hardware Input and Output >> DMQmx (the only folder under DAQmx is  "Analogue Measurements").

Lene

0 Kudos
Message 4 of 5
(3,708 Views)

Hi Lene,

 

You will have to reinstall your DAQmx driver since the order of installation is to first install the platform (LabVIEW) and then the drivers.  As far as using SignalExpress, it will be different as far as coding goes, but the same basic ideas still apply, and you will be able to do both tasks on your USB-6229.  You will need to use the DAQmx Generate Counter Pulse Output step and the DAQmx Acquire Analog Input Voltage step.

Kyle A.
National Instruments
Chief Applications Engineer
0 Kudos
Message 5 of 5
(3,689 Views)