Import LinuxCNC source tree
This commit is contained in:
3
configs/sim/gscreen/industrial_lathe_wear/README
Normal file
3
configs/sim/gscreen/industrial_lathe_wear/README
Normal file
@@ -0,0 +1,3 @@
|
||||
This is Gscreen's industrial screen combined with a remap to add lathe wear offsets and change tools without m6
|
||||
t101 gives tool 1 with offset 1. Offset 1 is in the toolfile as tool 10001.
|
||||
t201 gives tool 2 with offset 1. Offset 1 is in the toolfile as tool 10001.
|
||||
@@ -0,0 +1,110 @@
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = LinuxCNC-HAL-SIM-AXIS
|
||||
DEBUG = 0
|
||||
|
||||
[DISPLAY]
|
||||
DISPLAY = gscreen -c industrial
|
||||
LATHE = 1
|
||||
OPEN_FILE = ""
|
||||
CYCLE_TIME = 0.100
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
MAX_LINEAR_VELOCITY = 1.2
|
||||
DEFAULT_LINEAR_VELOCITY = .25
|
||||
PROGRAM_PREFIX = ../../nc_files/
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
#EDITOR = geany
|
||||
INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in
|
||||
|
||||
[FILTER]
|
||||
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
|
||||
PROGRAM_EXTENSION = .py Python Script
|
||||
png = image-to-gcode
|
||||
gif = image-to-gcode
|
||||
jpg = image-to-gcode
|
||||
py = python3
|
||||
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH = ./:../
|
||||
REMAP = T prolog=get_T_number ngc=toolchange
|
||||
PARAMETER_FILE = sim.var
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
BASE_PERIOD = 0
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE = lathe_postgui.hal
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Z
|
||||
LINEAR_UNITS = inch
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 1.2
|
||||
MAX_LINEAR_VELOCITY = 2.4
|
||||
POSITION_FILE = position.txt
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = lathe-fanucy.tbl
|
||||
TOOL_CHANGE_WITH_SPINDLE_ON = 1
|
||||
|
||||
[PYTHON]
|
||||
# where to find Python code
|
||||
# code specific for this configuration
|
||||
PATH_PREPEND= ./
|
||||
# generic support code
|
||||
PATH_APPEND= ../../nc_files/remap_lib/python-stdglue/
|
||||
|
||||
# import the following Python module
|
||||
TOPLEVEL= toplevel.py
|
||||
|
||||
# the higher the more verbose tracing of the Python plugin
|
||||
LOG_LEVEL = 0
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins coordinates=xz
|
||||
JOINTS = 2
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
MAX_VELOCITY = 4
|
||||
MAX_ACCELERATION = 100.0
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -8.0
|
||||
MAX_LIMIT = 0.0001
|
||||
MAX_VELOCITY = 4
|
||||
MAX_ACCELERATION = 100.0
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 4
|
||||
MAX_ACCELERATION = 100.0
|
||||
MIN_LIMIT = -40.0
|
||||
MAX_LIMIT = 40.0
|
||||
HOME_SEARCH_VEL = 20.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
MAX_VELOCITY = 4
|
||||
MAX_ACCELERATION = 100.0
|
||||
MIN_LIMIT = -8.0
|
||||
MAX_LIMIT = 0.0001
|
||||
HOME_SEARCH_VEL = 20.0
|
||||
HOME_LATCH_VEL = 20.0
|
||||
HOME_SEQUENCE = 0
|
||||
10
configs/sim/gscreen/industrial_lathe_wear/lathe-fanucy.tbl
Normal file
10
configs/sim/gscreen/industrial_lathe_wear/lathe-fanucy.tbl
Normal file
@@ -0,0 +1,10 @@
|
||||
T1 P11 X0.1 Z0.1 D0.1 I95.000000 J155.000000 Q1
|
||||
T2 P22 X0.2 Z0.2 D0.1 I85.000000 J25.000000 Q2
|
||||
T10001 P3 X0.001 Z0.001 D0.1 I275.000000 J335.000000 Q3
|
||||
T10002 P4 X0.002 Z0.002 D0.1 I265.000000 J205.000000 Q4
|
||||
T5 P5 D0.1 I210.000000 J150.000000 Q5
|
||||
T6 P6 X0.5 Z0.5 D0.1 I120.000000 J60.000000 Q6
|
||||
T7 P7 D0.1 I-30.000000 J30.000000 Q7
|
||||
T8 P8 D0.1 I240.000000 J300.000000 Q8
|
||||
T9 P9 D0.1 Q9
|
||||
T10 P10 D0 ;demo zero diameter
|
||||
@@ -0,0 +1,3 @@
|
||||
net spindle-speed-limited gscreen.spindle-readout-in
|
||||
net spindle-at-speed gscreen.spindle-at-speed
|
||||
|
||||
33
configs/sim/gscreen/industrial_lathe_wear/remap.py
Normal file
33
configs/sim/gscreen/industrial_lathe_wear/remap.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2014 Andy Pugh <andy@bodgesoc.org>, Chris Radek
|
||||
# <chris@timeguy.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
from stdglue import *
|
||||
|
||||
# Extract the T number into a parameter, but don't try anything else clever
|
||||
|
||||
def get_T_number(self,**words):
|
||||
try:
|
||||
cblock = self.blocks[self.remap_level]
|
||||
if not cblock.t_flag:
|
||||
self.set_errormsg("T requires a tool number")
|
||||
return INTERP_ERROR
|
||||
self.params["tool"] = cblock.t_number
|
||||
return INTERP_OK
|
||||
except Exception as e:
|
||||
self.set_errormsg("T%d/prepare_prolog: %s" % (int(words['t']), e))
|
||||
return INTERP_ERROR
|
||||
16
configs/sim/gscreen/industrial_lathe_wear/toolchange.ngc
Normal file
16
configs/sim/gscreen/industrial_lathe_wear/toolchange.ngc
Normal file
@@ -0,0 +1,16 @@
|
||||
O<toolchange> sub
|
||||
(debug, Tool requested = #<tool>)
|
||||
O100 IF [#<tool> LT 100]
|
||||
#<tool> = [#<tool> * 100]
|
||||
O100 ENDIF
|
||||
#<toolnum> = [FIX[ #<tool> / 100]]
|
||||
#<wear> = [10000 + #<tool> MOD 100]
|
||||
M6 T#<toolnum>
|
||||
G43 H#<toolnum>
|
||||
O101 IF [#<wear> GT 10000]
|
||||
(debug, wear applied)
|
||||
G43.2 H#<wear>
|
||||
O101 ENDIF
|
||||
#<pocket> = #<toolnum>
|
||||
(debug, tool = #<toolnum> wear = #<wear>)
|
||||
O<toolchange> endsub [0]
|
||||
21
configs/sim/gscreen/industrial_lathe_wear/toplevel.py
Normal file
21
configs/sim/gscreen/industrial_lathe_wear/toplevel.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2011, 2014 Andy Pugh <andy@bodgesoc.org>, Michael Haberler
|
||||
# <git@mah.priv.at>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
import remap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user