Having another go at remaping M6

More
08 Aug 2012 08:37 #22969 by mhaberler
Gary,

this is just a problem of Unix pathnames.

the log says:

cant resolve path to 'python/toplevel.py'
no Python plugin available

which means:
- using a REMAP module requires the Python plugin to be configured and initialized
- to initialize, the Python plugin must be able to read the toplevel Python script which is set with the [PYTHON]TOPLEVEL=<path to toplevel script>
- during startup the path 'python/toplevel.py' could not be found - it is a relative path and obviously it cant find either the 'python' directory or the 'toplevel.py' script within it

So as soon as you use a REMAP, the interpreter needs to be able to find the toplevel script

Fix: replace [PYTHON]TOPLEVEL=<absolute path to toplevel script>
like /home/gary/linuxcnc/config/yadayada/python/toplevel.py

same goes for the APPEND/PREPEND pathes

-m

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

More
09 Aug 2012 20:00 - 09 Aug 2012 20:01 #23004 by garymcrobertpdx
Michael

OK PYTHON]TOPLEVEL= and APPEND/PREPEND appear in my ini file
I assume those are the ones that need the path corrected to one some what
like the example you provided /home/gary/linuxcnc/config/yadayada/python/toplevel.py

I searched for any Python directory's or files in the home directory
no Python directorys were found and only a few python scripts like
hole circle.py No toplevel.py found.

when going wider afield, locate did find many directorys and files like this
/usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/rack-toolchange/python/toplevel.py

Could it be that I need to install an additional Python package???


G.
Last edit: 09 Aug 2012 20:01 by garymcrobertpdx.

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

More
10 Aug 2012 07:31 #23018 by mhaberler
garymcrobertpdx wrote:

Michael

OK PYTHON]TOPLEVEL= and APPEND/PREPEND appear in my ini file
I assume those are the ones that need the path corrected to one some what
like the example you provided /home/gary/linuxcnc/config/yadayada/python/toplevel.py

I searched for any Python directory's or files in the home directory
no Python directorys were found and only a few python scripts like
hole circle.py No toplevel.py found.

when going wider afield, locate did find many directorys and files like this
/usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/rack-toolchange/python/toplevel.py

Could it be that I need to install an additional Python package???


G.


Gary -

you are not missing any additional Python packages. Stepconf just doesnt know about remapping so if you use remapping the configuration options have to be added manually lateron.

Since I cannot tell where your working configuration is, I assume now you have your configuration under /home/gary/foo , and the inifile is foo.ini .

1. create a directory /home/gary/foo/python
2. copy /usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/rack-toolchange/python/toplevel.py to /home/gary/foo/python
3. copy /usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/python-stdglue/stdglue.py to /home/gary/foo/python
4. copy /usr/share/doc/linuxcnc/examples/sample-configs/sim/remap/rack-toolchange/python/remap.py to /home/gary/foo/python (note this imports the stdglue handlers available as outlined in the documentation)
5. in foo.ini add [PYTHON]TOPLEVEL=/home/gary/foo/python/toplevel.py
6. in foo.ini add [PYTHON]APPEND=/home/gary/foo/python , which adds the directory where the relevant Python modules for remapping live to the Python path.

- Michael

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

More
10 Aug 2012 08:05 #23019 by mhaberler
I have added a note to the remap documentation how to upgrade an existing configuration to use remapping. It should show up in a day or so here: www.linuxcnc.org/docs/devel/html/remap/s...onfiguring_remapping under chapter 4.

-m

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

More
10 Aug 2012 23:00 #23051 by garymcrobertpdx
IT'S ALIVE !!!

I ran a basic remap m6 example it seems to work.

Thank you Michael for the patent helping hand.

I suspect I have much more work ahead of me
before I get this all working but I now have a
starting place.

Gary

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

More
11 Aug 2012 10:00 #23061 by mhaberler
garymcrobertpdx wrote:

IT'S ALIVE !!!
...
Gary


good to hear! this stuff isnt terribly accessible yet, and there's a big difference between "works for the developer" and "works for the rest of us" - but you're off to a good start

out of curiosity what are you trying to achieve?

- Michael

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

Time to create page: 0.271 seconds
Powered by Kunena Forum