Thank you to everyone for your input. After some time mulling this over and Learning, I’ve realized exactly what this, why and how to do it. This is indeed a PID loop. It is PID and not “P” because you do not want to overshoot as you approach the position desired.
Feedback is provided by a position indicator, no different than a thermocouple reporting temperature. The difference is accelerating mass of a piston, rod and fluid in a hydraulic system. Unless your controller can compensate you will overshoot resulting in hunting. That’s what a PID loop does, it dampens the overshoot. Here are the specs.
For the input (feedback of position), 4-20ma, 0-5v, 0-10v, potentiometer etc. It can be any of these and you must condition the input signal.
Particle Xenon, Boron, Photon, etc. Software for PID control. The loop can use proportional valves to throttle flow of hydraulic fluid OR simple on/off valves and pulse them as you approach your desired position to slow the approach and eliminate overshoot. Fidelity is important here because you want position control of the piston/hydraulic cylinder.
Input for desired position can come from a very large number of input sources. 4-20ma, potentiometer, 0-5v, 0-10v, pwm, digital, over specialized protocols like HART, MODBUS, CANBUS, ETC. A signal conditioner can convert input signals but adds cost/complexity/calibration.
It would be nice to have proportional control to travel fast, slow down and then as you approach your final position slow way down and settle exactly where you want. With on/off valves you would pulse them faster as you get close until they are more closed than open % of time-wise.
This would enable you to open or close a gate at home, automate things, etc.
The standard PID loop code is easy but how do I add loops for pulsing solenoids (relays) and throttling proportional valves into the loop?
Is anyone aware of simple signal conditioning boards that can do lots of protocols? Easy to make one?
This is a more complex project, I realize but any direction, code, advice would be helpful.