I am using a cRio with analog in, analog out and digital out to control the extension and retraction of a motor to test and validate forces, stroke of a hydraulic cylinder.
I want to send the motor all the way back to an almost fully retracted state if the load cell measures that the motor is exerting over 220 lb. I am using a case structure to handle the different cases (ie Fully Extended button is pressed, motor exceeds 220 lb , etc)
The program works well other than not having a good way to send the motor back to a retracted state. The current VI will retract only until it drops below 220 lb, then goes back into extension, then again triggers the retract case since its above 220 again, back and forth.
Basically I need the motor to retract no matter what if the motor exceeds 220 lbs until the motor distance sensor reaches a certain value.
I hope I explained this well enough.
I know the code is messy.
Note i am using a test cylinder with a 10lb max compression here.