Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to return binary codes with DAQmx C API from a PCI-6111?

I am in the process of writing a replacement for software that was written with VB 6 and the CWAI component. Our application uses the PCI-6111. This code was written with the "ReturnDataType" property set to "cwaiBinaryCodes".  Is there a way using the DAQmx "C" api to have the equivalent of "cwaiBinaryCodes" returned to me, i.e., of having "unscaled" data returned to me? I am using the DAQmxCreateAIVoltageChan function; however, other than creating a "custom scale" to "unscale" the data, I see no other means of having DAQmx return unscaled data to me.

Thanks in advance!

Best Regards,
Matthew

0 Kudos
Message 1 of 3
(2,936 Views)
NI-DAQmx has several Read functions that use different datatypes. Just use the appropriate DAQmxReadBinaryXXX(..) function to get the binary data in the format you want. The online help on the read functions will explain the difference between the different flavors
Rajesh Vaidya, Ph.D
National Instruments
0 Kudos
Message 2 of 3
(2,925 Views)
Thanks for the reply, Rajesh.

It seems, to me, to be counter intuitive to have a unit specified when a voltage channel is created and then have the read functions be able to at least partially pick the units that are returned. However, if I had looked further in the documentation, I almost certainly would have found the read function to return binary values since I am using DAQmxReadAnalogF64.

Thanks again.

Best Regards,
Matthew

0 Kudos
Message 3 of 3
(2,892 Views)