Help for create macro

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Viani86
Posts: 5
Joined: Sun Oct 14, 2018 5:52 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

Help for create macro

Post by Viani86 »

Hello friends, I am new here in the forum ... I bought an acorn and I am in need of a help to create two macros (aux 1).

Aux 1
1st macro to use in Pneumatic Chuck.
I was wanting to use one (Input1) for a normal open button1 (pulse).

On the first pulse, the output 1 opens the card, waits 3 seconds, and turns off the output 1. (M14)

On the second pulse, the output 2 closes the board, waits 3 seconds, and turns off output 2. (M16)


Aux 4
2nd macro to use a pneumatic Tailstock.

I was wanting to use one (input2) for a normal open button2 (pulse). (M32)


On the first pulse, turn on output 3, advance the tailstock ... After advancing, I need an input3 to confirm that tailstock is advanced.
On the second pulse, it turns off this output 3. (This returns the tailstock to the rest position). (M33)


If anyone can give me a hint ...

Thank you very much in advance...
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

Re: Help for create macro

Post by Centroid_Tech »

You can't have 1 AUX button controlling 2 completely different macros. Since there already custom macros that can turn outputs 1 thru 8 off, I would recommend using AUX1 to control output 1 and AUX2 to control output 2. Your custom M14 macro, mfunc14.mac will have the following logic,

M61 ; Macro used to turn output 1 on
G4 P3 ; Wait for 3 seconds
M81 ; Macro used to turn output 1 off

Your M16 macro will have the similar logic but associated with output 2.

M62 ; Macro used to turn output 2 on
G4 P3 ; Wait for 3 seconds
M82 ; Macro used to turn output 2 off

In the Wizard, you will assign outputs 1 and 2 to OUTPUT1 and OUTPUT2 respectively. In the CNC12 software, you will need to set parameter 188 to 1411 and parameter 189 to 1611 which tells the control that when you press the AUX1 button, it will do the M14 macro and when you press the AUX2 button, it will do the M16 macro.

As far as the pneumatic tailstock is concerned, it will be a lot easier to implement if you assigned an AUX button to turn it on and another to turn it off. Let's say AUX4 is used to turn it on and AUX5 is used to turn it off. Then you can create the custom M32 and M33 macros similar to the logic mentioned above. Your custom M32 would have the following logic.

M63 ; Macro used to turn output 3 on
M100 /3 or M101 /3 ; Wait until input 3 opens or closes respectively

Your custom M33 would have the following logic

M83 ; Macro used to turn output 3 off

You will need to assign output 3 to OUTPUT3 in the Wizard and you will also have to correctly set parameters 191 and 192 respectively. If you can't use 2 individual AUX buttons, it can be done but it's more complex and now the PLC program will have to be modified. The method mentioned above will always work even if you update the CNC12 software in the future. If you customize the PLC program, you will no longer be able to use the Wizard for anything afterwards as the moment you do, the Wizard will overwrite any changes that you make in your custom PLC program.
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
Post Reply