compressor — count_cycles (plc-tap)
Physics
Section titled “Physics”A reciprocating or rotary-screw compressor with load/unload (or start/stop) capacity control already drives a relay contact — a load solenoid’s auxiliary contact or the starter contactor’s own auxiliary block — that closes once per load event, used today to drive a local run-light or hour-meter. This recipe passively taps that existing contact through an isolation relay or opto-isolated digital input; the edge box only ever reads a signal the compressor’s control already produces, and no Modbus/OPC write function code is ever issued (INV-4). The tapped contact closes for the duration of each load cycle and opens on unload, so the signal is a clean digital state rather than a narrow pulse. Compressor load/unload cycling is slow relative to any mechanical process inside the machine: a lightly-loaded reciprocating compressor can cycle as often as once every 20-30 s (roughly 0.03-0.05 Hz) under light, intermittent demand; sampling the digital input at 50 Hz gives >1000x margin over Nyquist for that rate while resolving contact bounce within a single transition.
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) 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 compressor’s control panel, coil driven in parallel off the existing load solenoid auxiliary contact or starter contactor auxiliary block terminals; route the isolation relay’s isolated normally-open contact out to the edge box’s digital input. Never splice a new wire into the PLC’s or the starter’s own output terminal; tap only an already-present auxiliary contact.
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 cable run separate from the compressor’s motor power and starter wiring to avoid induced noise and to keep the low-voltage tap physically isolated from line-voltage conductors.
Validation
Section titled “Validation”observe and manually count 20 load/unload transitions over a normal demand period and compare the detector’s counter delta over the same window
Expected: counted load cycles exactly equal to the manual count (the tapped contact is the compressor’s own load-control event, so there is no demand-dependent slip)
Safety notes
Section titled “Safety notes”- de-energize and lock out the compressor control panel (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 into the compressor’s starter or control circuit
- be aware the compressor can auto-start on demand at any time even while the panel is open for wiring; confirm LOTO covers the starter circuit, not just the local disconnect
25–90 USD, difficulty 3/5, ~40 min install downtime.