Stop Button custom PLC tweak?

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Stop Button custom PLC tweak?

Post by Toaster »

I've done a lot of customizing of Acorn, but one thing I've never really dabbled in is messing around with the PLC programming.

Here's what I am trying to solve for:

I have a secondary tool on my machine that is deployed by an air cylinder. Think of something like a self feeding air drill. When tool 99 is called, a relay fires that operates and air solenoid and sends the tool down.

This all works great until I press the stop button, or I go into MDI mode and return to the main screen. By design Acorn cancels all outputs and my tool pops up.

I want the tool to stay down during these situations but only when tool 99 is active.

Is there a way that I can configure the PLC to behave this way?

If so, could someone head me in the right direction? I've done plenty of custom script writing, but I have no experience in PLC editing.
Ken Rychlik
Posts: 346
Joined: Wed Jan 23, 2019 4:19 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 80F5B5B92C3A-0213236854
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Stop Button custom PLC tweak?

Post by Ken Rychlik »

If you have an extra output, you could do a latching circuit/relay when it fires, and send the signal through another relays NC contacts. Fire that relay to cancel the drill.
Ken
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Stop Button custom PLC tweak?

Post by Toaster »

I don't have an extra output unfortunately, they're all used up!
cncsnw
Posts: 3764
Joined: Wed Mar 24, 2010 5:48 pm

Re: Stop Button custom PLC tweak?

Post by cncsnw »

You don't say what pre-defined Acorn output name you are using for this tool; nor did you post a report, so idle speculation is the best I can offer.

Suppose that you were using one of the generic "OUTPUT" definitions such as "OUTPUT1" or "OUTPUT2"; and further suppose that you are turning it on and off with the default, non-specific M61-M68 and M81-M88 codes.

Then, if you look in your PLC program for the associated M code (for example, "M62" for "OUTPUT2"), somewhere around line 5100 you might [find a block of code that looks something like this:

Code: Select all

IF SV_STOP || DoCycleCancel THEN RST M61; OUTPUT1
IF SV_STOP || DoCycleCancel THEN RST M62; OUTPUT2
IF SV_STOP || DoCycleCancel THEN RST M63; OUTPUT3
IF SV_STOP || DoCycleCancel THEN RST M64; OUTPUT4
IF SV_STOP || DoCycleCancel THEN RST M65; OUTPUT5
IF SV_STOP || DoCycleCancel THEN RST M66; OUTPUT6
IF SV_STOP || DoCycleCancel THEN RST M67; OUTPUT7
IF SV_STOP || DoCycleCancel THEN RST M68; OUTPUT8
Each of those lines resets (turns off) one of the generic output requests, when there is a Fault or Emergency Stop condition, or when the cycle cancel button or an equivalent (e.g. the ESC key) is pressed.

If you want your output to stay on indefinitely, until you either run the corresponding M81-M88 code, or turn off the power, then you just need to delete or comment-out the line that resets the M function request you are using, then recompile your PLC program (or let the Wizard recompile it for you).
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Stop Button custom PLC tweak?

Post by Toaster »

I am using the generic outputs right now, and it looks like this would work. Is there way that I can make my own custom output?

And as far as how you can code in here.. Is this just like writing custom scripts?

More specifically could I do something like:

IF SV_STOP || IF #4120 EQ 99 THEN ELSE RST M66 ?
Post Reply