geniusintraining
Lifetime Supporting Member + Moderator
Good evening everyone (or good morning)
I am writing a program that has a analog input, I have scaled it to my 0-10v and its working great.... ((for that))
Now I THINK I need to invert the data, as I need to control the PREset of a timer with it, the value of the timer needs to be 25 for a fast speed and 100 for the slow speed, I have made another scale, that scales the input to 0-100 and I can move a 25 into the integer if the value drops below 25.... so now I have 25-100 when I turn the pot.... but with the pot turned down (to the left) and the meter at 0 the scaled value is 100, when I turn the pot to the right and the meter goes up to 10Vdc the scaled value goes to 0
And re-wiring the input is not a option (-+ +-)
SO.... I think, I need to invert the data and I will be done, but I have not found any way to invert the integer
This is a MicroLogix 1000 1761-L20BWA-5A
Many thanks
I am writing a program that has a analog input, I have scaled it to my 0-10v and its working great.... ((for that))
Now I THINK I need to invert the data, as I need to control the PREset of a timer with it, the value of the timer needs to be 25 for a fast speed and 100 for the slow speed, I have made another scale, that scales the input to 0-100 and I can move a 25 into the integer if the value drops below 25.... so now I have 25-100 when I turn the pot.... but with the pot turned down (to the left) and the meter at 0 the scaled value is 100, when I turn the pot to the right and the meter goes up to 10Vdc the scaled value goes to 0
And re-wiring the input is not a option (-+ +-)
SO.... I think, I need to invert the data and I will be done, but I have not found any way to invert the integer
This is a MicroLogix 1000 1761-L20BWA-5A
Many thanks