( Solved ) Issues with python plugin for remap

More
03 Aug 2020 23:43 - 03 Aug 2020 23:44 #177125 by bevins

distribution change is the least likely cause.
can you confirm the sample sim/axis/remap/extend-builtin works?
I then added print statements to nc_files/remap_lib/stdglue.py 's
change_prolog and change_epilog.
They both printed when I ran the default program for that sample from 2.8

This is running the epilog because it is printing my print statement.

This would prove the underlying code is working.


I will check this tonight, but did you run this on machine or simulator?


It is sayoing the oword ngc's are not callable. I even gave them absolute path.

Warning: Spoiler!


Attachments:
Last edit: 03 Aug 2020 23:44 by bevins.

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

More
04 Aug 2020 00:43 #177137 by cmorley
here is the terminal when I run the sample:
chris@chris-cnc:~/emc$ linuxcnc
LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/chris/emc/configs/sim/axis/remap/extend-builtins'
Machine configuration file is 'extend-builtins.ini'
Starting LinuxCNC...
Found file(LIB): /home/chris/emc/lib/hallib/basic_sim.tcl
setup_kins: cmd=loadrt trivkins
Note: Using POSIX realtime
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:168: executing 'import sys
sys.path.insert(0,"./python")'
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:170: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:168: executing 'import sys
sys.path.insert(0,"./python")'
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:170: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
note: MAXV     max: 1.200 units/sec 72.000 units/min
note: LJOG     max: 1.200 units/sec 72.000 units/min
note: LJOG default: 0.250 units/sec 15.000 units/min
note: jog_order='XYZ'
note: jog_invert=set([])
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:168: executing 'import sys
sys.path.insert(0,"./python")'
/home/chris/emc/configs/sim/axis/remap/extend-builtins/extend-builtins.ini:170: executing 'import sys
sys.path.append("../../nc_files/remap_lib/python-stdglue")'
113246211

Note that it mentions adding the path to python-stdglue. Your printout doesn't mention that.
Are you using the python-stdglue or have you coded something specific?

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

More
04 Aug 2020 00:56 - 04 Aug 2020 00:58 #177141 by bevins


Note that it mentions adding the path to python-stdglue. Your printout doesn't mention that.
Are you using the python-stdglue or have you coded something specific?


I have my stdglue in python folder in linuxcnc folder which it gets referenced. If I remove it it wont run saying cant find it.

I cannot use the append ../../nc_files/remap_lib/python-stdglue because it says it cant find it when I do. It is there though.

I can run the sim no problem with both the rackchange and extend-builtlins.
I tried it all different ways. I think the issue is it is saying the oword subs are not callable even though it runs them.
Last edit: 04 Aug 2020 00:58 by bevins.

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

More
04 Aug 2020 01:03 #177144 by cmorley

Here is my rack_change.ngc
o<rack_change> sub
M73 (auto-restore modal settings on return)
;(print, rack_change: loaded tool=#<_current_tool> current pocket: #<_current_pocket>)
(print, rack_change: selected tool=#<_selected_tool> selected pocket: #<_selected_pocket>)
m2

So there is basically nothing in it. It does do the print statement but never continues on like it didn't run the epilog, which is a python thing,,,,.. WTF am I missing?


I notice this O sub doesn't have a endsub ... is it there?

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

More
04 Aug 2020 01:10 - 04 Aug 2020 01:11 #177147 by bevins
So I set it up so it is referencing the same standard glue as your path.

Also when I load a file and even the default it doesn't show up in the preview. ITs like it never gets through the preview.

Attachments:
Last edit: 04 Aug 2020 01:11 by bevins.

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

More
04 Aug 2020 01:57 #177155 by cmorley
you didn't answer my last question

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

More
04 Aug 2020 02:31 #177160 by bevins

you didn't answer my last question


No its not there. I stripped out the oword when I was having issues.

I'll see if this changes things.

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

More
04 Aug 2020 11:21 #177215 by bevins
Yes that was it. I guess I was having two issues chasing one while the other obvious also.
Sorry for wasting your time Chris and thanks for the help.

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

More
04 Aug 2020 12:24 #177227 by rodw
Awesome work guys. I wonder if the sim can be updated for the next guy?

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

More
04 Aug 2020 12:36 - 04 Aug 2020 12:38 #177229 by bevins

Awesome work guys. I wonder if the sim can be updated for the next guy?


The sim is correct. I stripped the sub in an effort to dumb it down so I could find the issue and I left out an important piece that made troubleshooting even more difficult.

The actual original issue was a path and permissions issue.
Last edit: 04 Aug 2020 12:38 by bevins.
The following user(s) said Thank You: rodw

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

Time to create page: 0.123 seconds
Powered by Kunena Forum