Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

getting scales range into LabWindows/CVI program

I create a scale with "Measurement and Automation" with I want to use in my LabWindows/CVI program when creating an analog input channel as in following code : DAQmxErrChk(DAQmxCreateTask("MIO-FeedBack",&DaqmxTasks.MIO[0])); // input channel (feedback) sprintf(msg,"Dev%d/ai%d",Internal.MIO_ID,Options.AOM_FeedChan_MIO); DAQmxErrChk(DAQmxCreateAIVoltageChan (DaqmxTasks.MIO[0], msg, "MIO-FeedBack",DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_FromCustomScale,&(Options.AOM_FeedScale[0]) ) ); DAQmxErrChk(DAQmxStartTask(DaqmxTasks.MIO[0])); My problem is that I put max=10 & min=-10 in DAQmxCreateAIVoltageChan, and the created scales range are different and error -200077 is generated (see included GIF). Does anybody know how to overcame this error. Thanks, Galia
0 Kudos
Message 1 of 2
(3,316 Views)

What kind of scale are you trying to use, and with what card are you using?


From your error it looks like some where it is set that your max output voltage is 5V which obviously conflicts with the task you are trying to setup. So you will want to track down where that is being set. Here are a couple of KBs that you may also find useful:


How do I Configure Custom Scales for Analog Outputs in MAX

DAQmx Custom Scale Type Map Ranges Do Not Display Correct Value

Take a look at those, and see if they offer any help.

-GDE

0 Kudos
Message 2 of 2
(3,301 Views)