From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set hi /- m V limit to Analog input channel using command string

I am acquiring data using AI channels. But i have trouble in setting high and low range as one of my channel has +/- 500 mV range and rest are in +/- 10 volt range which troubling me. So i am using commond string to specify the high low liits but i am not able to figure out how to set the limits in mV. Any suggestions
0 Kudos
Message 1 of 3
(2,950 Views)
Greetings,

What command string are you using? Is it similar to this:

"cmd hi 0.5 low -0.5; 7; cmd hi 10.0 low -10.0; 6:0"

Are you receiving an error, or is the proper gain just not being applied?

Spencer S.
0 Kudos
Message 2 of 3
(2,950 Views)
dear Spenser
I am passing following string
"cmd hi 10.0 low -10.0;0;cmd hi 5.0 low -5.0;1;cmd hi 0.5 low -0.5; 2; cmd hi 10.0 low -10.0; 6:3"
I have one more trouble, In this string i don't want to use any number so iam defining Hi and Low limit for each channel in config.h file and passing that varible in this string so after passing the variable my string looks like
"cmd hi AI_CH0_HI low AI_CH0_LOW ;0;cmd hi AI_CH1_HI low AI_CH1_LOW ;1;cmd hi AI_CH2_HI low AI_CH2_LOW; 2; cmd hi AI_CH_HI low AI_CH_LOW; 6:3"

but when i run the program i get -9001 error so can u tell me where i am doing mistake.
0 Kudos
Message 3 of 3
(2,950 Views)