M98 unknown m code used

More
16 Dec 2018 17:11 #122484 by pnub93
Hi guys.

I am trying to make a simple program with M98 subprogram call.
When i am trying to load it in "controller" i am getting error:
Unknown m code used: M98

Can linux cnc use M98 M99?

Here is sample of program

Thanks for help

(1001)


#1 = -37.5 (CENTRE OF THE GROOVE)
#2 = -3 (TOOL WIDTH)
#3 = 50.2 (X START POINT)
#4 = 40 (X END POINT)
#5 = 7.5 (WIDTH OF GROOVE /2)
#6 = 0.1 (FEED)



G90 G95 G18
G97 S1000 M3
G54
G53 G0 X0 Z0


G0 X30 Z-30
M98 P2000
G53 X0 Z0



M30
O2000
G1 X#3 F1.0
G1 Z[#1 - #5]
G1 X#4 F#6
G1 Z[#1 + 0.5]
G1 X#3 F1.0
G1 Z[#1 + #5]
G1 X#4 F#6
G1 Z[#1 - 0.5]
G0 X[#3 + 10]
M99

Please Log in or Create an account to join the conversation.

More
16 Dec 2018 18:57 - 16 Dec 2018 19:01 #122488 by Todd Zuercher
M98 (ala Fanuc) is new to Linuxcnc. I have never tried to use it except on a Fanuc control and I'm not sure exactly how it is implemented or if it is in the current 2.7 version or if you must use Master to use it. What version of Linuxcnc are you using? Also variable numbers lower than 30 are not passed to a subprogram (they are not in Fanuc code either. ) you will need to use bigger parameter numbers for passing values to your sub.

The normal Linuxcnc way to make a subprogram is using o-calls like this
#101 = -37.5 (CENTRE OF THE GROOVE)
#102 = -3 (TOOL WIDTH)
#103 = 50.2 (X START POINT)
#104 = 40	(X END POINT)
#105 = 7.5	(WIDTH OF GROOVE /2)
#106 = 0.1	(FEED)

o2000 sub
G1 X#103 F1.0
G1 Z[#101 - #105]
G1 X#4 F#106
G1 Z[#101 + 0.5]
G1 X#103 F1.0
G1 Z[#101 + #105]
G1 X#104 F#106
G1 Z[#101 - 0.5]
G0 X[#103 + 10]
o2000 endsub

G90 G95 G18
G97 S1000 M3
G54
G53 G0 X0 Z0

G0 X30 Z-30
o2000 call
G53 X0 Z0
M30
Last edit: 16 Dec 2018 19:01 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
17 Dec 2018 00:40 #122495 by andypugh
Replied by andypugh on topic M98 unknown m code used
Would it be easier to use LinuxCNC-style format subs (O100 SUB / O100 ENDSUB) or does your CAM produce M98 codes?

Please Log in or Create an account to join the conversation.

More
17 Dec 2018 21:25 #122537 by pnub93
Replied by pnub93 on topic M98 unknown m code used
. I have version 2.7.14
I was trying to use linux cnc like simulator to prove out simple macros.
Well there is better software online for it.

Todd Zuercher
I have fanuc 21i 31i oi-td series at work and all of them will pass 1-30 variables to the subprogram
difference on our machines between 1-30 and 100-199 is that controler will delete data in 1-30 if the machine is powered and save date in 100-199.

Thanks.

Please Log in or Create an account to join the conversation.

More
18 Dec 2018 04:00 #122547 by Todd Zuercher
I thought for sure our oi machines didn't pass those, maybe they only clear them on m2/m30 and I was wrong. I don't use custom macros more than I have to, and one of our Fanuc machines doesn't have the option and we run mostly cam generated code.

For writing and simulating Fanuc macro programs I use NCplot.

Please Log in or Create an account to join the conversation.

Time to create page: 0.681 seconds
Powered by Kunena Forum