12-03-2012 10:40 AM
In my application I am simply taking differential voltage measurements utilizing the USB6008, I am able to successfully do this and can read the values into an appropriately sized array of float 64s using the following the command:
DAQmxReadAnalogF64(taskHandle,num_readings,10.0,DAQmx_Val_GroupByChannel,dut_info.rawData,num_readings*numChannels,&numRead,NULL));
My issue is that in development anytime I attempted to use a command like:
DAQmxReadBinaryI16 or similar OR
DAQmxReadRaw
I would get back values from the device, but the format of the integer seems to be garbled, ie bytes swapped or nibbles swapped something along those lines. Haven't taken the time to try and figure out the bit pattern.
So first question would be from the documentation what is the raw dat format for USB6008. It does state that somewhere you should be able to find what the raw data format is for the USB6008, but I can't seem to locate it and then secondly regardless of getting the DAQmxReadRaw command working, I would assume that as long as I co-ordinate the type and size of the read arrays in my case dut_info.rawData with any of the DAQmxRead<type> commands should work, where<type> could be as above either AnalogF64 or BinaryI16 the data read should be OK.
12-04-2012 07:05 PM
Could you elaborate a little more on what the integer looks like when you get it back? I'd be curious to see what you're doing to view this raw data you are receiving back from the device.
12-05-2012 04:12 PM
I don't have the test system with me anymore and I didn't take detailed notes, but from some of my scribbled notes I have that when I read at the top of my scale of +5V the integer read back was 0xFB1 and when a -5V signal was read the value was 0x04C (I believe as I said I am working from scrap sheets here) Anyways the float feedback was correct, ie I receive +5V and -5V respectively. Is there anyone who has done this and received back integer info that made sense.
12-06-2012 06:18 PM
You can find some more information on working with raw data in the documents linked below.
http://zone.ni.com/devzone/cda/epd/p/id/1611
http://digital.ni.com/public.nsf/allkb/0FAD8D1DC10142FB482570DE00334AFB