need help with code for controlling a hydraulic press mode

PaulS:

the best way you can help me is to provide me with the full code

No problem. I'll get right on that, as soon as you send me the press.

i would like 3 steps each so i have attached the pins 2->7 using pullup method.

Attached what to the 6 pins? Why do you need to use 6 pins to read one light and two switches?

next, i have created a small switch that converts the 50V/AC (of the presses indicator light) to 5.6V/DC

A switch can't do that.

and at the end i need to attach a micro switch to attach to the presses switch to the switch that controls whether to use position sensor or pressure sensor).

I read that three times. After the third reading, it still made no sense.

did you check my answer?