(but still dropping it on E-stop / SV_STOP)
Posting this in case it helps someone else (with some AI re-writes)
The goal
On my EX controller I have a general-purpose output driven by a toggle macro on a screen button (Avid relay module or directly using OUTPUT3 and/or OUTPUT4) — it switches a shop accessory (in my case an AirWeights vacuum pump). Out of the box, CNC12’s stock PLC turns these general-purpose outputs **off** any time a program is stopped or cancelled. So every time I hit Stop mid-job, the accessory shuts off, which I don’t want.
What I wanted: keep the output on when I stop a job the normal way, but still have it shut off on a genuine fault or E-stop.
Where the behavior lives
OUTPUT3/M63 is used here: this matches relay1 if you use the avid relay board. OUTPUT4/M64 would be relay 2
In the Acorn PLC source there’s a block that resets the OUTPUT1–8 requests (M61–M68). The line for my output (OUTPUT3 / M63) reads:
IF SV_STOP || DoCycleCancel THEN RST M63 ; OUTPUT3
That fires the reset on either condition, and the two are very different in severity:
-
**DoCycleCancel**— a normal, operator-initiated job stop: the on-screen Stop/Cancel button, keyboard, jog-panel Reset/Cancel key, or a recoverable program error. Machine is still healthy and enabled. -
**SV_STOP**— a fault / emergency-class event: E-stop pressed, drive fault, door interlock in stop mode, software not ready. It also drops the master enable (kills the drives). This is the serious one.
The change
I removed only the DoCycleCancel half, so the output survives a normal cycle stop but still drops on a real fault/E-stop:
IF SV_STOP THEN RST M63 ; OUTPUT3
Then compile the source to mpu.plc (mpucomp), power-cycle the control, and on startup CNC12 detects the changed PLC, loads it to the board, and shows the “PLC program changed” warning. Do the same for whichever output number you’re using (M61–M68 / OUTPUT1–8).
Caveats — please read before copying this
-
Non-safety outputs ONLY. Do this only for an output that switches a benign accessory (dust collector, shop vac, work light, air blast, etc.). Never remove the stop-reset from anything where “stays energized after you stop the job” could be a hazard. That’s exactly why I kept
SV_STOPin the condition — an E-stop or fault still kills the output. -
Be comfortable with the PLC and CNC12 internals. If PLC ladder logic, compiling with mpucomp, and the Wizard I/O map aren’t already familiar to you, this is not a great first modification — a mistake in the PLC can make the machine behave in ways you don’t expect.
-
Back up first. Save copies of your working
mpu.plcand the.srcbefore touching anything, so you can revert instantly. Ideally use Avid profile manager to keep good backups. -
The Wizard can overwrite it. The Acorn PLC source is Wizard-generated; if you re-run the Wizard or rebuild the config it may regenerate the file and wipe this edit. Keep your edited copy, and consider loading it as a custom PLC so the Wizard leaves it alone.
-
Test it. After loading, verify the output still drops on E-stop / fault the way you expect, before trusting it in real work.