Repetitive work

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
carlos2186
Posts: 12
Joined: Thu Aug 06, 2020 11:33 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: Acorn-2631
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Repetitive work

Post by carlos2186 »

Hi all, got a question. I've been doing some repetitive work on my CNC. I've been doing some repetitive gcode. So I want to make a gcode loop x amount of times with a stop at the beginning of the code so I can change my piece... I've reading and I found that the M02 can work for me but the issue that I have with that is that the post processor form vectric generates the code as follow... Machine got to part zero, machine goes to home, the run the m6 macro asking me if I want to set up z height or wanted to keep the same... Is there any way I can tell the g code to run at specific line number when looping?.
tblough
Posts: 3072
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Repetitive work

Post by tblough »

Look at IF THEN ELSE and GOTO in the CNC12 operator's manual.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Sword
Posts: 652
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Thorp WI

Re: Repetitive work

Post by Sword »

I use an external cycle start button (can just use the on screen or MPG one as well) and my Vectric post places the following code in the file...

N100 ; This is where I want to restart the loop at.

Body of code next...
XYZ location for waiting until cycle start when body of code is finished...

M200 "Press Cycle Start to continue\nCycle Cancel to quit"
GOTO 100

I have the M200 and GOTO automatically commented out and just enable them when I have need for a looping file. If you want to edit your .pp, let me know if you want the needed .pp bits.
Scott
carlos2186
Posts: 12
Joined: Thu Aug 06, 2020 11:33 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: Acorn-2631
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Repetitive work

Post by carlos2186 »

Sword wrote: Wed Apr 14, 2021 4:26 pm I use an external cycle start button (can just use the on screen or MPG one as well) and my Vectric post places the following code in the file...

N100 ; This is where I want to restart the loop at.

Body of code next...
XYZ location for waiting until cycle start when body of code is finished...

M200 "Press Cycle Start to continue\nCycle Cancel to quit"
GOTO 100

I have the M200 and GOTO automatically commented out and just enable them when I have need for a looping file. If you want to edit your .pp, let me know if you want the needed .pp bits.
That would be great if you can help me with my pp since I'm kind of lost in that area
Sword
Posts: 652
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Thorp WI

Re: Repetitive work

Post by Sword »

What post are you currently using in Vcarve/Aspire? You can open it in an editor and place these lines in the proper places and then test the output to see if it's where you intend for it to be (again, by reading the resulting code in an editor). Otherwise, I can add it to a generic pp file and you can try it. You could name it as a loop or repeater so you can choose it from the list of posts when needed. You can designate the park location when you set up your file or you could use one of the G28 locations and call that from the postp as well. I just remove the ; when I want it and I generally edit the file for a preferred park or back off location.

This N100 might already be in the standard post, but that's all you need at the top.

Code: Select all

" ;Begin Feed
""
"N100"
Place the M200 etc. at the end of the feed moves, just after the begin footer line that is likely already there. If setting it up as a specific post for repeating, leave out the ;

Code: Select all

begin FOOTER

""
" ;M200 [34]Press Cycle Start to continue\nCycle Cancel to quit[34]"
" ;GOTO 100"
Again, if you are using the standard unedited post, I could edit one and attach it. My post is highly modified for my purposes and it wouldn't be a good idea for you to test run it with your machine.
Scott
Post Reply