tool change

More
10 Nov 2015 04:14 #65057 by thor44
tool change was created by thor44
when I load a program in gmoccapy the first tool change comes up I get the usual prompt on the screen to change the tool and click continue, and then there is another window that is basically the same message but when I click continue nothing happens.
Does anyone know what might be wrong?

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

More
10 Nov 2015 13:41 #65074 by LearningLinuxCNC
Replied by LearningLinuxCNC on topic tool change
Please post your config and if possible the G-code that is causing this behavior.

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

More
11 Nov 2015 01:48 #65095 by thor44
Replied by thor44 on topic tool change
I'm not sure which files to post so I will post a bunch of them.














I think I did something wrong the first time.

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

More
11 Nov 2015 02:01 #65097 by thor44
Replied by thor44 on topic tool change
well I dont think that worked very well. I tried to attach the files but it doesnt seem to have worked.
here is the ini file.
# Generated by Orson Thompson 1.1 Aug 18 2015

[EMC]
MACHINE = my-mill
DEBUG = 0

[DISPLAY]
DISPLAY = gmoccapy
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 0.10
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 1.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/orson/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PYVCP = custompanel.xml

EMBED_TAB_NAME = DRO
EMBED_TAB_LOCATION = ntb_user_tabs
EMBED_TAB_COMMAND = gladevcp -x {XID} dro.glade

EMBED_TAB_NAME = Second user tab
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -x {XID} vcp_box.glade

EMBED_TAB_NAME=Probe Screen
EMBED_TAB_LOCATION = ntb_user_tabs
EMBED_TAB_COMMAND = gladevcp -x {XID} -u python/probe_screen.py probe_icons/probe_screen.glade

