02-06-2023 06:52 AM
I am developing DAQ using. NET (C #). I want to read the voltage data of DAQ device, get the result through linear conversion, and then store it into Tdms file (note: store it after linear conversion).
I saw the official case, but did not provide the case related to Linear Conversion. I learned that there is a string parameter CustomScaleName in myTask. AIChannels. CreateVoltageChannel(), but I cannot understand how to define linear conversion and use this linear conversion.
Who can provide relevant cases.
Solved! Go to Solution.
02-06-2023 07:42 AM
See if this article helps - https://www.ni.com/en-us/support/documentation/supplemental/18/ni-daqmx-custom-scales-and-usage-expl...
02-06-2023 08:17 AM
Although they are written for LabVIEW:
Create an NI-DAQ™mx Custom Scale Programmatically in LabVIEW
Create Multiple Scales for One Task Using LabVIEW with DAQmx
In C#, you could possibly do:
// Create a linear scale
myScale = new LinearScale(name="myScale", slope=10, yIntercept=5);
// Create a new task
myTask = new Task();
// Create a virtual channel
nameToAssignChannel="", terminalConfiguration=-1, minimumValue=-10, maximumValue=10, customScaleName="myScale");