Tool Setter - Remap issue

More
16 Oct 2022 22:36 - 18 Oct 2022 21:21 #254284 by Jeff_in_Wa
When typing M600 in the midi to start a tool change, I get an error that M600 is out of range.  1-199:M600
As shown below, the M6, and M600 are remapped in the Rs section

There are two ngc files for this tool setter program and they look fine.  I can't figure out why I'm getting this error.  Help would be
great...

.ini
# Generated by stepconf 1.1 at Tue Jun  8 11:22:59 2021
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
MACHINE = Mauer-Mill
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = gmoccapy
PREFERENCE_FILE_PATH = gmoccapy_preferences
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 2.0
MIN_SPINDLE_OVERRIDE = .25
MAX_SPINDLE_OVERRIDE = 2.0
DEFAULT_LINEAR_VELOCITY = 6.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 60.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 1
PROGRAM_PREFIX = /home/jeff/Downloads/
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
PYVCP = custompanel.xml

[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .nc,.tap G-Code File
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
SUBROUTINE_PATH = macros
REMAP=M6    modalgroup=6 ngc=tool-change
REMAP=M600  modalgroup=6 ngc=tool-job-begin

[MACROS]
MACRO = touchplate

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

[HAL]
HALFILE = Mauer-Mill.hal
HALFILE = custom.hal
HALFILE = vfd.hal
HALFILE = custom_postgui.hal
HALFILE = postgui_call_list.hal
HALFILE = pyvcp_options.hal
POSTGUI_HALFILE = custom_postgui.hal

[HALUI]
#MDI_COMMAND=o100 call

[TRAJ]
COORDINATES =  X Y Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 60.00
MAX_LINEAR_VELOCITY = 100.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_AT_G30 = 0

[AXIS_X]
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = 0.0
MAX_LIMIT = 1146.001

# XXXXXXXXXXXXX
[JOINT_0]
TYPE = LINEAR
HOME = 1146.0
MIN_LIMIT = 0.0
MAX_LIMIT = 1146.001
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 100
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 1146.000000
HOME_SEARCH_VEL = -35.00000
HOME_LATCH_VEL = 1.500000
HOME_FINAL_VEL = 5
HOME_SEQUENCE = 1

[AXIS_Y]
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = 0.0
MAX_LIMIT = 868.001

# YYYYYYYYYY 11111111111
[JOINT_1]
TYPE = LINEAR
HOME = 868.0
MIN_LIMIT = 0.0
MAX_LIMIT = 868.001
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 100.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 868.000000
HOME_SEARCH_VEL = -35.00000
HOME_LATCH_VEL = 1.500000
HOME_FINAL_VEL = 5
HOME_SEQUENCE = -1

# YYYYYYYYYYY 2222222222
[JOINT_2]
TYPE = LINEAR
HOME = 868.0
MIN_LIMIT = 0.0
MAX_LIMIT = 868.001
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 100.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 868.000000
HOME_SEARCH_VEL = -35.00000
HOME_LATCH_VEL = 1.500000
HOME_FINAL_VEL = 5
HOME_SEQUENCE = -1

[AXIS_Z]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -140.0
MAX_LIMIT = 0.001

# ZZZZZZZZZZZZZZZZZ
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -140.0
MAX_LIMIT = 0.001
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 250
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -35.00
HOME_LATCH_VEL = 1.500000
HOME_FINAL_VEL = 5
HOME_SEQUENCE = 0

.hal
## This folder turns on the Parallel board, and makes all the software connections
## to make this mill run properly
## Take great care in how each line is formated

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0x378 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0,0
loadrt pwmgen output_type=1

## Here we add a thread, and then the function
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread

## Here we add Step Pulses to the drivers
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true

## Here we load a userspace .hal component.  These talk to other .hal components
## next three lines are for tool setter 
loadusr -W hal_manualtoolchange
net probe-in => motion.probe-input
net probe-in <= hm2_7i96.0.gpio.005.in

#net probe parport.0.pin-15-in-not => motion.probe-input
net probe parport.0.pin-15-in => motion.probe-input

net xstep           => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir            => parport.0.pin-03-out

net y1step           => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net y1dir            => parport.0.pin-05-out

net zstep           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir            => parport.0.pin-07-out

net y2step           => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net y2dir            => parport.0.pin-09-out

net home-x          <= parport.0.pin-10-in
net home-y1          <= parport.0.pin-11-in
net home-y2          <= parport.0.pin-12-in
net home-z          <= parport.0.pin-13-in
#net probe-in        <= parport.0.pin-15-in

# XXXXXXXXX  Original wsa 36000 on all joints
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 36000
setp stepgen.0.dirsetup 36000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net home-x => joint.0.home-sw-in

# YYYYYYY 111111111
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 36000
setp stepgen.1.dirsetup 36000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net y1pos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net y1pos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net y1step <= stepgen.1.step
net y1dir <= stepgen.1.dir
net y1enable joint.1.amp-enable-out => stepgen.1.enable
net home-y1 => joint.1.home-sw-in

# YYYYYYY 2222222222
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 36000
setp stepgen.2.dirsetup 36000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net y2pos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net y2pos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net y2step <= stepgen.2.step
net y2dir <= stepgen.2.dir
net y2enable joint.2.amp-enable-out => stepgen.2.enable
net home-y2 => joint.2.home-sw-in

# ZZZZZZZZZZ
setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 36000
setp stepgen.3.dirsetup 36000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net zpos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
net zpos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
net zstep <= stepgen.3.step
net zdir <= stepgen.3.dir
net zenable joint.3.amp-enable-out => stepgen.3.enable
net home-z => joint.3.home-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in


custom.postgui.hal
net spindle-speed-fb <= gmoccapy.spindle_feedback_bar
net spindle-at-speed <= gmoccapy.spindle_at_speed_led

net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
net tool-changed gmoccapy.toolchange-changed <= iocontrol.0.tool-changed
net tool-number gmoccapy.toolchange-number <= iocontrol.0.tool-prep-number
net tool-prepare-loopback iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared
Last edit: 18 Oct 2022 21:21 by Jeff_in_Wa. Reason: Wasn't a clear explanation of my problem

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

More
25 Oct 2022 00:00 #254974 by tommylight
Found this in the deleted stuff, i can not find a reason for it being deleted, so i restored it.
Please let me know if it should be removed.
Thank you.

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

Moderators: newbynobiHansU
Time to create page: 0.595 seconds
Powered by Kunena Forum