Page 2 of 3

Re: Output1 with spindle on

Posted: Mon Oct 26, 2020 2:24 pm
by martyscncgarage
Martin Zarnay wrote: Mon Oct 26, 2020 12:41 pm I have a Acorn board with 8 outputs, before I had board where relays 1with8 was paired and 2wit7 . now I have new one and there are all relays controlled separately.
( I still have some relays free )
yes I know what you mean but I don't have another relay with multiple connectors... :(
could it be done with som macro or something? also I don't really know how to write macro very well...
i was also thinking to modify postprocessor so when it see M3 it will write M15 same time and M5-M16
but could not find relevant line in postprocessor
Not sure what to tell you. Either use an output for coolant and an output for spindle on or buy a 3 pole relay and control it with the relay on the board.
Marc suggests modifying the PLC which could be done, but the Wizard would overwrite it if you used it again.

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 6:56 am
by Martin Zarnay
Hi thank you I did write it to the MPU.plc but with no luck. It did not work.
i guess I will have to do it with the second relay

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 1:14 pm
by cncsnw
Editing the MPU.PLC file is not how you change the PLC program.

You locate the PLC program source file, which is probably named something like "acorn_mill_plc.src"; edit that, or a copy of it; then compile the edited file with MPUCOMP to make a new MPU.PLC file.

The text in the first half of MPU.PLC that looks like PLC program source is just for reference. The working part of MPU.PLC is the hex codes in the second half of the file, created by the MPUCOMP compiler.

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 3:00 pm
by tblough

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 3:54 pm
by Allin1Chris
Hi Martin Zarney,

I think some of these guys may be making this much more complicated than needed. The ACORN plc since 4.50 has a lot of potential customization with generalized Outputs. The OUTPUTS1-8 that you can select in the wizard and M94M95111-126 provide you with a lot of outputs that can be toggled via a simple M94/M95 command or in the case for the Outputs1-8, M61-M68 and M81-M88.

As suggested before, if you just need to activate Output1 to turn your spindle on and Output 2 for your Air. I Suggest assigning your outputs to be SpinFWD for Output 1 and Keep Output 2 assigned as "OUTPUT2" in the Wizard. After doing this you simply need to edit your M3 macro and make a Custom M5 macro. This will most likely be easier than trying to create your own plc logic and compiling (however can be done this way as well).

Now, All you would need to do is Add M62 to your M3 command and add M82 to your M5 command. M62 will turn on your second output with M3 while M82 will turn it off with M5. Alternativly you could instead use the M94/M95 command with number /62 in the macros.

Just to prevent this from getting too long, i have two modified M3 and M5 macros attached with added M62 and M82 to turn the assigned "OUTPUT2" On and Off with your M3/M5 that you can use as an example to make your own modifications in the future. These should be working macros that you can drop into your cncm/cnct directory and as long as the outputs are assigned as mentioned above should work for you.

If you want to get into learning how to modify your own macros i suggest checking out the following documentation that can also be found on the Acorn Documentation Forum Post and on the Centroid Website.
Acorn Documentation: viewtopic.php?f=60&t=3397
Introduction to Macro Programming: https://www.centroidcnc.com/centroid_di ... amming.pdf
Centroid CNC PLC Manual: https://www.centroidcnc.com/centroid_di ... manual.pdf
And check out the video link for a series on PLC as well in my signature.

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 4:03 pm
by cnckeith
thanks Chris,

Be sure and read the Centroid Macro Programming manual lots of good easy customization tips in there!

https://www.centroidcnc.com/centroid_di ... amming.pdf

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 4:07 pm
by cnckeith
Interesting to note as well in upcoming release, if you don't actually have a Spindle Fan, they can also use the preprogrammed Spindle Fan Output as that comes on anytime the spindle is on to control anything else you want to come on with the spindle. and you wouldn't have to even edit a macro.

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 4:09 pm
by cncsnw
Be aware that if you rely on a custom M5 macro to turn the air purge off when you turn the spindle off, then the air purge will continue to run if you cancel the job while the spindle is running (because in that case it will not get as far as running your custom M5).

Also, the air purge will not run automatically if you start the spindle in manual spindle mode, rather than auto spindle mode.

As long as you are aware of those limitations, then the macro solution is certainly simpler.

Re: Output1 with spindle on

Posted: Tue Oct 27, 2020 4:20 pm
by cnckeith
and for those text challenged here is a video showing you how..


Re: Output1 with spindle on

Posted: Fri Oct 30, 2020 3:19 pm
by GBCues
Martin Zarnay wrote: Mon Oct 26, 2020 12:41 pm I have a Acorn board with 8 outputs, before I had board where relays 1with8 was paired and 2wit7 . now I have new one and there are all relays controlled separately.
( I still have some relays free )
yes I know what you mean but I don't have another relay with multiple connectors... :(
could it be done with som macro or something? also I don't really know how to write macro very well...
i was also thinking to modify postprocessor so when it see M3 it will write M15 same time and M5-M16
but could not find relevant line in postprocessor
Martin,
How much trouble would it be to swap Acorn boards?
Just an idea.
Gary