press_hydraulic — count_cycles (plc-tap)
Physics
Section titled “Physics”A hydraulic press’s controller already knows when a stroke completes: it drives a “stroke complete” output relay or increments an internal counter register each time the ram reaches bottom of stroke and returns, used today to drive a stack light or a shift counter display. This recipe never writes to that PLC; it passively taps the existing output relay’s dry contact (or an existing isolated counter-register read via an OPC UA/Modbus read-only session) through an isolation relay or opto-isolated digital input, so the edge box only ever reads a signal the press already produces (INV-4: no write function code is ever issued). The dry contact closes once per completed stroke and stays closed for the controller’s programmed dwell (tens to hundreds of ms), so the debounce window must exceed any contact chatter but stay well under the fastest cycle time. Hydraulic presses cycle far slower than mechanical presses because of pump fill and decompression dwell, topping out near 20 strokes/min (0.33 Hz) on a fast blanking press; sampling the digital input at 200 Hz gives >300x margin over Nyquist for that rate while easily resolving contact bounce inside a single relay closure.
Sensor
Section titled “Sensor”- Spec: dry-contact relay tap / isolated digital input, read-only
- Signal: counter ({count}), range n/a
Example parts
Section titled “Example parts”- Allen-Bradley/Rockwell 700-HA33Z1 isolation relay (3PDT, ice-cube, DIN-rail) used to buffer the tap
- Omron G2RV-SR700 slim relay socket module for isolating the tapped contact
- ifm electronic DI0005 opto-isolated digital input module for the edge box’s I/O channel
Mounting
Section titled “Mounting”Install the isolation relay inside (or adjacent to) the press control cabinet, coil driven in parallel off the existing stroke-complete output relay’s terminals (never spliced into the PLC’s output card itself); route the isolation relay’s isolated normally-open contact out to the edge box’s digital input. If reading a counter register instead, configure the OPC UA/Modbus client for a read-only session against that existing register address; never issue a write to any coil or register.
Wiring
Section titled “Wiring”24 VDC loop through the isolation relay’s dry contact to a digital input / counter channel on the edge box’s I/O module; keep the tap wiring physically separate from the press’s output card wiring run to avoid back-feeding any voltage into the PLC’s output terminal.
Validation
Section titled “Validation”run the press for 30 manually-counted strokes at normal production speed and compare the detector’s counter delta over the same window
Expected: counted strokes exactly equal to the manual count (the tapped signal is the press’s own stroke-complete event, so there is no load-dependent slip)
Safety notes
Section titled “Safety notes”- de-energize and lock out the press control cabinet (LOTO) before opening it to wire the isolation relay, even though the tap itself only reads an existing signal
- use an isolation relay (never a direct splice) so a wiring fault on the edge-box side can never back-feed voltage or a load into the press’s output card
- confirm the isolation relay’s coil voltage matches the press’s output relay rating before wiring; mismatched coil voltage can hold the tapped contact closed or cause it to chatter, corrupting the count
25–90 USD, difficulty 3/5, ~40 min install downtime.