Skip to content

Commit 2332bb1

Browse files
committed
qtdragon_hd -add test condig for z level compensation
1 parent 9daa483 commit 2332bb1

7 files changed

Lines changed: 364 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
QtDragonHD sample configs
2+
3+
Fantastic large screen for mills/routers designed by forum personality Persei.
4+
Optional choice of basic or versa probe screens.
5+
Optional laser sight control
6+
Optional toolplate Z setting
7+
Optional auto lift spindle at pause
8+
bolt circle and basic facing wizards
9+
10+
Demo of z level compensation using probed_points file.
11+
Probed point is made with included gcode ripper.
12+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
o<on_abort> sub
2+
3+
4+
o100 if [#1 eq 5]
5+
(machine on)
6+
o100 elseif [#1 eq 6]
7+
(machine off)
8+
o100 elseif [#1 eq 7]
9+
(estopped)
10+
o100 elseif [#1 eq 8]
11+
(msg,Process Aborted)
12+
o100 else
13+
(DEBUG,Abort Parameter is %d[#1])
14+
o100 endif
15+
16+
o<on_abort> endsub
17+
m2
18+
19+
These are potential abort number:
20+
21+
EMC_ABORT_TASK_EXEC_ERROR = 1,
22+
EMC_ABORT_AUX_ESTOP = 2,
23+
EMC_ABORT_MOTION_OR_IO_RCS_ERROR = 3,
24+
EMC_ABORT_TASK_STATE_OFF = 4,
25+
EMC_ABORT_TASK_STATE_ESTOP_RESET = 5,
26+
EMC_ABORT_TASK_STATE_ESTOP = 6,
27+
EMC_ABORT_TASK_STATE_NOT_ON = 7,
28+
EMC_ABORT_TASK_ABORT = 8,
29+
EMC_ABORT_INTERPRETER_ERROR = 9, // interpreter failed during readahead
30+
EMC_ABORT_INTERPRETER_ERROR_MDI = 10, // interpreter failed during MDI execution
31+
EMC_ABORT_USER = 100 // user-defined abort codes start here
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
-50.000000 -50.000000 -0.032200 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
2+
-25.000000 -50.000000 -0.008866 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
3+
0.000000 -50.000000 0.011133 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
4+
25.000000 -50.000000 0.037800 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
5+
50.000000 -50.000000 0.041133 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
6+
-50.000000 -25.000000 -0.028867 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
7+
-25.000000 -25.000000 -0.002200 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
8+
0.000000 -25.000000 0.024467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
9+
25.000000 -25.000000 0.054467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
10+
50.000000 -25.000000 0.044467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
11+
-50.000000 0.000000 -0.045533 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
12+
-25.000000 0.000000 -0.012200 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
13+
-0.000000 0.000000 0.021133 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
14+
25.000000 0.000000 0.044467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
15+
50.000000 0.000000 0.034467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
16+
-50.000000 25.000000 -0.055533 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
17+
-25.000000 25.000000 -0.025533 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
18+
0.000000 25.000000 0.007800 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
19+
25.000000 25.000000 0.034467 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
20+
50.000000 25.000000 0.041134 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
21+
-50.000000 50.000000 -0.068867 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
22+
-25.000000 50.000000 -0.038866 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
23+
0.000000 50.000000 -0.008866 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
24+
25.000000 50.000000 0.027800 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
25+
50.000000 50.000000 0.031133 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# load components
2+
########################################################################
3+
4+
loadrt logic names=logic-and personality=0x102
5+
addf logic-and servo-thread
6+
7+
# load a summing compnent for adding spindle lift and Z compensation
8+
loadrt scaled_s32_sums
9+
addf scaled-s32-sums.0 servo-thread
10+
11+
loadusr -Wn z_level_compensation z_level_compensation
12+
# method parameter must be one of nearest(2), linear(1), cubic (0)
13+
setp z_level_compensation.fade-height 0.0
14+
setp z_level_compensation.method 1
15+
16+
# connect signals
17+
########################################################################
18+
19+
net spindle-speed-limited => spindle.0.speed-out-rps => spindle.0.speed-in
20+
21+
# the unlink pin commands are only used, because they are connected
22+
# in core_sim.hal and we use this file to simulate
23+
unlinkp iocontrol.0.tool-change
24+
unlinkp iocontrol.0.tool-changed
25+
unlinkp iocontrol.0.tool-prep-number
26+
27+
net tool-change hal_manualtoolchange.change <= iocontrol.0.tool-change
28+
net tool-changed hal_manualtoolchange.changed <= iocontrol.0.tool-changed
29+
net tool-prep-number hal_manualtoolchange.number <= iocontrol.0.tool-prep-number
30+
31+
net eoffset-clear axis.z.eoffset-clear
32+
net eoffset-counts axis.z.eoffset-counts
33+
setp axis.z.eoffset-scale .001
34+
net eoffset-total axis.z.eoffset
35+
net eoffset-total qtdragon.eoffset-value
36+
setp axis.z.eoffset-enable True
37+
38+
## external offsets for spindle pause function
39+
##################################################
40+
net eoffset-clear qtdragon.eoffset-clear
41+
net eoffset-spindle-count <= qtdragon.eoffset-spindle-count
42+
net spindle-pause qtdragon.spindle-inhibit spindle.0.inhibit
43+
44+
## Z level compensation
45+
####################################################
46+
net eoffset-clr2 z_level_compensation.clear => logic-and.in-01
47+
net xpos-cmd z_level_compensation.x-pos <= axis.x.pos-cmd
48+
net ypos-cmd z_level_compensation.y-pos <= axis.y.pos-cmd
49+
net zpos-cmd z_level_compensation.z-pos <= axis.z.pos-cmd
50+
net z_compensation_on z_level_compensation.enable-in <= qtdragon.comp-on
51+
net eoffset-zlevel-count z_level_compensation.counts => qtdragon.eoffset-zlevel-count
52+
53+
net eoffset-spindle-count scaled-s32-sums.0.in0
54+
net eoffset-zlevel-count scaled-s32-sums.0.in1
55+
setp scaled-s32-sums.0.scale0 1000
56+
net eoffset-counts scaled-s32-sums.0.out-s
57+
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
# This file was created with the 7i96 Wizard on Jun 10 2019 11:12:47
2+
# Changes to most things are ok and will be read by the wizard
3+
4+
[EMC]
5+
VERSION = 1.1
6+
MACHINE = qtdragon
7+
DEBUG = 0x00000000
8+
9+
[DISPLAY]
10+
# sets qtdragon_hd as screen. for debug output to terminal add -d or -v
11+
# sets window title
12+
# sets icon in task manager
13+
DISPLAY = qtvcp -d qtdragon_hd
14+
TITLE = QtDragon HD: XYZ
15+
ICON = silver_dragon.png
16+
17+
# qtdragon saves most preference to this file
18+
PREFERENCE_FILE_PATH = WORKINGFOLDER/qtdragon_hd.pref
19+
20+
# min/max percentage overrides allowed in qtdragon 1 = 100%
21+
MAX_FEED_OVERRIDE = 1.2
22+
MIN_SPINDLE_0_OVERRIDE = 0.5
23+
MAX_SPINDLE_0_OVERRIDE = 1.2
24+
25+
# manual spindle speed will start at this RPM
26+
DEFAULT_SPINDLE_0_SPEED = 12000
27+
28+
# spindle up/down increment in RPM
29+
SPINDLE_INCREMENT = 200
30+
31+
# min max apindle speed manually allowed
32+
MIN_SPINDLE_0_SPEED = 1000
33+
MAX_SPINDLE_0_SPEED = 20000
34+
35+
# max spindle power in Watts
36+
MAX_SPINDLE_POWER = 2000
37+
38+
# min/max/default jog velocities in qtdragon in units/sec
39+
MIN_LINEAR_VELOCITY = 0
40+
MAX_LINEAR_VELOCITY = 60.00
41+
DEFAULT_LINEAR_VELOCITY = 50.0
42+
43+
# incremental jog step length options
44+
INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch
45+
46+
CYCLE_TIME = 100
47+
INTRO_GRAPHIC = silver_dragon.png
48+
INTRO_TIME = 2
49+
50+
# default program search path
51+
PROGRAM_PREFIX = ~/linuxcnc/nc_files
52+
53+
# NGCGUI subroutine path.
54+
# Thr path must also be in [RS274NGC] SUBROUTINE_PATH
55+
NGCGUI_SUBFILE_PATH = ../../../nc_files/ngcgui_lib/
56+
# pre selected programs tabs
57+
# specify filenames only, files must be in the NGCGUI_SUBFILE_PATH
58+
NGCGUI_SUBFILE = slot.ngc
59+
NGCGUI_SUBFILE = qpocket.ngc
60+
61+
# qtdragon saves MDI cxommands to this file
62+
MDI_HISTORY_FILE = mdi_history.dat
63+
# qtdragon saves rnning logs to this file
64+
LOG_FILE = qtdragon_hd.log
65+
66+
[MDI_COMMAND_LIST]
67+
# for macro buttons
68+
MDI_COMMAND = G0 Z25 X0 Y0;Z0,Goto\nZero
69+
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0,Goto\nMach\nZero
70+
71+
[FILTER]
72+
# Controls what programs are shown inqtdragon file manager
73+
PROGRAM_EXTENSION = .ngc,.nc,.tap G-Code File (*.ngc,*.nc,*.tap)
74+
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
75+
PROGRAM_EXTENSION = .py Python Script
76+
77+
# specifies what special 'filter' programs runs based on program ending
78+
png = image-to-gcode
79+
gif = image-to-gcode
80+
jpg = image-to-gcode
81+
py = python
82+
83+
[KINS]
84+
KINEMATICS = trivkins coordinates=XYZ
85+
JOINTS = 3
86+
87+
[EMCIO]
88+
EMCIO = io
89+
CYCLE_TIME = 0.100
90+
TOOL_TABLE = tool.tbl
91+
92+
[RS274NGC]
93+
# motion controller saves parameters to this file
94+
PARAMETER_FILE = qtdragon.var
95+
96+
# start up G/M codes when first loaded
97+
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.0127 G80 G90 G94 G97 M5 M9
98+
99+
# subroutine/remap path list
100+
SUBROUTINE_PATH = ../../../../nc_files/probe/basic_probe/macros:~/linuxcnc/nc_files/examples/ngcgui_lib:~/linuxcnc/nc_files/examples/ngcgui_lib/utilitysubs
101+
102+
# on abort, this ngc file is called. required for basic/versa probe
103+
ON_ABORT_COMMAND=O <on_abort> call
104+
105+
[EMCMOT]
106+
EMCMOT = motmod
107+
SERVO_PERIOD = 1000000
108+
COMM_TIMEOUT = 1.0
109+
COMM_WAIT = 0.010
110+
BASE_PERIOD = 100000
111+
112+
[TASK]
113+
TASK = milltask
114+
CYCLE_TIME = 0.010
115+
116+
[TRAJ]
117+
COORDINATES = XYZ
118+
LINEAR_UNITS = metric
119+
ANGULAR_UNITS = degree
120+
MAX_LINEAR_VELOCITY = 60.00
121+
DEFAULT_LINEAR_VELOCITY = 50.00
122+
SPINDLES = 1
123+
124+
[HAL]
125+
HALUI = halui
126+
HALFILE = core_sim.hal
127+
HALFILE = simulated_home.hal
128+
# this file is loaded after qtdragon has made it's HAl pins
129+
# you can add mutiple entries
130+
POSTGUI_HALFILE = qtdragon_hd_postgui.hal
131+
132+
# this command is run after qtdragon has made it's HAl pins
133+
# any HAL conmmand can be used
134+
# you can add mutiple entries
135+
# uncomment this one to print all HAL pins that start with qt
136+
#POSTGUI_HALCMD = show pin qt
137+
# uncomment to simulate probing
138+
#POSTGUI_HALCMD = loadusr qtvcp test_probe
139+
140+
[HALUI]
141+
# no content
142+
143+
[PROBE]
144+
# pick basic probe or versa probe or remove for none
145+
#USE_PROBE = versaprobe
146+
USE_PROBE = basicprobe
147+
148+
[AXIS_X]
149+
MIN_LIMIT = -0.001
150+
MAX_LIMIT = 520.0
151+
MAX_VELOCITY = 60.0
152+
MAX_ACCELERATION = 500.0
153+
154+
[AXIS_Y]
155+
MIN_LIMIT = -0.001
156+
MAX_LIMIT = 630.0
157+
MAX_VELOCITY = 60.0
158+
MAX_ACCELERATION = 500.0
159+
160+
[AXIS_Z]
161+
# used by external offsets for auto spindle lift and auto leveling
162+
OFFSET_AV_RATIO = 0.2
163+
MIN_LIMIT = -115.0
164+
MAX_LIMIT = 10.0
165+
MAX_VELOCITY = 40.0
166+
MAX_ACCELERATION = 500.0
167+
168+
[JOINT_0]
169+
AXIS = X
170+
MIN_LIMIT = -0.001
171+
MAX_LIMIT = 520.0
172+
MAX_VELOCITY = 60.0
173+
MAX_ACCELERATION = 500.0
174+
TYPE = LINEAR
175+
SCALE = 160.0
176+
STEPGEN_MAX_VEL = 72.0
177+
STEPGEN_MAX_ACC = 600.0
178+
FERROR = 1.0
179+
MIN_FERROR = 0.5
180+
MAX_OUTPUT = 0
181+
MAX_ERROR = 0.0127
182+
HOME = 20.0
183+
HOME_OFFSET = 0.00000
184+
HOME_SEARCH_VEL = 20.000000
185+
HOME_LATCH_VEL = 10.000
186+
HOME_SEQUENCE = 1
187+
HOME_USE_INDEX = False
188+
HOME_IGNORE_LIMITS = False
189+
HOME_IS_SHARED = 1
190+
191+
[JOINT_1]
192+
AXIS = Y
193+
MIN_LIMIT = -0.001
194+
MAX_LIMIT = 630.0
195+
MAX_VELOCITY = 60.0
196+
MAX_ACCELERATION = 500.0
197+
TYPE = LINEAR
198+
SCALE = 160.0
199+
STEPGEN_MAX_VEL = 72.0
200+
STEPGEN_MAX_ACC = 600.0
201+
FERROR = 1.0
202+
MIN_FERROR = 0.5
203+
MAX_OUTPUT = 0
204+
MAX_ERROR = 0.0127
205+
HOME = 20.0
206+
HOME_OFFSET = 0.000000
207+
HOME_SEARCH_VEL = 20.00
208+
HOME_LATCH_VEL = 10.00
209+
HOME_SEQUENCE = 2
210+
HOME_USE_INDEX = False
211+
HOME_IGNORE_LIMITS = False
212+
213+
[JOINT_2]
214+
AXIS = Z
215+
MIN_LIMIT = -115.0
216+
MAX_LIMIT = 10.0
217+
MAX_VELOCITY = 40.0
218+
MAX_ACCELERATION = 500.0
219+
TYPE = LINEAR
220+
SCALE = 160.0
221+
STEPGEN_MAX_VEL = 48.0
222+
STEPGEN_MAX_ACC = 600.0
223+
FERROR = 1.0
224+
MIN_FERROR = 0.5
225+
MAX_OUTPUT = 0
226+
MAX_ERROR = 0.0127
227+
HOME = -10.0
228+
HOME_OFFSET = 0.000000
229+
HOME_SEARCH_VEL = 20.000000
230+
HOME_LATCH_VEL = 10.00
231+
HOME_SEQUENCE = 0
232+
HOME_USE_INDEX = False
233+
HOME_IGNORE_LIMITS = False
234+
HOME_IS_SHARED = 1
235+
39.2 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
T1 P1 X0 Y0 Z0.51100 A0 B0 C0 U0 V0 W0 D10.00000 I0 J0 Q0 ;1/8 end mill
2+
T2 P2 X0 Y0 Z0.10000 A0 B0 C0 U0 V0 W0 D0.06250 I0 J0 Q0 ;1/16 end mill
3+
T3 P3 X0 Y0 Z1.27300 A0 B0 C0 U0 V0 W0 D0.20100 I0 J0 Q0 ;#7 tap drill
4+
T4 P4 X0 Y0 Z3.00000 A0 B0 C0 U0 V0 W0 D4.00000 I0 J0 Q0 ;4" Face Mill

0 commit comments

Comments
 (0)