( Solved ) Issues with python plugin for remap

More
6 years 2 months ago #177125 by bevins

bevins wrote:

cmorley wrote: 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!


Attachment not found

Please Log in to join the conversation.

More
6 years 2 months ago #177137 by cmorley
here is the terminal when I run the sample:
Code:
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 to join the conversation.

More
6 years 2 months ago #177141 by bevins

cmorley wrote:
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.

Please Log in to join the conversation.

More
6 years 2 months ago #177144 by cmorley

bevins wrote: Here is my rack_change.ngc

Code:
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 to join the conversation.

More
6 years 2 months ago #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.

Attachment not found

Please Log in to join the conversation.

More
6 years 2 months ago #177155 by cmorley
you didn't answer my last question

Please Log in to join the conversation.

More
6 years 2 months ago #177160 by bevins

cmorley wrote: 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 to join the conversation.

More
6 years 2 months ago #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 to join the conversation.

More
6 years 2 months ago #177227 by rodw
Awesome work guys. I wonder if the sim can be updated for the next guy?

Please Log in to join the conversation.

More
6 years 2 months ago #177229 by bevins

rodw wrote: 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.

Please Log in to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum