( Solved ) Issues with python plugin for remap
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
03 Aug 2020 23:43 - 03 Aug 2020 23:44 #177125
by bevins
It is sayoing the oword ngc's are not callable. I even gave them absolute path.
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
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!
# Generated by PNCconf at Sun Jul 26 08:44:12 2020
# Using LinuxCNC version: UNAVAILABLE
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = ET1
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/etienne/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 4
MAX_LINEAR_VELOCITY = 10
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
OPEN_FILE = ./nc_files/examples.ngc
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
USER_M_PATH = /home/etienne/linuxcnc/nc_subroutines
SUBROUTINE_PATH = /home/etienne/linuxcnc/nc_subroutines
LOG_LEVEL = 10
#FEATURES= 30
#ON_ABORT_COMMAND= O <on_abort> call
#REMAP= M6 modalgroup=6 prolog=change_prolog ngc=rack_change epilog=change_epilog
REMAP= T prolog=prepare_prolog ngc=prepare epilog=prepare_epilog
# parameters exposed by change_prolog/evaluated by change_epilog:
# #<tool_in_spindle>
# #<selected_tool>
# #<current_pocket>
# #<selected_pocket>
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog
# parameters exposed by settool_prolog/evaluated by settool_epilog:
# #<tool>
# #<pocket>
REMAP= M61 modalgroup=6 prolog=settool_prolog ngc=settool epilog=settool_epilog
# alternative for demonstration purposes: 'do it all in Python'
#REMAP= M61 modalgroup=6 python=set_tool_number
# parameters exposed by setspeed_prolog/evaluated by setspeed_epilog:
# #<speed>
REMAP= S prolog=setspeed_prolog ngc=setspeed epilog=setspeed_epilog
# parameters exposed by setfeed_prolog/evaluated by setfeed_epilog:
# #<feed>
REMAP= F prolog=setfeed_prolog ngc=setfeed epilog=setfeed_epilog
REMAP= M0 modalgroup=4 ngc=extend_m0
REMAP= M1 modalgroup=4 ngc=extend_m1
REMAP= M60 modalgroup=4 ngc=extend_m60
# this is important - read common_nc_subs/reset_state.ngc
ON_ABORT_COMMAND= O <reset_state> call
[PYTHON]
# where to find Python code
# code specific for this configuration
PATH_PREPEND= /home/etienne/linuxcnc/python
PATH_APPEND= /home/etienne/linuxcnc/python
# import the following Python module
TOPLEVEL= /home/etienne/linuxcnc/python/toplevel.py
# the higher the more verbose tracing of the Python plugin
LOG_LEVEL = 100
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
# **** This is for info only ****
CARD0=hm2_7i92.0
[HAL]
HALUI = halui
HALFILE = ET1.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
[HALUI]
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 4.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGER_TYPE = 1
#******************************************
[AXIS_X]
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -0.001
MAX_LIMIT = 48
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 15
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 50
STEPGEN_MAXACCEL = 150
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 2000
STEPSPACE = 2000
STEP_SCALE = 2500
MIN_LIMIT = -0.001
MAX_LIMIT = 48
HOME_OFFSET = -0.500000
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = -.5
HOME_FINAL_VEL = -.5
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
#******************************************
#******************************************
[AXIS_Y]
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -0.001
MAX_LIMIT = 96
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 50
STEPGEN_MAXACCEL = 150
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 2000
STEPSPACE = 2000
STEP_SCALE = 2500
MIN_LIMIT = -0.001
MAX_LIMIT = 96
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = -.5
HOME_FINAL_VEL = -.5
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
#******************************************
#******************************************
[AXIS_Z]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -8.0
MAX_LIMIT = 0.001
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 10.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 5
STEPGEN_MAXACCEL = 37.50
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 1200.0
MIN_LIMIT = -8.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = .5
HOME_FINAL_VEL = .5
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
#******************************************
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
# Part program interpreter section --------------------------------------------
[TOOL_HOLDER_CLEAR]
X = 10
Y = 30
Z = 10
[TOOL_SLOT_DELTA]
X = 0
Y = 10
Z = 0
# this is not named TOOL_CHANGE_POSITION on purpose - canon uses it and will
# interfere
[CHANGE_POSITION]
X = 10
Y = 10
Z = 10
[DWELL]
LOCK_TIME = 0.5
MYSTERY = 0
NEW_TOOL = 1.0
POST_UNLOCK = 0.5
# motion.digital-out-NN pins
[PINS]
LOCK = 0
FLUSH = 1
Last edit: 03 Aug 2020 23:44 by bevins.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
04 Aug 2020 00:43 #177137
by cmorley
Replied by cmorley on topic ( Solved ) Issues with python plugin for remap
here is the terminal when I run the sample:
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?
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.
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
04 Aug 2020 00:56 - 04 Aug 2020 00:58 #177141
by bevins
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.
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
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.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
04 Aug 2020 01:03 #177144
by cmorley
I notice this O sub doesn't have a endsub ... is it there?
Replied by cmorley on topic ( Solved ) Issues with python plugin for remap
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.
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
04 Aug 2020 01:10 - 04 Aug 2020 01:11 #177147
by bevins
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
Attachments:
Last edit: 04 Aug 2020 01:11 by bevins.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7777
- Thank you received: 2073
04 Aug 2020 01:57 #177155
by cmorley
Replied by cmorley on topic ( Solved ) Issues with python plugin for remap
you didn't answer my last question
Please Log in or Create an account to join the conversation.
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
04 Aug 2020 02:31 #177160
by bevins
No its not there. I stripped out the oword when I was having issues.
I'll see if this changes things.
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
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.
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
04 Aug 2020 11:21 #177215
by bevins
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
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.
Sorry for wasting your time Chris and thanks for the help.
Please Log in or Create an account to join the conversation.
- rodw
- Away
- Platinum Member
Less
More
- Posts: 10788
- Thank you received: 3554
04 Aug 2020 12:24 #177227
by rodw
Replied by rodw on topic ( Solved ) Issues with python plugin for remap
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.
- bevins
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1937
- Thank you received: 335
04 Aug 2020 12:36 - 04 Aug 2020 12:38 #177229
by bevins
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.
Replied by bevins on topic ( Solved ) Issues with python plugin for remap
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.100 seconds