Having another go at remaping M6
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
using the remapping option available in 2.6
Not being a software guru the process is a bit complicated.
Having read the fist portion of the doc ' Extending EMC' to the
section '2.5. An minimal example remapped code'
as a learning exercise I have attempted to make the example work
but have not attained success.
I am reasonably certain I have properly upgraded the 2.5 to 2.6
it appears to work correctly.
I have copied the example code
REMAP=M400 modalgroup=10 argspec=Pq ngc=myprocedure
to the appropriate location in my ini file.
I have placed the myprocedure.ncg file the directory
PROGRAM_PREFIX = /home/me/linuxcnc/nc_files
myprocedure.ncg contains G Code copied from an example
(change tools 1 through 6)
F100
#1 = 1
O101 while [#1 lt 7]
T#1 M6
#1 = [#1+1]
O101 endwhile
m2
I launch 2.6 and home the axis. In the MDI mode I move any axis I
wish works as expected. when I try the M400 command defined
in the remapping I receive an error message
EOF in
file:/home/me/linuxcnc/nc_files/myprocedure.ngc
seeking o-word: o<myprocedure> from line: 0
Why dose the example fail?
Please Log in or Create an account to join the conversation.
myprocedure.ncg contains G Code copied from an example
(change tools 1 through 6)
F100
#1 = 1
O101 while [#1 lt 7]
T#1 M6
#1 = [#1+1]
O101 endwhile
m2
I think you need the subroutine name tags (just as you do when calling any other subroutine)
Try this as the contents of the subroutine file:
O<myprocedure> SUB
F100
#1 = 1
O101 while [#1 lt 7]
T#1 M6
#1 = [#1+1]
O101 endwhile
O<nyprocedure> ENDSUB
m2
Please Log in or Create an account to join the conversation.
I am having another go at getting a auto tool change working
using the remapping option available in 2.6
Not being a software guru the process is a bit complicated.
Having read the fist portion of the doc ' Extending EMC' to the
section '2.5. An minimal example remapped code'
as a learning exercise I have attempted to make the example work
but have not attained success.
Hi Gary,
I suggest you work start with the self-contained examples in configs/sim/remap
to run any the getting-started example:
$ . scripts/rip-environment
$ cd configs/sim/remap/getting-started
$ linuxcnc demo.ini
try them, study the files and start modifying things to get a feel how things fit together
manual-toolchange-with-tool-length-switch and rack-toolchange contain more advanced M6 remapping examples.
The examples were developed using simulator mode but I think they work fine otherwise.
- Michael
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
Many thanks
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
Thanks for the info I did have a look at some of the directory's
containing remapping examples. There were so many directorys
and files it was mind boggling I could not see the forest for all
the trees.
So I went for the simplest example possible with help from Andy
I have the basics working now I will try moving to the next level
But its all most certain I will get stuck several times before I get
this working. Thankfully is support form exists. Other wise guys
like me would be DOOMED.
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
also studied the ini file but I do not see an explicit
path defined for python procedures. Perhaps it is
there but I do not recognize the syntax
So in which directory do I place the Python
Prolog and epilog files?
Please Log in or Create an account to join the conversation.
for instance, in the configs/sim/remap/extend-builtins example, the Python path is configured here (note it is not 'set' - you can prepend or append directories so as not to interfere with other Python path components):
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...8952410e7a786578#l90
In many cases, the 'standard glue' routines in configs/sim/remap/python-stdglue/stdglue.py should be sufficient; if you need something specific, just use them as a blueprint (glueprint ;-?)
- Michael
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
cant resolve path to 'python/toplevel.py'
no Python plugin available
Python plugin required for prolog=, but not available: 49:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
Python plugin required for epilog=, but not available: 49:REMAP = M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
3035
I copied the Python section from the example ini
[PYTHON]
# where to find Python code
# code specific for this configuration
PATH_PREPEND=./python
# generic support code
PATH_APPEND=../python-stdglue
# import the following Python module
TOPLEVEL=python/toplevel.py
# the higher the more verbose tracing of the Python plugin
LOG_LEVEL = 0
into my ini but that failed to work I just don't get the syntax to define a path
for the Python routines.
I have found the Python routines using locate
me@cnc2:~$ locate change_prolog
/home/me/Desktop/change_prolog.py
/usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/rack-toolchange/python/change_prolog.py
Please Log in or Create an account to join the conversation.
your issue has nothing to do with the changes to the ini file, but I cant tell because I dont know what you executed, and how, which resulted in above error message
please detail the exact commands you executed, and the configuration files
if you ran linuxcnc from a shell, post a log to pastebin.com/
-m
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
- Posts: 164
- Thank you received: 1
my-mill set up. I use the launch my-mill icon to execute EMC2
I presume the configuration files you refer to are the files built
buy the Steoconf wizard
The Log file viewer tool shows me 36 different log files which
file would contain the desired information?
Please Log in or Create an account to join the conversation.