Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I output a digital waveform?

I am trying to output a digital waveform with an M-series DAQ card (PCI-6221), LabVIEW 7.1, NIDAQmx.
 
Is it even possible to do hardware-timed digital output with this card?
If so, how?
Attached is my attempt at it, but it is not working. Just as an example, in this VI I am trying to output a short waveform (5 samples), on a single liine of a digital port, at a 1 Hz update rate. The VI runs with no errors, but the digital line never changes state.
 
What am I doing wrong?
 
Mark.
0 Kudos
Message 1 of 6
(4,608 Views)

Hello Mark,
M Series devices can do hardware timed digital output.  However, there is no dedicated digital timing circuitry.  So the sample clock must either be an external clock, or be generated by another onboard timing source.  You could use the analog input sample clock, analog output sample clock, or a counter output as the sample clock, just to name a few.  There are a couple example of this in the LabVIEW example finder.  In LabVIEW, go to Help>>Find Examples.  Navigate to Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function.  Then take a look at "Multi-Function-Synch AI-Read Dig Chan.vi" and "Multi-Function-Synch Dig Read Write With Counter.vi".
-Alan A.

0 Kudos
Message 2 of 6
(4,594 Views)

Hi Alan,

Thanks for the info. I was able to modify one of the examples to do what I want.

Mark.

0 Kudos
Message 3 of 6
(4,583 Views)
No problem.  Glad I could help:)
-Alan A.
0 Kudos
Message 4 of 6
(4,569 Views)

Hi, 

 

I really appreciate if you can show me an example on how to create an hardware timed task to generate a SPI sample waveform? i'm a little bit confused on this, i've installed  SPI Digital Waveform Reference Library but i cannot find any example of hardware timed generation of a SPI waveform.

 

Thanks in advance.

0 Kudos
Message 5 of 6
(3,617 Views)

i forgot to talk about my HW: i got a cDaq 9174 with a NI 9104 module from which i have to extract a SPI waveform

0 Kudos
Message 6 of 6
(3,616 Views)