From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using WFM_Scale gives badRangeError

   I am trying to convert floating point values into binary values by using the function call to WFM_Scale. When I do a status check the error returned is

-10012 badRangeError The analog input or analog output voltage or current range is invalid for the specified channel, or you are writing an invalid voltage or current to the analog output.

The calling function is as follows

status = WFM_Scale(DEVICE, 0, lNumPoints, 1, thdc_channel, ao_ch);

where DEVICE = 1
lNumPoints = 2048
thdc_channel is a pointer to an array of doubles of length lNumPoints
and ao_ch is a pointer to an array of shorts of length lNumPoints

I have changed the chan value from 0 to 1 and it still gives me an error -10012

Can anyo
ne provide an explanation of what maybe wrong??
Please Help!!
0 Kudos
Message 1 of 2
(2,227 Views)
Hello,

Please check your configuration to see if it Bipolar or Unipolar. And then see to ensure what type of values you are writing. Ensure that they are not beyond the max values and also check the sign.

Plese do let me know if it helps.

Sincerely,
Sastry V.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,227 Views)