Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Can PCI 6534 output 32-bit sample at a time

Solved!
Go to solution

Hi, sorry to bother if not intersted.

 

 

I was using C++ and NI-DAQmx to do an externally-triggered pattern generation on PCI 6534. Using the following code, I was able to generate an array of 32-bit samples at a time: 

uInt32 DataArray[Nsamples];

DAQmxErrChk (DAQmxWriteDigitalU32(taskHandle,Nsamples,FALSE,Timeout,DAQmx_Val_GroupByScanNumber,DataArray,&written,NULL)); 

 

 

When I switched to NI-DAQ, it seems that I can group all data with groupsize=4, but in the following respective function, the datatype of "piBuffer"canonly be "i16" (16-bit int). Do I have to re-calculate all my data and split into two groups? 

DIG_Block_Out(iDevice, iGroup, piBuffer, ulCount);

If one does this, will it be able to output 32-bit smaple at each defined clock cycle or it needs two cycles?  

 

Thanks.

 

 

 

0 Kudos
Message 1 of 3
(3,462 Views)

In case one needs to know why I need to downgrade from DAQmx to DAQ:

we have a old computer with other NI cards, DAQ driver and Labview 6.1 installed, it takes less time to downgrade DAQmx than upgrade all others. 

0 Kudos
Message 2 of 3
(3,459 Views)
Solution
Accepted by topic author eLions

kxz,

 

Thanks for posting on the NI Forums. I believe there are a couple of suggestions for this, you will have to forgive me somewhat we don't get a whole lot of questions on Traditional DAQ much anymore.  I believe that you will have a couple of options in your case:

 

1) the DIG_Out_Prt function that can be called four times (once for each port) with a pattern that you want or, 

 

2) you can call the DIG_Block_Out function, now the buffer input will be an input with two arrays, each of 16 elements. You will need to set your group size as 2 (2 groups of 2 ports) or as 4 (4 groups of 1 port), DIG_Block_Out writes data from the lower 8 bits of buffer [0] to the lower port (port 0 or port 2) and data from the upper 8 bits of buffer [0] to the higher port (port 1 or port 3). If group size is 4, DIG_Block_Out writes data from buffer[0] to ports 0 and 1 and data from buffer[1] to ports 2 and 3.

 

Overall, we strongly suggest using DAQmx for your programming, but we do have good documentation on all of the C functions within the Traditional NI-DAQ (Legacy) Help. You can normally find this file under Start >> Programs >> National Instruments >>  NI-DAQ >> Traditional NI-DAQ Function Reference Help. This includes all the documentation for our text-based functions. Thanks!

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 3 of 3
(3,431 Views)