Mcode out of range, greater than 199 error

More
1 year 10 months ago #317407 by Lcvette
Is anyone else getting out of range mcode errors?  Getting these from time to time while tinkering in 5 axis switchkins builds on calls for the higher m codes.

Please Log in to join the conversation.

More
1 year 9 months ago #317924 by pd_2832
Yes, I’ve also been encountering this type of error while adding custom logic in the INI file for my double Z CNC machine. I experienced the "out of range M-code" issue when working with higher M-codes. To resolve it, I attempted remapping the M428 code to T in the configuration file, which seemed to help in certain cases. It might be related to how the M-codes are being interpreted by the machine’s controller, so adjusting the logic or reassigning the codes can sometimes fix the problem. Has anyone else had success with a similar approach or found a better solution?

 

Please Log in to join the conversation.

More
1 year 9 months ago #317926 by spumco
Same here.

I've cooked up a bunch of m-codes for my in-progress lathe and I had to do a remap for any >199.

So 100-199 are 'normal' M-codes in an "MCODES" folder, and 200+ are mNNN.ngc files in a "subroutines" folder.

Please Log in to join the conversation.

More
1 year 9 months ago #318033 by pd_2832
do have work multihead cnc project ? @spumco !!

Please Log in to join the conversation.

More
1 year 9 months ago #318053 by Aciera
This would indicate that the remap has not been setup correctly. Could you guys post your ini files that cause this error please?

Please Log in to join the conversation.

More
1 year 9 months ago #318077 by Lcvette
using the switchkins example ini settings and sub files. my config is an experimental setup in a work in progress branch in probe basic for multi axis simulation. not sure you would want to dissect through that to hunt down the issue, but here is the github link to the branch if you do!

Chris

github.com/kcjengr/probe_basic/tree/simu...figs/probe_basic_asm

Please Log in to join the conversation.

More
1 year 9 months ago #318082 by Aciera
Changed to AxisGUI (as I don't know how to set up Probe_Basic) and commented out the POSTGUI_HALFILE (as I got start up errors about missing hal pins) then tested in current master on a non-rt RIP installation. Seems to work fine for me.

Please Log in to join the conversation.

More
1 year 9 months ago #318088 by Lcvette
i got the errors when trying to test some of the included files from that switchkins test branch

Please Log in to join the conversation.

More
1 year 9 months ago #318093 by spumco

This would indicate that the remap has not been setup correctly. Could you guys post your ini files that cause this error please?
 
Aciera,

The error only occurs when I don't remap m-codes higher than 199.  If you don't remap, then LCNC's standard user m-code range is 100-199, using capital "M" and no file extension.

Using remap and mxxx.ngc permits an essentially unlimited number of m-codes.  I get no errors with my remap:

This works fine for me (combo of user m-codes and remapped mcodes)
Code:
[RS274NGC] PARAMETER_FILE = lathe.var USER_M_PATH = /home/lathe/linuxcnc/configs/LATHE_REV1.70/MCODES/ SUBROUTINE_PATH = /home/lathe/linuxcnc/configs/LATHE_REV1.70/subroutines RS274NGC_STARTUP_CODE = F10 S0 G7 G18 G20 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98 ;ORIENT_OFFSET = #REMAP=G12.1 ngc=g121 #REMAP=G13.1 ngc=g131 REMAP=M200  modalgroup=10   ngc=m200 REMAP=M201  modalgroup=10   ngc=m201 REMAP=M202  modalgroup=10   ngc=m202 REMAP=M203  modalgroup=10   ngc=m203 REMAP=M210  modalgroup=10   ngc=m210 REMAP=M211  modalgroup=10   ngc=m211 REMAP=M212  modalgroup=10   ngc=m212 REMAP=M213  modalgroup=10   ngc=m213 REMAP=M220  modalgroup=10   ngc=m220 REMAP=M221  modalgroup=10   ngc=m221 REMAP=M222  modalgroup=10   ngc=m222 REMAP=M223  modalgroup=10   ngc=m223 REMAP=M268  modalgroup=10   ngc=m268 REMAP=M269  modalgroup=10   ngc=m269

Please Log in to join the conversation.

More
1 year 9 months ago #318094 by Aciera
@Lcvette
Do you get the same errors when running the switchkins sim configs that are included in the standard Linuxcnc installation?

Please Log in to join the conversation.

Time to create page: 0.208 seconds
Powered by Kunena Forum