Arduino with 2 relay with time delay

This tell at least a few things about your machine not very detailed but tells a little bit.
I will try to explain the sequence of steps that your machine is doing.

certain steps might be wrong because you told just a tiny little bit about the process, though I asked for a very detailed description

The software-tecnique of a statemachine mimics a PLC.
state-machine means you are in certain modes of operation:

  1. machine ready to start waiting for button-press to start
  2. applying air-pressure for the piston to go down
  3. waiting for the piston to arrive at lower position
  4. switching on air-cooling
  5. holding piston down with air-cooling on for a certain time
    if pressuring-time is over
  6. switch off air-cooling, switch off air-pressure to piston

In parallel to this read in the position of two potentiometers to adjust time and temperature.

A state-machine allows to avoid using delay() which does what its name says: delaying. The function delay() delays everything. Even the reaction on a button-press.

A state-machine in combination with non-blocking timing keeps your control responsive all the time. Even in the situation of keeping a certain mode like "hold pressure"

Curious to learn about how this works?

Here is a tutorial about non-blocking timing
Example-code for timing based on millis() easier to understand through the use of example-numbers / avoiding delay()

and here is a tutorial about how state-machines work

best regards Stefan