Issues Remaping M6
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
29 Jun 2022 19:12 #246189
by LearningLinuxCNC
Issues Remaping M6 was created by LearningLinuxCNC
I am remapping M6 using a pure python remap.
I have referenced and modified the code that bevins published on his github and referenced in this thread.
forum.linuxcnc.org/10-advanced-configura...sons-learned?start=0
I have changed my INI file to have the following entries.
Linuxcnc starts without issue with the REMAP=M6 line commented out.
With that line uncommented I get the following error
This is when the qtvcp gui is first loading.
The gui then does not respond to linuxcnc or hal.
Attached is the remap file that I am trying to use. I have commented out most of the code and it still does not work.
Thanks in advance,
Jim
I have referenced and modified the code that bevins published on his github and referenced in this thread.
forum.linuxcnc.org/10-advanced-configura...sons-learned?start=0
I have changed my INI file to have the following entries.
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = Subroutines:../../nc_files/examples/probe/basic_probe/macros/
REMAP=M6 modalgroup=6 python=M6_Remap_sbm
[PYTHON]
TOPLEVEL=/home/sboperator/linuxcnc/configs/Holloway_Sprayball_Machin/Remap/toplevel.py
PATH_APPEND=/home/sboperator/linuxcnc/configs/Holloway_Sprayball_Machine/Remap
Linuxcnc starts without issue with the REMAP=M6 line commented out.
With that line uncommented I get the following error
halui: emcCommandSend: no echo from Task after 5.000 seconds
This is when the qtvcp gui is first loading.
The gui then does not respond to linuxcnc or hal.
Attached is the remap file that I am trying to use. I have commented out most of the code and it still does not work.
Thanks in advance,
Jim
Please Log in or Create an account to join the conversation.
29 Jun 2022 20:40 #246205
by andypugh
Replied by andypugh on topic Issues Remaping M6
Is the file executable?
doesbring up the Python command line? If it does, what version does it tell you it is on the first line?
Which LinuxCNC version?
does
/usr/bin/env python
Which LinuxCNC version?
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
29 Jun 2022 20:52 #246208
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Issues Remaping M6
Andy,
It was not executable. I change the file remap.py to be executable. Still same issue.
there is no /usr/bin/env folder
/usr/bin python
returns
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Linuxcnc version 2.8.2
It was not executable. I change the file remap.py to be executable. Still same issue.
there is no /usr/bin/env folder
/usr/bin python
returns
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Linuxcnc version 2.8.2
Please Log in or Create an account to join the conversation.
29 Jun 2022 21:05 #246212
by andypugh
Replied by andypugh on topic Issues Remaping M6
If you have no /usr/bin/env then you probably shouldn't use it at the top of your remap file. But I think it's an executable rather than a directory.
what do you get for?
what do you get for
/usr/bin/env --help
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
29 Jun 2022 21:24 #246216
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Issues Remaping M6
Andy, As usual you are correct. I just tried to cd my way there did not look for a file. /usr/bin/env is an executable.
/usr/bin/env --help returns
Usage: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
Set each NAME to VALUE in the environment and run COMMAND.
Mandatory arguments to long options are mandatory for short options too.
-i, --ignore-environment start with an empty environment
-0, --null end each output line with NUL, not newline
-u, --unset=NAME remove variable from the environment
-C, --chdir=DIR change working directory to DIR
-S, --split-string=S process and split S into separate arguments;
used to pass multiple arguments on shebang lines
-v, --debug print verbose information for each processing step
--help display this help and exit
--version output version information and exit
A mere - implies -i. If no COMMAND, print the resulting environment.
GNU coreutils online help: <www.gnu.org/software/coreutils/>
Full documentation at: <www.gnu.org/software/coreutils/env>
or available locally via: info '(coreutils) env invocation'
/usr/bin/env python returns the same as /usr/bin/python
/usr/bin/env --help returns
Usage: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
Set each NAME to VALUE in the environment and run COMMAND.
Mandatory arguments to long options are mandatory for short options too.
-i, --ignore-environment start with an empty environment
-0, --null end each output line with NUL, not newline
-u, --unset=NAME remove variable from the environment
-C, --chdir=DIR change working directory to DIR
-S, --split-string=S process and split S into separate arguments;
used to pass multiple arguments on shebang lines
-v, --debug print verbose information for each processing step
--help display this help and exit
--version output version information and exit
A mere - implies -i. If no COMMAND, print the resulting environment.
GNU coreutils online help: <www.gnu.org/software/coreutils/>
Full documentation at: <www.gnu.org/software/coreutils/env>
or available locally via: info '(coreutils) env invocation'
/usr/bin/env python returns the same as /usr/bin/python
Please Log in or Create an account to join the conversation.
29 Jun 2022 21:36 #246218
by andypugh
Replied by andypugh on topic Issues Remaping M6
OK, so you do have it, and /usr/env python ought to work as your shebang.
Does the file run if called from the command-line with LinuxCNC running?
Does the file run if called from the command-line with LinuxCNC running?
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
29 Jun 2022 21:44 #246219
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Issues Remaping M6
No it does not run.
I commented out the REMAP=M6 line in the .ini file
Started Linuxcnc
tried to run remap.py from the Remap directory
returned
bash: remap.py: command not found
I will be leaving for a while. I will check back in later tonight or tomorrow.
I commented out the REMAP=M6 line in the .ini file
Started Linuxcnc
tried to run remap.py from the Remap directory
returned
bash: remap.py: command not found
I will be leaving for a while. I will check back in later tonight or tomorrow.
Please Log in or Create an account to join the conversation.
29 Jun 2022 23:04 #246233
by andypugh
Replied by andypugh on topic Issues Remaping M6
You would need
It's a Linux thing... But you need a path to an executable even if it is in the current directory.
./remap.py
It's a Linux thing... But you need a path to an executable even if it is in the current directory.
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
30 Jun 2022 01:07 #246239
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Issues Remaping M6
So using ./remap.py
returns
Traceback (most recent call last):
File "./remap.py", line 7, in <module>
from interpreter import *
ImportError: No module named interpreter
Why is this not found?
returns
Traceback (most recent call last):
File "./remap.py", line 7, in <module>
from interpreter import *
ImportError: No module named interpreter
Why is this not found?
Please Log in or Create an account to join the conversation.
30 Jun 2022 08:08 #246254
by andypugh
Replied by andypugh on topic Issues Remaping M6
emccanon can only be imported when the code is called as a remap. The same is possibly true of interpreter too.
Looking at your code I think that it will be hard to leave anything functional without interpreter and emccanon.
There seem to be two possibilities, that the code isn't being found and run, or that the code has errors.
To check the first, maybe save the current file under a different name and create something extremely siimple in its place, and see if that runs.
Checking the latter is more complicated. But I do wonder if the issue is that you call a number of functions before they are defined? For example, "change_prolog1"
Perhaps try moving your "def M6_Remap_sbm(self, **words):" section to the end of the file?
Looking at your code I think that it will be hard to leave anything functional without interpreter and emccanon.
There seem to be two possibilities, that the code isn't being found and run, or that the code has errors.
To check the first, maybe save the current file under a different name and create something extremely siimple in its place, and see if that runs.
Checking the latter is more complicated. But I do wonder if the issue is that you call a number of functions before they are defined? For example, "change_prolog1"
Perhaps try moving your "def M6_Remap_sbm(self, **words):" section to the end of the file?
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds