Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Example for function DAQmx_CreateTableScale()

My request is an example of DAQmx_CreateTableScale() function in order to do a custom adjust to the analog input values.
thanks to all.
0 Kudos
Message 1 of 2
(2,470 Views)
Hi,
the function serves the same purpose as creating a custom scale from Measurement & Automation Explorer that maps ranges of prescaled values (volts from channels) to scaled values (desired units).

The following was extracted from the Online DAQmx C Reference Help found on your system after you have installed NI DAQmx.

DAQmxCreateTableScale
int32 DAQmxCreateTableScale (const char name[], float64 prescaledVals[], uInt32 numPrescaledValsIn, float64 scaledVals[], uInt32 numScaledValsIn, int32 preScaledUnits, const char scaledUnits[]);

Purpose
Creates and configures a scale that maps an array of prescaled values to an array of corresponding scaled values. NI-DAQmx applies linear interpolation to values that fall between the values in the table. Read operations clip scaled samples that are outside the maximum and minimum scaled values found in the table. Write operations generate errors for samples that are outside the minimum and maximum scaled values found in the table.

AlessioD
0 Kudos
Message 2 of 2
(2,452 Views)