The following is my research, on my normal or original press machine:
There are 5 relays to activate the valve
Relay 1 = valve for fast descent Axis Y1 (not valve proportional)
Relay 2 = valve for fast descent Axis Y2 (not valve proportional)
Relay 3 = valve for slow down (not a proportional valve)
Relay 4 = valve for pressure (type valve proportional)
Relay 5 = valve for crowning (maybe temporarily not used according to your suggestion)
While the proportional valves for direction (Y1 and Y2), which are controlled by CNC, do not use Relays.
when in auto mode only one pedal is used, when I step on the right pedal (there are 2 pedals, left = cancel / up. and right = down) Relays 1 and 2 turn on and amplifier input Y1 and Y2 = -5 volts, amplifier input Pressure = +1.9 volts so that the ram drops quickly.
then Relays 1 and 2 turn off, change Relays 3 and 4 turn on at the same time, and the amplifier input Y1 and Y2 = -5 volts, the amplifier input Pressure = 3.4 volts so that the ram drops slowly. interval how many mm approaching the target Relay 5 is also on.
After reaching the target and bending and dwelling for 2 seconds, Relays 3 and 5 turn off, only Relay 4 turns on and the Y1 and Y2 amplifier inputs change to +5 volts, the amplifier input Pressure = 5 volts so that the ram rises quickly to the starting position.
my question is how to make a c program according to the description above?