Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Output Multiple Digital IO with 2D N-Channel N-Sample

I am new to LabView and the DAQmx tools, and I am trying to get a cDAQ-9178 with a NI 9403 card in it to output an exact copy of a digital waveform on all 32 IOs.  The attached VI only outputs the signal on IO0.  I am trying to use the DAQmx write with N channels and N samples.  The data into this module I believe is a 32x100 array with exact copies of the original waveform in each 100 samples.  The PCB for use with this module has already been designed and uses all 32 IO for a PWM so I can't simply use the PWM out of IO0 alone.

 

Any help on what I am doing wrong would be greatly appreciated.

 

- Thad

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

Hi tbriese,

 

With digital I/O, the whole 32 bit port is a single "channel," and the wire terminals are "lines." This might be counter-intuitive if you've done analog I/O, because with analog, each wire terminal is one "channel."  So in your application, you have only one channel, but multiple samples. Hope that helps!

 

Regards,

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(5,139 Views)

Nathan,

 

It doesn't make any sense to me since the DAQmx Create Channel (DO-Digital Output).vi can create channel(s) and I had the "line grouping" input set to one channel for each line which to me should create multiple channels.  In fact, if I had only a single channel of data (1D array) going into the N-chan, N-samp write block, I got an error on the size mismatch.

 

I did get this working.  I had to set the "line grouping" input to one channel for each line, remove the array builder that made my 1D array into a 2D array, and toggle a U32 from 0x00000000 to 0xFFFFFFFF.  Not a clean solution, but it worked.

 

The documentation for the DAQmx stuff is pretty poor on this point or it doesn't actually work for N-Channel N-Samp because I believe what I had should have worked.

 

- Thad

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