05-21-2020 06:05 PM
What are the main advantages for using post scaled DAQmx values with a custom scale vs pre/post processing subVIs that handle prescaled data? Does the Custom Scale offload scaling conversions to the DAQ device? Offer higher bandwidth? Readability?
05-21-2020 06:28 PM
I've done a decent amount with both. Advantages to custom scales are definitely readability and programming simplicity, as well as much more rigid "nonstandard" scales. For example, doing a polynomial curve fit on the incoming data is quite nice if you have a bunch of tests. You can also store those scales and update them outside of your program, so if the cal curve for a given sensor needs changing you can update a stored custom scale without recompiling your program.
The only real disadvantage I've come across is that it's actually something of a pain to get the max/min values correct. For example, one program we use frequently runs a test bench with 4 or 5 different position sensors. Each of these has its own scale factor and range, but they all need the same +/-10V scale on the DAQ. With custom scales, I generally just reverse the scale factor to get +/-10V, which is sort of a pain but isn't too bad.
One other advantage I could see (that I've never actually done) is with the TDMS Streaming functions. With those, you can have your DAQ hardware stream straight to a file on disk as it's acquired. I would guess those functions will stream scaled values to the disk if you use custom scales, which is much nicer than having to either store the scale factor in the file separately or open/scale/save the file after it's created.
Basically, for me it boils down to convenience. If I set up a custom scale in my DAQ configuration, I don't need to worry about it down the line, but having a small "convert to inches" function somewhere else isn't too bad either.