Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Desperate: What's the max speed of a NON-simultaneous DAQ? (PCI-MIO-16E-1 (6070E))

Solved!
Go to solution

David Krider wrote:
Also, I read a little on the fast log thing. It seems meant for LabView; I don't know how easy it will be to get it going in C. Plus, I'll probably move back to Linux, now that I know what I'm doing, and that seems to be a 9.x or better feature.

It works from the C API as well simply by calling the DAQmxConfigureLogging function.

 

That being said, if you are not using this feature due to Linux, I would still recommend using an unscaled read instead of reading scaled data and then down converting.  To do this, you use the DAQmxReadBinaryU16 function and then apply device scaling coefficients (found by calling function DAQmxGetAIDevScalingCoeff).  I believe for your device, this consists of a simple linear scale (similar to what you're doing) where DAQmxGetAIDevScalingCoeff would return two values, b and m, respectively.  Reading unscaled data and apply the device scaling coefficients will prevent data loss since this is the same exact way that we apply the scaling information internally.  

Thanks,

Andy McRorie
NI R&D
Message 21 of 23
(1,140 Views)

Aha! That sounds good. And I'll do you one better. I have signed voltages, so I'll try using DAQmxReadBinaryI16.

 

As I've said, I'm not very good with C, and I've never used a callback function before, so I figured this was a chance to learn about them. However, since changing over to using them, I'm having a devil of a time trying to get the file writing operations interlaced with the callbacks. Where do I define the file pointers? Where do I open the files? What mode do I open them with? Do I need to flush them? I'm trying all sorts of variations along these lines, and it's making the program fail in lots of interesting ways. Sometimes it just dies. Sometimes it keeps going for a little while after I press Enter, looking like it's still taking data, and then dies. It's baffling me, and there are no examples that seem to have just regular ol' file writing in them. Oh well. This is how I learn.

0 Kudos
Message 22 of 23
(1,132 Views)

Just for the record, I've got my program logging the values just fine now. What I wanted to say was that using the DAQmxReadBinaryI16 has been an eye-opener! It's forced me to realize that I'm just getting the 12 bits of resolution that the card can do. Of course, that was the case all along, but that was sort of "papered over" by using the DAQmxReadAnalogF64 function. I'm going to be able to scale my values much better now, and I feel like I'll have a better representation of my data because of it.

 

0 Kudos
Message 23 of 23
(1,125 Views)