need help with code for controlling a hydraulic press mode

And that is exactly where the problem is and why you are suddenly getting less positive responses.
Your project is not finished at all, it just happens to do what you wanted it to do for now.
It will fail and you have now been warned for that.
In case it fails, what would be the consequences ?
The hydraulic system overloading or worse ?
What about any people near that machine trying to control it ?

You can and should prevent that failure before you can call this project finished.
Would it have been a school project, you would not have achieved anything close to an A grade.