[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
SUBROUTINE_PATH = macros
FEATURES=30

[TOOLSENSOR]
X = 10
Y = 10
Z = 0
# CONTROL PROBE RAPID FEED
RAPID_SPEED = 15
MAXPROBE = 20

[CHANGE_POSITION]
X = 10
Y = 10
Z = 0

[MACROS]
MACRO = i_am_lost
MACRO = halo_world
MACRO = jog_around
MACRO = increment xinc yinc
MACRO = go_to_position X-pos Y-pos Z-pos



[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 500000

[HAL]
HALUI = halui
HALFILE = my-mill.hal
HALFILE = custom.hal
POSTGUI_HALFILE = gmoccapy_postgui.hal

[HALUI]
# add halui MDI commands here (max 64)

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
MAX_VELOCITY = 1.00

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

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 6403.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 48.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.500000
HOME_LATCH_VEL = 0.078125

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 6403.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 48.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.500000
HOME_LATCH_VEL = 0.078125

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 6403.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -3.9
MAX_LIMIT = 3
HOME_OFFSET = 0.0

and here is the hal file
# Generated by stepconf 1.1 at Mon Aug 17 21:51:20 2015
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt abs count=1
loadrt pwmgen output_type=1

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
addf abs.0 servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
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
net spindle-at-speed => motion.spindle-at-speed
net spindle-cw <= motion.spindle-forward

net probe-in => motion.probe-input

net estop-out => parport.0.pin-01-out
setp parport.0.pin-02-out-invert 1
net ydir => parport.0.pin-02-out
net ystep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
setp parport.0.pin-04-out-invert 1
net xdir => parport.0.pin-04-out
net xstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net adir => parport.0.pin-08-out
net astep => parport.0.pin-09-out
setp parport.0.pin-09-out-reset 1
net spindle-cw => parport.0.pin-14-out
net spindle-pwm => parport.0.pin-16-out
net xenable => parport.0.pin-17-out
net home-x <= parport.0.pin-12-in-not
net home-y <= parport.0.pin-15-in-not

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net home-x => axis.0.home-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net home-y => axis.1.home-sw-in

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

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

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

the g code

%
(O0001 1)
(PART# = )
(REVISION = 1)
(CUSTOMER NAME = )
(CYCLE TIME = 0:00)
(DATE POSTED - 10/29/2015 12:15 )

(WCS = G54)

(STOCK - 1 1005)

(TOOL LIST)
T01 = 1/2 EM CRB 4FL 1 LOC

G17 G40 G49 G90 G94
G91

M01
T01 M06 1/2 EM CRB 4FL 1 LOC
( Contour Mill3 )
S8000 M03
G90 G54 G17 G00 X21. Y9.875
M08

Z.1
G01 X34. Z.0586 F80.
G02 X34.6372 Y9.3487 Z.0557 I0 J-.6489
X34.5952 Y8.0408 Z.0515 I-2.9156 J-.5609
G03 X35.4332 Y7.0563 Z.0467 I.7639 J-.1986
G01 X35.4334
X38.8841 Y7.3777 Z.0356
G02 X40.25 Y6.1331 Z.029 I.1159 J-1.2446
G01 Y3.6169 Z.021
G02 X38.8841 Y2.3723 Z.0144 I-1.25 J0
G01 X35.4334 Y2.6937 Z.0033
X35.4332
G03 X34.5952 Y1.7093 Z-.0015 I-.0741 J-.7858
G02 X34.6372 Y.4013 Z-.0057 I-2.8736 J-.747
X34. Y-.125 Z-.0086 I-.6372 J.1226
G01 X8. Z-.0914
G02 X7.3628 Y.4013 Z-.0943 I0 J.6489
X7.4048 Y1.7092 Z-.0985 I2.9156 J.5609
G03 X6.5668 Y2.6937 Z-.1033 I-.7639 J.1986
G01 X6.5666
X3.1159 Y2.3723 Z-.1144
G02 X1.75 Y3.6169 Z-.121 I-.1159 J1.2446
G01 Y6.1331 Z-.129
G02 X3.1159 Y7.3777 Z-.1356 I1.25 J0
G01 X6.5666 Y7.0563 Z-.1467
X6.5668
G03 X7.4048 Y8.0407 Z-.1515 I.0741 J.7858
G02 X7.3628 Y9.3487 Z-.1557 I2.8736 J.747
X8. Y9.875 Z-.1586 I.6372 J-.1226
G01 X21. Z-.2
X34. Z-.2207
G02 X34.6372 Y9.3487 Z-.2221 I0 J-.6489
X34.5952 Y8.0408 Z-.2242 I-2.9156 J-.5609
G03 X35.4332 Y7.0563 Z-.2267 I.7639 J-.1986
G01 X35.4334
X38.8841 Y7.3777 Z-.2322
G02 X40.25 Y6.1331 Z-.2355 I.1159 J-1.2446
G01 Y3.6169 Z-.2395
G02 X38.8841 Y2.3723 Z-.2428 I-1.25 J0
G01 X35.4334 Y2.6937 Z-.2483
X35.4332
G03 X34.5952 Y1.7093 Z-.2508 I-.0741 J-.7858
G02 X34.6372 Y.4013 Z-.2529 I-2.8736 J-.747
X34. Y-.125 Z-.2543 I-.6372 J.1226
G01 X8. Z-.2957
G02 X7.3628 Y.4013 Z-.2971 I0 J.6489
X7.4048 Y1.7092 Z-.2992 I2.9156 J.5609
G03 X6.5668 Y2.6937 Z-.3017 I-.7639 J.1986
G01 X6.5666
X3.1159 Y2.3723 Z-.3072
G02 X1.75 Y3.6169 Z-.3105 I-.1159 J1.2446
G01 Y6.1331 Z-.3145
G02 X3.1159 Y7.3777 Z-.3178 I1.25 J0
G01 X6.5666 Y7.0563 Z-.3233
X6.5668
G03 X7.4048 Y8.0407 Z-.3258 I.0741 J.7858
G02 X7.3628 Y9.3487 Z-.3279 I2.8736 J.747
X8. Y9.875 Z-.3293 I.6372 J-.1226
G01 X21. Z-.35
X34. Z-.3707
G02 X34.6372 Y9.3487 Z-.3721 I0 J-.6489
X34.5952 Y8.0408 Z-.3742 I-2.9156 J-.5609
G03 X35.4332 Y7.0563 Z-.3767 I.7639 J-.1986
G01 X35.4334
X38.8841 Y7.3777 Z-.3822
G02 X40.25 Y6.1331 Z-.3855 I.1159 J-1.2446
G01 Y3.6169 Z-.3895
G02 X38.8841 Y2.3723 Z-.3928 I-1.25 J0
G01 X35.4334 Y2.6937 Z-.3983
X35.4332
G03 X34.5952 Y1.7093 Z-.4008 I-.0741 J-.7858
G02 X34.6372 Y.4013 Z-.4029 I-2.8736 J-.747
X34. Y-.125 Z-.4043 I-.6372 J.1226
G01 X8. Z-.4457
G02 X7.3628 Y.4013 Z-.4471 I0 J.6489
X7.4048 Y1.7092 Z-.4492 I2.9156 J.5609
G03 X6.5668 Y2.6937 Z-.4517 I-.7639 J.1986
G01 X6.5666
X3.1159 Y2.3723 Z-.4572
G02 X1.75 Y3.6169 Z-.4605 I-.1159 J1.2446
G01 Y6.1331 Z-.4645
G02 X3.1159 Y7.3777 Z-.4678 I1.25 J0
G01 X6.5666 Y7.0563 Z-.4733
X6.5668
G03 X7.4048 Y8.0407 Z-.4758 I.0741 J.7858
G02 X7.3628 Y9.3487 Z-.4779 I2.8736 J.747
X8. Y9.875 Z-.4793 I.6372 J-.1226
G01 X21. Z-.5
X34. Z-.5207
G02 X34.6372 Y9.3487 Z-.5221 I0 J-.6489
X34.5952 Y8.0408 Z-.5242 I-2.9156 J-.5609
G03 X35.4332 Y7.0563 Z-.5267 I.7639 J-.1986
G01 X35.4334
X38.8841 Y7.3777 Z-.5322
G02 X40.25 Y6.1331 Z-.5355 I.1159 J-1.2446
G01 Y3.6169 Z-.5395
G02 X38.8841 Y2.3723 Z-.5428 I-1.25 J0
G01 X35.4334 Y2.6937 Z-.5483
X35.4332
G03 X34.5952 Y1.7093 Z-.5508 I-.0741 J-.7858
G02 X34.6372 Y.4013 Z-.5529 I-2.8736 J-.747
X34. Y-.125 Z-.5543 I-.6372 J.1226
G01 X8. Z-.5957
G02 X7.3628 Y.4013 Z-.5971 I0 J.6489
X7.4048 Y1.7092 Z-.5992 I2.9156 J.5609
G03 X6.5668 Y2.6937 Z-.6017 I-.7639 J.1986
G01 X6.5666
X3.1159 Y2.3723 Z-.6072
G02 X1.75 Y3.6169 Z-.6105 I-.1159 J1.2446
G01 Y6.1331 Z-.6145
G02 X3.1159 Y7.3777 Z-.6178 I1.25 J0
G01 X6.5666 Y7.0563 Z-.6233
X6.5668
G03 X7.3835 Y7.5746 Z-.625 I.0741 J.7858
X7.4048 Y8.0407 I-.7426 J.2676
G02 X7.3628 Y9.3487 I2.8736 J.747
X8. Y9.875 I.6372 J-.1226
G01 X34.
G02 X34.6372 Y9.3487 I0 J-.6489
X34.5952 Y8.0408 I-2.9156 J-.5609
G03 X35.4332 Y7.0563 I.7639 J-.1986
G01 X35.4334
X38.8841 Y7.3777
G02 X40.25 Y6.1331 I.1159 J-1.2446
G01 Y3.6169
G02 X38.8841 Y2.3723 I-1.25 J0
G01 X35.4334 Y2.6937
X35.4332
G03 X34.5952 Y1.7093 I-.0741 J-.7858
G02 X34.6372 Y.4013 I-2.8736 J-.747
X34. Y-.125 I-.6372 J.1226
G01 X8.
G02 X7.3628 Y.4013 I0 J.6489
X7.4048 Y1.7092 I2.9156 J.5609
G03 X6.5668 Y2.6937 I-.7639 J.1986
G01 X6.5666
X3.1159 Y2.3723
G02 X1.75 Y3.6169 I-.1159 J1.2446
G01 Y6.1331
G02 X3.1159 Y7.3777 I1.25 J0
G01 X6.5666 Y7.0563
X6.5668
G03 X7.3835 Y7.5746 I.0741 J.7858
G00 Z.1
Z1. M09
G91
G28
M30
%

please let me know if you need more files or if there is a better way to post them.

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

More
11 Nov 2015 03:13 #65099 by LearningLinuxCNC
Replied by LearningLinuxCNC on topic tool change
thor,

Please post the file "gmoccapy_postgui.hal". You can add the files to an archive or zip file and attach the archive to the forum. I see several things that could be the problem but I think I will find the key in the postgui.hal file.

It appears that you are possibly trying to use the manual tool change from axis "hal_manualtoolchange" and the one from gmoccapy.

Also are you trying to use the automatic tool length measurement in gmoccapy? I see some potential issues with that in your configuration also. If your Z = 0 in machine coordinates is at the top of the travel for the z axis then you should have the value for "MAXPROBE = ?" be a negative value as it is a relative coordinate and the probe will try to go that relative distance to find the tool length probe.

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

More
11 Nov 2015 03:27 #65100 by thor44
Replied by thor44 on topic tool change
###################################################################
# moccapy_postgui.hal file from Norbert Schechner #
###################################################################



# the unlink pin commands are only used, because they are connected
# in core_sim.hal and we use this file to simulate
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed

net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
net tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z


File Attachment:

File Name: gmoccapy_p....hal.zip
File Size:0 KB


I hope this works.
Thanks
Attachments:

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

More
11 Nov 2015 03:31 #65101 by thor44
Replied by thor44 on topic tool change
here is the config folder that I am using, it has all the files that I have.

File Attachment:

File Name: my-mill.zip
File Size:233 KB
Attachments:

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

More
11 Nov 2015 03:47 #65102 by LearningLinuxCNC
Replied by LearningLinuxCNC on topic tool change
Comment out the follwing lines in your HAL file.
# loadusr -W hal_manualtoolchange
# net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
# net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
# net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
# net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Delete the contents of the gmoccapy_postgui.hal file and replace it with the following
net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
net tool-changed gmoccapy.toolchange-changed <= iocontrol.0.tool-changed
net tool-prep-number gmoccapy.toolchange-number <= iocontrol.0.tool-prep-number
net tool-prep-loop iocontrol.0.tool-prepare <= iocontrol.0.tool-prepared

This should result in a single toolchange dialog box that will take the offsets from the tool table for the new tool. This will not measure the length of the new tool. You will have to go throught the configuration steps in the Auto Tool Measurement section of the gmoccapy documentation to get the tool length measurement to work.
The following user(s) said Thank You: thor44

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

More
12 Nov 2015 00:22 #65154 by thor44
Replied by thor44 on topic tool change
Nitro,

Thanks for the help so far it works perfectly.

Orson

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

More
12 Nov 2015 19:16 #65180 by thor44
Replied by thor44 on topic tool change
Has any one used the auto tool measurement in Gmaccopy?
I think I have all the settings correct but it doesn't work.
Does Amy one have any ideas?

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

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