Subprogram error <answered, resolved>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

cncshaker100
Posts: 13
Joined: Thu Mar 10, 2022 8:40 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Subprogram error <answered, resolved>

Post by cncshaker100 »

I'm trying to run a program that calls for a subprogram. I've read all about how centroid work with subprograms, and I believe I wrote the g code line correctly, but I keep getting a "511 missing parameters" error on that line of code. The line of code is written M98 PO9100. The O9100 part of the code is highlighted with the 511 missing parameters error. What am I missing here?
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: Subprogram error

Post by tblough »

Did you include the number of times to repeat? Required even if only one time.
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.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Subprogram error

Post by cncsnw »

Code: Select all

M98 P9100
Repeat count is optional. Default is once.
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: Subprogram error

Post by tblough »

Interesting on the repeat. The manual shows the examples with L1 and does not state that it is optional.
Good catch on the "O". It is required in the Windows filename for the subroutine, but not used in the G-code. I did not notice earlier that the OP had it in the P parameter on his code.
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.
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Subprogram error

Post by cnckeith »

if repeat is not wished for, you can put the subprogram name in quotes like this.

M98 "mysubprogram.nc"
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncshaker100
Posts: 13
Joined: Thu Mar 10, 2022 8:40 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Subprogram error

Post by cncshaker100 »

cnckeith wrote: Tue Nov 29, 2022 3:23 pm if repeat is not wished for, you can put the subprogram name in quotes like this.

M98 "mysubprogram.nc"
Are you saying it should be written:

M98 "O9100.nc"
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Subprogram error

Post by cnckeith »

cncshaker100 wrote: Tue Nov 29, 2022 5:50 pm
cnckeith wrote: Tue Nov 29, 2022 3:23 pm if repeat is not wished for, you can put the subprogram name in quotes like this.

M98 "mysubprogram.nc"
Are you saying it should be written:

M98 "O9100.nc"
yep you can do that, any g code program can be called as a subprogram with M98 just by putting the name in quotes, and make sure it lives in cncm\ncfiles and it can be any extension.. .nc, .cnc, .txt etc... you don't have to use the O9100 stuff if you don't want to. (throwback to fanuc standards) i like to call my subs by human recognizable names.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Subprogram error

Post by cnckeith »

on big projects i'll break down my g code into major sections, proof it, tweak it the way i want and then use M98 as a easy way to "join" all the parts into one big happy job file.

a "Master" G code program would look like this.

M98 "face_off_part.cnc"
M98 "rough_out_part.cnc"
M98 "finish_cut_part.cnc"

etc.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncshaker100
Posts: 13
Joined: Thu Mar 10, 2022 8:40 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Subprogram error

Post by cncshaker100 »

First of all, I’d like to thank everyone who replied to this post to help me resolve this issue. I took CNCkeiths advice and ditched the numbers format to call up a subprogram and wrote down the action (like CNCkeiths example). After editing the main program several times to call up the subprogram, what I found out is that after the M98 command everything else following that is not only case-sensitive (lowercase only) but also character sensitive. I kept getting a 501 error (invalid character) because I was writing the code, M98 ”.250centerdrill.nc” it did not like the extra decimal point in front of.250 So here is the actual code that work for me. M98 “250centerdrill.nc” which calls for a ¼ center drill tool path subprogram, also the name of the subprogram file was 250centerdrill. Again I say thanks to all especially CNCkeith. Also is there an updated version of CNC12 4.80 operators manual because the one that I have is CNC12 4.14 for the M400 and M39 controller? Maybe something changed in the way the software works that would have explained how to better call up subprograms in a updated operators manual. Again I say thanks to all.
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: Subprogram error

Post by tblough »

The latest manual, V4.20, was installed at the same time as CNC12. From the main screen press F5 CAM/F4 MANUAL. You can also find it in the \cncm\manual folder, as well as on the sticky "All Acorn Documentation Here" in the Acorn forum here.
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.
Post Reply