ā12-19-2020 01:35 PM
Hello. I want to program a relay using cRIO and i made a manual control but i need a program that, if my input is <0 turn on the button automatically and if the input is >0 turn off the button automatically in order to send my input with possitive and negatives numbers to my power supply.
Solved! Go to Solution.
ā12-19-2020 04:42 PM
If yo show us what you have so far, we might be able to give you some tips.
ā12-19-2020 07:22 PM
@GokuJubilao wrote:
Hello. I want to program a relay using cRIO and i made a manual control but i need a program that, if my input is <0 turn on the button automatically and if the input is >0 turn off the button automatically in order to send my input with possitive and negatives numbers to my power supply.
And what if the input is 0? Assuming 0 should be on, then just use a Less Than Or Equal To Zero. If 0 should be ff, then use Less Than Zero.
ā12-20-2020 03:26 AM
My input is an excel with a measurement and it never will be 0, so I need a program that if the valiu is under 0 run my program with the cRIO digital output in order to activate a relay and if the value is above 0 stop the relay automatically
ā12-21-2020 10:00 AM
hello, I've uploaded two screenshots of my program. I need something that, if the input is less than 0 change the case to True and the relay goes on and if the input is greather than 0 change the case to false and the relay goes off.
āā
ā12-21-2020 10:11 AM
Just do a comparison with 'less than 0' and send the result to the relay. No Case, number to bool array or index array needed!
ā12-21-2020 10:49 AM - edited ā12-21-2020 10:49 AM
In case you missed it, "the results after the add..." is an array. How do you want to check if it is greater or less than zero?
ā12-21-2020 10:57 AM
All the elemens of the array must turn on/off the relay, i don“t know if that is a problem
ā12-21-2020 11:46 AM
@GokuJubilao wrote:
All the elemens of the array must turn on/off the relay, i don“t know if that is a problem
That makes no sense unless you have as many relays as you have elements. If the array only has one element, it should not be an array.
Otherwise you need to decide based the suggestions above, e.g.
ā12-22-2020 02:15 AM
I have to program a power supply but and i want that, if my input is less than 0 the relay reverse the polarity of the current and if is greather than 0 turn off the relay. There is no possibility to do that? Can“t convert my array in numbers one by one?