Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Custom Scale Input Problem

$
0
0

Hi,

 

I am having problems creating a linear scale for my Analog Input task. I want to scale up the input by 100x, and am creating a custom linear scale to do so. Here is my code:

 

DAQmxErrChk(DAQmxCreateTask("", &task2));
DAQmxErrChk(DAQmxCreateLinScale("cScale", 100, 0.0, DAQmx_Val_Volts, "pA"));
DAQmxErrChk(DAQmxCreateAIVoltageChan(task2, chan, "",DAQmx_Val_Diff, -1000, 1000,DAQmx_Val_FromCustomScale,"cScale"));
DAQmxErrChk(DAQmxCfgSampClkTiming(task2, "", fSamp, DAQmx_Val_Rising, DAQmx_Val_ContSamps, sampsPerChan));
DAQmxErrChk(DAQmxStartTask(task2));

 

However, this isn't working - it just gives the same regular input. I've played around with numbers and found that as long as the scale factor is less than 10 it works okay, as long as my "min" and "max" values are set to -10 and 10. Anything past that just causes it to be unscaled.

 

Any ideas why this could be happening/how to fix it? Thanks!


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>