custom macro help (Resolved)

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: custom macro help

Post by martyscncgarage »

antpdrake wrote: Wed Jun 13, 2018 6:55 pm so i change the wizard to "NC" and now diagnostic input 8 light goes green when tripping the switch but Z is not stopping when it trips in the program..

any more ideas?? :idea: :oops:
Can you try this:
M106 /Z P50008 F300 ;Move to Z+ until input 8 CLOSES
M105 /Z P-50008 F50 ;Move to Z- until input 8 OPENS
M26 /Z ;Set Z0

I tested it on my mill for you and it worked for me.

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

Re: custom macro help

Post by Centroid_Tech »

The logic that I have written works as I just tested it. The only difference is that I did not have the # symbol when defining the input after the P designator.
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..
martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: custom macro help

Post by martyscncgarage »

antpdrake wrote: Wed Jun 13, 2018 6:55 pm so i change the wizard to "NC" and now diagnostic input 8 light goes green when tripping the switch but Z is not stopping when it trips in the program..

any more ideas?? :idea: :oops:
My macro example shows and was tested using a normally open switch
You say you are using a normally closed switch. So Centroid_Tech's macro should work for you.

Its important to know which kind of switch you have. If you have a normally closed switch and you have the input setup in the Wizard for NC, then your diagnostic LED for that input should be GREEN not tripped. Then red when tripped.

Do let us know which works for you. You might slow the feed rates way down for testing, and manually trip the switch with a stick or something.
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
antpdrake
Posts: 18
Joined: Sun Oct 15, 2017 10:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B0D5CCFD5C69-0822170084
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No

Re: custom macro help

Post by antpdrake »

ok guys thats working! thanks!

my next issue is :lol: that i have the plasma switch connected to oc4 (spin forward) and the com connection next to it but that circuit seems to be on or closed constantly meaning the plasma is on all the time.. (im talking with no programs running just with machine sitting idle)

is there a way to change this or should i have it connected differently, (on leadshine connections)

cheers
Attachments
report_B0D5CCFD5C69-0822170084_2018-06-16_10-38-02.zip
(160.08 KiB) Downloaded 124 times
martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: custom macro help

Post by martyscncgarage »

Firstly, explain what you did to fix your macro.
Secondly did you look at the diagnostic screen and is output 4 green or red?
Outputs are the second line right under the inputs.

Did you program or leave output 4 to spin fwd in the Wizard?
Are there any other selections in the Wizard output drop down like torch on? (I'm away from home so I can't check)

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
antpdrake
Posts: 18
Joined: Sun Oct 15, 2017 10:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B0D5CCFD5C69-0822170084
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No

Re: custom macro help

Post by antpdrake »

i used your code Marty in my macro and it worked and changed the input to normally open. (it is a NO switch)

so in the wizard output 4 is set to spin fwd, no options for torch on.

output 4 light in diagnostics is red at idle

im using m3 in the code file to turn the torch on

cheers
martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: custom macro help

Post by martyscncgarage »

Thank you for brining closure to this one.
Have to give credit to Scott Pratt for helping me with a similar macro. Glad Mario and I could get you headed in the right direction.
Do post a picture or video of your machine running when you can.
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
antpdrake
Posts: 18
Joined: Sun Oct 15, 2017 10:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B0D5CCFD5C69-0822170084
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No

Re: custom macro help (Resolved)

Post by antpdrake »

yeah no worries will do,

any ideas on the next part making output 4 normally open?
martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: custom macro help (Resolved)

Post by martyscncgarage »

antpdrake wrote: Mon Jun 18, 2018 1:07 am yeah no worries will do,

any ideas on the next part making output 4 normally open?
My mistake, there is no option for torch on in the Wizard. Seems as though M3 (SpinFWD) is correct.

Your question is a little vague. BUT what you might need to do is add NPN relay to that output with dry contacts. Then use the dry contact to control your what you need. It is important to note that the outputs SINK or take the signal to ground. In otherwords, take the 24VDC relay FEED it +24VDC, then the other side of the relay (-) connect to the desired Acorn output.
I like these:
6 Channel 24VDC Relay Board PLC DIN Rail Mounting NPN http://r.ebay.com/wC5iTf
6Ch 24VDC NPN relay.jpg
Here is a video I did on the board.
https://youtu.be/tc8MYGzEFAY
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
antpdrake
Posts: 18
Joined: Sun Oct 15, 2017 10:03 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B0D5CCFD5C69-0822170084
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No

Re: custom macro help (Resolved)

Post by antpdrake »

all good thanks for that!

just put a relay in running off output 4 like you say,
the plasma must be too sensitive or something and there was enough connection there to make it fire up...

thanks for all your help!
Post Reply