- Posts: 52
- Thank you received: 0
Difference between USER_M_PATH and nc_files path
What is the difference in the use of a path in USER_M_PATH than the nc_files standard path?
In both I can specify user defined functions (M100-M199), is it right? Or these directories are used to do different things?
Nicola.
Please Log in to join the conversation.
Please Log in to join the conversation.
for executable files with names like M1xx.
Ref: linuxcnc.org/docs/2.7/html/config/ini-config.html
The 'nc_files' mentioned is a bit confusing.
The search list begins at [DISPLAY]PROGRAM_PREFIX which is conventionally set
to the directory ~/linuxcnc/nc_files by programs like pncconf and stepconf or
when a configuration is copied to a user directory using the config picker.
These programs typically create this directory if it does not exist.
The seldom-used 'default location: nc_files' specifies a subdirectory named
'nc_files' in the configuration directory that contains ini file. This
subdirectory must exist to be usable in the path search.
Please Log in to join the conversation.
So you think is best to use USER_M_PATH for custom commands?
Nicola.
Please Log in to join the conversation.
dgarrett wrote: Note that USER_M_PATH specifies a _list_ of directories that are searched
for executable files with names like M1xx.
Ok this is clear.
dgarrett wrote: The 'nc_files' mentioned is a bit confusing.
The search list begins at [DISPLAY]PROGRAM_PREFIX which is conventionally set
to the directory ~/linuxcnc/nc_files by programs like pncconf and stepconf or
when a configuration is copied to a user directory using the config picker.
These programs typically create this directory if it does not exist.
The seldom-used 'default location: nc_files' specifies a subdirectory named
'nc_files' in the configuration directory that contains ini file. This
subdirectory must exist to be usable in the path search.
This is for me more confused than before. :blink:
The ini file is under ~/linuxcnc/configs not under ~/linuxcnc/nc_files. I do not understand.
Nicola.
Please Log in to join the conversation.
nicokid wrote: This is for me more confused than before. :blink:
The ini file is under ~/linuxcnc/configs not under ~/linuxcnc/nc_files. I do not understand.
What Dewey is saying (as I read it) is that there is a default location that is searched second:
~/linuxcnc/configs/my_config/nc_files
This is where you can put config-specific M-files, if you wish to.
Please Log in to join the conversation.
andypugh wrote: ~/linuxcnc/configs/my_config/nc_files
This is where you can put config-specific M-files, if you wish to.
Uhmm... indeed my own USER_M_PATH path points to ~/linuxcnc/configs/stepcraft-840/mcode.
So if I change the name of directory mcode in nc_files I can avoid setting the USER_M_PATH parameter in .ini file?
Thanks, Nicola.
Please Log in to join the conversation.
nicokid wrote: So if I change the name of directory mcode in nc_files I can avoid setting the USER_M_PATH parameter in .ini file?
That is the way I read what Dewey posted. It is a simple experiment to find out
Please Log in to join the conversation.
This does not work:
~/linuxcnc/configs/my_config/nc_files
I can put my files with M codes (like M100) in this directory:
or
I can setting USER_M_PATH parameter, for example:
USER_M_PATH = nc_files
Then I can put my M files under:
In the end I think that the directory ~/linuxcnc /nc_files is for all ini configuration, while the directory specified by USER_M_PATH is just for one ini configuration (~/linuxcnc/configs/my_config/nc_files).
Nicola.
Please Log in to join the conversation.
The config directory is named 'demo'.
The config directory also contains subdirectories named
d1,d2,d3, and nc_files.
The two included ini files (demo1.ini, demo2.ini) use a minimal
axis gui simulation configuration to access a simple gcode starup
file named demo.ngc
The demo1.ini config specifies:
The demo2.ini config removes (comments out) the PROGRAM_PREFIX:
Each subdirectory contains simple M1NN files to
identify their usage by encoding the value of the
motion.analog-in-00 pin which is read in the gcode file
named demo.ngc using the m66 cmd which populates the
variable #5399
To try:
Attachment not found
Attachment not found
Please Log in to join the conversation.
