Import LinuxCNC source tree
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Example for a manual toolchanger with automatic tool length probe after change
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
net tool-change motion.digital-out-00 gladevcp.change-led
|
||||
net tool-changed gladevcp.changed motion.digital-in-00
|
||||
net toolno motion.analog-out-00 gladevcp.number
|
||||
|
||||
|
||||
net probing motion.digital-out-01 gladevcp.probing-led
|
||||
net enable motion.digital-out-02 gladevcp.enable
|
||||
net probe-contact gladevcp.probe-contact motion.probe-input
|
||||
net reftool gladevcp.reftool motion.digital-in-01
|
||||
|
||||
net reflen motion.analog-out-01 gladevcp.reflen
|
||||
net currlen motion.analog-out-02 gladevcp.currlen
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gladevcp 0.0 -->
|
||||
<!-- interface-requires gladevcp 0.0 -->
|
||||
<!-- interface-requires gtk+ 2.12 -->
|
||||
<!-- interface-naming-policy project-wide -->
|
||||
<widget class="GtkWindow" id="window1">
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="HAL_Table" id="enable">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">6</property>
|
||||
<property name="n_columns">2</property>
|
||||
<child>
|
||||
<widget class="HAL_Button" id="changed">
|
||||
<property name="label" translatable="yes">Change complete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_ToggleButton" id="reftool">
|
||||
<property name="label" translatable="yes">Reference Tool</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">probing:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_LED" id="probing-led">
|
||||
<property name="visible">True</property>
|
||||
<property name="pick_color_on">#1525ffff4fdc</property>
|
||||
<property name="led_shape">2</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_LED" id="change-led">
|
||||
<property name="visible">True</property>
|
||||
<property name="pick_color_on">#fffff232127d</property>
|
||||
<property name="led_shape">2</property>
|
||||
<signal name="hal_pin_changed" handler="on_led_change"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="change-text">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_Button" id="probe-contact">
|
||||
<property name="label" translatable="yes">Simulate probe
|
||||
contact</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_Label" id="reflen">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="label_pin_type">1</property>
|
||||
<property name="text_template">Reference Z length: %f</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="y_padding">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="HAL_Label" id="currlen">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="label_pin_type">1</property>
|
||||
<property name="text_template">Current Z length: %f</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="y_padding">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
@@ -0,0 +1,8 @@
|
||||
# in case they were linked already
|
||||
unlinkp iocontrol.0.tool-change
|
||||
unlinkp iocontrol.0.tool-changed
|
||||
|
||||
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||
|
||||
# rest is in gladevcp.hal
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
[EMC]
|
||||
VERSION = 1.1
|
||||
MACHINE = manualtoolchange.ini
|
||||
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
|
||||
DEBUG = 0
|
||||
|
||||
[DISPLAY]
|
||||
DISPLAY = axis
|
||||
GLADEVCP= -c gladevcp -u python/gladevcp-handler.py manualtoolchange.ui
|
||||
OPEN_FILE= ./nc_files/tcdemo.ngc
|
||||
CYCLE_TIME = 0.100
|
||||
HELP_FILE = doc/help.txt
|
||||
POSITION_OFFSET = RELATIVE
|
||||
POSITION_FEEDBACK = ACTUAL
|
||||
MAX_FEED_OVERRIDE = 1.2
|
||||
MAX_SPINDLE_OVERRIDE = 1.0
|
||||
PROGRAM_PREFIX = ../../nc_files/
|
||||
INTRO_GRAPHIC = linuxcnc.gif
|
||||
INTRO_TIME = 5
|
||||
#EDITOR = geany
|
||||
INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 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]
|
||||
PARAMETER_FILE = sim_mm.var
|
||||
SUBROUTINE_PATH = nc_subroutines:../../nc_files/remap_lib/common_nc_subs
|
||||
LOG_LEVEL = 9
|
||||
|
||||
ON_ABORT_COMMAND= O <on_abort> call
|
||||
|
||||
# ------ remapping toolchange - related codes ----------------------
|
||||
#
|
||||
# see python/remap.py for the prolog and epilog handlers
|
||||
# see nc_files/remap-subroutines for the NGC procedures
|
||||
#
|
||||
# the prepare_min.ngc and change_min.ngc are templates - fill in as needed
|
||||
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=manual_change epilog=change_epilog
|
||||
|
||||
|
||||
# accessible in interp as #<_[section]name>
|
||||
|
||||
[EMCMOT]
|
||||
EMCMOT = motmod
|
||||
COMM_TIMEOUT = 1.0
|
||||
SERVO_PERIOD = 1000000
|
||||
|
||||
[TASK]
|
||||
TASK = milltask
|
||||
CYCLE_TIME = 0.001
|
||||
|
||||
[HAL]
|
||||
HALUI = halui
|
||||
HALFILE = LIB:basic_sim.tcl
|
||||
POSTGUI_HALFILE= gladevcp.hal
|
||||
|
||||
[TRAJ]
|
||||
COORDINATES = X Y Z
|
||||
LINEAR_UNITS = mm
|
||||
ANGULAR_UNITS = degree
|
||||
DEFAULT_LINEAR_VELOCITY = 30.48
|
||||
MAX_LINEAR_VELOCITY = 53.34
|
||||
DEFAULT_LINEAR_ACCELERATION = 508
|
||||
MAX_LINEAR_ACCELERATION = 508
|
||||
POSITION_FILE = position_mm.txt
|
||||
NO_FORCE_HOMING = 1
|
||||
|
||||
[EMCIO]
|
||||
TOOL_TABLE = tool.tbl
|
||||
|
||||
[KINS]
|
||||
KINEMATICS = trivkins
|
||||
JOINTS = 3
|
||||
|
||||
[AXIS_X]
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_0]
|
||||
TYPE = LINEAR
|
||||
HOME = 0.000
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Y]
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_1]
|
||||
TYPE = LINEAR
|
||||
HOME = 0.000
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -254
|
||||
MAX_LIMIT = 254
|
||||
HOME_OFFSET = 0.0
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 1
|
||||
|
||||
[AXIS_Z]
|
||||
MIN_LIMIT = -50.8
|
||||
MAX_LIMIT = 101.6
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
|
||||
[JOINT_2]
|
||||
TYPE = LINEAR
|
||||
HOME = 0.0
|
||||
MAX_VELOCITY = 30.48
|
||||
MAX_ACCELERATION = 508
|
||||
MIN_LIMIT = -50.8
|
||||
MAX_LIMIT = 101.6
|
||||
HOME_OFFSET = 25.4
|
||||
HOME_SEARCH_VEL = 127
|
||||
HOME_LATCH_VEL = 25.4
|
||||
HOME_SEQUENCE = 0
|
||||
|
||||
[PYTHON]
|
||||
# where to find Python code
|
||||
# code specific for this configuration
|
||||
PATH_PREPEND= ./python
|
||||
# generic support code
|
||||
PATH_APPEND= ../../nc_files/remap_lib/python-stdglue
|
||||
|
||||
# import the following Python module
|
||||
TOPLEVEL= python/toplevel.py
|
||||
|
||||
# the higher the more verbose tracing of the Python plugin
|
||||
LOG_LEVEL = 0
|
||||
|
||||
# Part program interpreter section --------------------------------------------
|
||||
[TOOLSENSOR]
|
||||
X = 10
|
||||
Y = 10
|
||||
Z = 10
|
||||
# abort change if no toolsensor contact after this probe distance
|
||||
MAXPROBE= -10
|
||||
PROBEFEED= 50
|
||||
|
||||
# this is not named TOOL_CHANGE_POSITION on purpose - canon uses it and will
|
||||
# interfere
|
||||
[CHANGE_POSITION]
|
||||
X = 10
|
||||
Y = 20
|
||||
Z = 30
|
||||
|
||||
# motion.digital-in/out-NN pins
|
||||
[PINS]
|
||||
# motion.digital-out-00
|
||||
CHANGE = 0
|
||||
# motion.digital-out-01
|
||||
PROBING = 1
|
||||
# motion.digital-out-02
|
||||
ENABLE = 2
|
||||
|
||||
# motion.digital-in-00
|
||||
CHANGED = 0
|
||||
# motion.digital-in-01
|
||||
REFTOOL = 1
|
||||
|
||||
# motion.analog-out-00
|
||||
TOOLNO = 0
|
||||
# motion.analog-out-01
|
||||
REFLEN = 1
|
||||
# motion.analog-out-02
|
||||
CURRLEN = 2
|
||||
|
||||
[DWELL]
|
||||
# timeout the change after 2 minutes
|
||||
ACK_SECS= 120
|
||||
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.40.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<requires lib="gladevcp" version="0.0"/>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-bottom">8</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">5</property>
|
||||
<property name="label" translatable="yes">Manual Toolchange
|
||||
with Probing</property>
|
||||
<attributes>
|
||||
<attribute name="font-desc" value="Sans Bold 12"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=1 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="HAL_LED" id="change-led">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-left">20</property>
|
||||
<property name="led-blink-rate">0</property>
|
||||
<property name="led-shape">2</property>
|
||||
<property name="off-color">black</property>
|
||||
<property name="on-color">orange</property>
|
||||
<property name="pick-color-off">#000000000000</property>
|
||||
<property name="pick-color-on">#c6c646460000</property>
|
||||
<signal name="hal-pin-changed" handler="on_led_change" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="change-text">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-left">10</property>
|
||||
<property name="xpad">5</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=1 n-rows=3 -->
|
||||
<object class="HAL_Table" id="enable">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<!-- n-columns=1 n-rows=2 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="row-spacing">5</property>
|
||||
<child>
|
||||
<object class="HAL_ToggleButton" id="reftool">
|
||||
<property name="label" translatable="yes">Reference Tool</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="margin-right">25</property>
|
||||
<property name="image-position">top</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HAL_Button" id="changed">
|
||||
<property name="label" translatable="yes">Tool change complete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="margin-right">25</property>
|
||||
<property name="image-position">top</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-left">5</property>
|
||||
<property name="margin-right">5</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="left-padding">12</property>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=3 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="HAL_LED" id="probing-led">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-right">10</property>
|
||||
<property name="led-blink-rate">5</property>
|
||||
<property name="led-shape">2</property>
|
||||
<property name="off-color">black</property>
|
||||
<property name="pick-color-off"/>
|
||||
<property name="pick-color-on">#1525ffff4fdc</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HAL_Button" id="probe-contact">
|
||||
<property name="label" translatable="yes">Simulate probe contact</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="margin-right">5</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HAL_Label" id="currlen">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="label-pin-type">1</property>
|
||||
<property name="text-template">Current Z length: %f</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HAL_Label" id="reflen">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="label-pin-type">1</property>
|
||||
<property name="text-template">Reference Z length: %f</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="ypad">3</property>
|
||||
<property name="label" translatable="yes">Tool probe</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,143 @@
|
||||
G20
|
||||
T1 M6
|
||||
|
||||
|
||||
(font: /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf)
|
||||
(text: t1)
|
||||
#1=0.1 (SafeHeight)
|
||||
#2=0.01 (Depth of Cut)
|
||||
#3=0.000300 (XY Scale)
|
||||
#4=10.0 (Feed)
|
||||
#5=1.0 (X offset)
|
||||
#6=1.0 (Y offset)
|
||||
; (start of symbol t)
|
||||
; (starting X offset: 0)
|
||||
; G00 Z #1
|
||||
; G00 X [1151*#3+#5] Y [1839*#3+#6] (moveto)
|
||||
; G01 Z [0-#2] F#4
|
||||
; G01 X [1151*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [811*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [676*#3+#5] Y [1184*#3+#6] (lineto)
|
||||
; G5.1 X[455*#3+#5] Y[311*#3+#6] I[-221*#3] J[-791*#3]
|
||||
; G5.1 X[475*#3+#5] Y[270*#3+#6] I[0*#3] J[-20*#3]
|
||||
; G5.1 X[520*#3+#5] Y[250*#3+#6] I[21*#3] J[-20*#3]
|
||||
; G5.1 X[831*#3+#5] Y[578*#3+#6] I[103*#3] J[0*#3]
|
||||
; G01 X [922*#3+#5] Y [520*#3+#6] (lineto)
|
||||
; G5.1 X[571*#3+#5] Y[84*#3+#6] I[-205*#3] J[-315*#3]
|
||||
; G5.1 X[242*#3+#5] Y[-37*#3+#6] I[-145*#3] J[-121*#3]
|
||||
; G5.1 X[35*#3+#5] Y[37*#3+#6] I[-127*#3] J[0*#3]
|
||||
; G5.1 X[-45*#3+#5] Y[229*#3+#6] I[-80*#3] J[74*#3]
|
||||
; G5.1 X[53*#3+#5] Y[692*#3+#6] I[0*#3] J[127*#3]
|
||||
; G01 X [332*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [123*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [123*#3+#5] Y [1810*#3+#6] (lineto)
|
||||
; G5.1 X[537*#3+#5] Y[2044*#3+#6] I[242*#3] J[95*#3]
|
||||
; G5.1 X[872*#3+#5] Y[2433*#3+#6] I[172*#3] J[139*#3]
|
||||
; G01 X [1016*#3+#5] Y [2433*#3+#6] (lineto)
|
||||
; G01 X [856*#3+#5] Y [1839*#3+#6] (lineto)
|
||||
; G01 X [1151*#3+#5] Y [1839*#3+#6] (lineto)
|
||||
(symbol extents: X = 123 to 1151, Y = 520 to 2433)
|
||||
(symbol advance: X = 1139, Y = 0)
|
||||
(start of symbol 1)
|
||||
(starting X offset: 1139)
|
||||
G00 Z #1
|
||||
G00 X [1159*#3+#5] Y [0*#3+#6] (moveto)
|
||||
G01 Z [0-#2] F#4
|
||||
G01 X [1159*#3+#5] Y [94*#3+#6] (lineto)
|
||||
G5.1 X[1491*#3+#5] Y[161*#3+#6] I[222*#3] J[0*#3]
|
||||
G5.1 X[1647*#3+#5] Y[397*#3+#6] I[111*#3] J[68*#3]
|
||||
G01 X [2171*#3+#5] Y [2277*#3+#6] (lineto)
|
||||
G5.1 X[2188*#3+#5] Y[2376*#3+#6] I[17*#3] J[74*#3]
|
||||
G5.1 X[1999*#3+#5] Y[2511*#3+#6] I[0*#3] J[135*#3]
|
||||
G5.1 X[1741*#3+#5] Y[2490*#3+#6] I[-119*#3] J[0*#3]
|
||||
G01 X [1749*#3+#5] Y [2585*#3+#6] (lineto)
|
||||
G5.1 X[2855*#3+#5] Y[2798*#3+#6] I[570*#3] J[81*#3]
|
||||
G01 X [2224*#3+#5] Y [504*#3+#6] (lineto)
|
||||
G5.1 X[2175*#3+#5] Y[283*#3+#6] I[-49*#3] J[-180*#3]
|
||||
G5.1 X[2253*#3+#5] Y[133*#3+#6] I[0*#3] J[-115*#3]
|
||||
G5.1 X[2573*#3+#5] Y[94*#3+#6] I[78*#3] J[-35*#3]
|
||||
G01 X [2573*#3+#5] Y [0*#3+#6] (lineto)
|
||||
G01 X [1159*#3+#5] Y [0*#3+#6] (lineto)
|
||||
(symbol extents: X = 1159 to 2573, Y = 0 to 2585)
|
||||
(symbol advance: X = 2048, Y = 0)
|
||||
(final X offset: 3187)
|
||||
(overall extents: X = 123 to 2573, Y = 0 to 2585)
|
||||
G00 Z #1
|
||||
|
||||
T3 M6
|
||||
|
||||
(font: /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf)
|
||||
(text: t3)
|
||||
|
||||
#5=2.0 (X offset)
|
||||
#6=1.0 (Y offset)
|
||||
(start of symbol t)
|
||||
; (starting X offset: 0)
|
||||
; G00 Z #1
|
||||
; G00 X [1151*#3+#5] Y [1839*#3+#6] (moveto)
|
||||
; G01 Z [0-#2] F#4
|
||||
; G01 X [1151*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [811*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [676*#3+#5] Y [1184*#3+#6] (lineto)
|
||||
; G5.1 X[455*#3+#5] Y[311*#3+#6] I[-221*#3] J[-791*#3]
|
||||
; G5.1 X[475*#3+#5] Y[270*#3+#6] I[0*#3] J[-20*#3]
|
||||
; G5.1 X[520*#3+#5] Y[250*#3+#6] I[21*#3] J[-20*#3]
|
||||
; G5.1 X[831*#3+#5] Y[578*#3+#6] I[103*#3] J[0*#3]
|
||||
; G01 X [922*#3+#5] Y [520*#3+#6] (lineto)
|
||||
; G5.1 X[571*#3+#5] Y[84*#3+#6] I[-205*#3] J[-315*#3]
|
||||
; G5.1 X[242*#3+#5] Y[-37*#3+#6] I[-145*#3] J[-121*#3]
|
||||
; G5.1 X[35*#3+#5] Y[37*#3+#6] I[-127*#3] J[0*#3]
|
||||
; G5.1 X[-45*#3+#5] Y[229*#3+#6] I[-80*#3] J[74*#3]
|
||||
; G5.1 X[53*#3+#5] Y[692*#3+#6] I[0*#3] J[127*#3]
|
||||
; G01 X [332*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [123*#3+#5] Y [1667*#3+#6] (lineto)
|
||||
; G01 X [123*#3+#5] Y [1810*#3+#6] (lineto)
|
||||
; G5.1 X[537*#3+#5] Y[2044*#3+#6] I[242*#3] J[95*#3]
|
||||
; G5.1 X[872*#3+#5] Y[2433*#3+#6] I[172*#3] J[139*#3]
|
||||
; G01 X [1016*#3+#5] Y [2433*#3+#6] (lineto)
|
||||
; G01 X [856*#3+#5] Y [1839*#3+#6] (lineto)
|
||||
; G01 X [1151*#3+#5] Y [1839*#3+#6] (lineto)
|
||||
; (symbol extents: X = 123 to 1151, Y = 520 to 2433)
|
||||
; (symbol advance: X = 1139, Y = 0)
|
||||
; (start of symbol 3)
|
||||
; (starting X offset: 1139)
|
||||
G00 Z #1
|
||||
G00 X [2306*#3+#5] Y [774*#3+#6] (moveto)
|
||||
G01 Z [0-#2] F#4
|
||||
G5.1 X[1663*#3+#5] Y[1421*#3+#6] I[0*#3] J[619*#3]
|
||||
G01 X [1680*#3+#5] Y [1511*#3+#6] (lineto)
|
||||
G5.1 X[2265*#3+#5] Y[1747*#3+#6] I[397*#3] J[82*#3]
|
||||
G5.1 X[2454*#3+#5] Y[2138*#3+#6] I[189*#3] J[154*#3]
|
||||
G5.1 X[2357*#3+#5] Y[2406*#3+#6] I[0*#3] J[168*#3]
|
||||
G5.1 X[2097*#3+#5] Y[2507*#3+#6] I[-96*#3] J[101*#3]
|
||||
G5.1 X[1851*#3+#5] Y[2441*#3+#6] I[-143*#3] J[0*#3]
|
||||
G5.1 X[1622*#3+#5] Y[2200*#3+#6] I[-102*#3] J[-65*#3]
|
||||
G01 X [1536*#3+#5] Y [2253*#3+#6] (lineto)
|
||||
G5.1 X[1925*#3+#5] Y[2669*#3+#6] I[193*#3] J[287*#3]
|
||||
G5.1 X[2372*#3+#5] Y[2798*#3+#6] I[197*#3] J[129*#3]
|
||||
G5.1 X[2808*#3+#5] Y[2638*#3+#6] I[262*#3] J[0*#3]
|
||||
G5.1 X[2982*#3+#5] Y[2241*#3+#6] I[174*#3] J[-160*#3]
|
||||
G5.1 X[2544*#3+#5] Y[1651*#3+#6] I[0*#3] J[-373*#3]
|
||||
G01 X [2495*#3+#5] Y [1626*#3+#6] (lineto)
|
||||
G5.1 X[2740*#3+#5] Y[1360*#3+#6] I[176*#3] J[-131*#3]
|
||||
G5.1 X[2810*#3+#5] Y[1024*#3+#6] I[70*#3] J[-135*#3]
|
||||
G5.1 X[2464*#3+#5] Y[260*#3+#6] I[0*#3] J[-451*#3]
|
||||
G5.1 X[1622*#3+#5] Y[-53*#3+#6] I[-346*#3] J[-313*#3]
|
||||
G5.1 X[1225*#3+#5] Y[35*#3+#6] I[-250*#3] J[0*#3]
|
||||
G5.1 X[1078*#3+#5] Y[274*#3+#6] I[-147*#3] J[88*#3]
|
||||
G5.1 X[1145*#3+#5] Y[440*#3+#6] I[0*#3] J[103*#3]
|
||||
G5.1 X[1323*#3+#5] Y[504*#3+#6] I[68*#3] J[64*#3]
|
||||
G5.1 X[1493*#3+#5] Y[442*#3+#6] I[103*#3] J[0*#3]
|
||||
G5.1 X[1591*#3+#5] Y[307*#3+#6] I[68*#3] J[-61*#3]
|
||||
G5.1 X[1689*#3+#5] Y[172*#3+#6] I[31*#3] J[-74*#3]
|
||||
G5.1 X[1856*#3+#5] Y[111*#3+#6] I[68*#3] J[-61*#3]
|
||||
G5.1 X[2175*#3+#5] Y[305*#3+#6] I[188*#3] J[0*#3]
|
||||
G5.1 X[2306*#3+#5] Y[774*#3+#6] I[131*#3] J[195*#3]
|
||||
(symbol extents: X = 1536 to 2495, Y = 774 to 2253)
|
||||
(symbol advance: X = 2048, Y = 0)
|
||||
(final X offset: 3187)
|
||||
(overall extents: X = 123 to 2495, Y = 520 to 2433)
|
||||
G00 Z #1
|
||||
|
||||
|
||||
m2
|
||||
@@ -0,0 +1,95 @@
|
||||
; manual toolchange with automatic tool length probe
|
||||
|
||||
o<manual_change> sub
|
||||
|
||||
(we change feed, metric/in and potentially G90)
|
||||
(so record current modal state)
|
||||
(M73 is not useful here because it reverts G43 on return too)
|
||||
#<metric> = #<_metric>
|
||||
#<absolute> = #<_absolute>
|
||||
#<feed> = #<_feed>
|
||||
|
||||
G21 (TLO and toolchange position is in mm as per ini)
|
||||
G90 (absolute)
|
||||
|
||||
; move to toolchange position: z, then xy
|
||||
g53 g0 Z #<_ini[change_position]z>
|
||||
g53 g0 X #<_ini[change_position]x> Y #<_ini[change_position]y>
|
||||
|
||||
; indicate tool number to be loaded
|
||||
M68 E #<_ini[pins]toolno> Q #<_selected_tool>
|
||||
|
||||
; enable table
|
||||
M64 P #<_ini[pins]enable>
|
||||
|
||||
; signal user to change tool
|
||||
M64 P #<_ini[pins]change>
|
||||
|
||||
; and wait for acknowledgement
|
||||
M66 P #<_ini[pins]changed> L1 Q#<_ini[dwell]ack_secs>
|
||||
M65 P #<_ini[pins]change> ; drop change pin
|
||||
|
||||
|
||||
;see if we timed out
|
||||
O100 if [#5399 EQ -1]
|
||||
M65 P #<_ini[pins]enable> ; disable table
|
||||
O<restore> call [#<metric>] [#<absolute>] [#<feed>]
|
||||
O100 return [-1] ; indicate timeout failure to epilog
|
||||
O100 endif
|
||||
|
||||
O200 if [#<_selected_tool> EQ 0] ; an unload.
|
||||
M65 P #<_ini[pins]enable> ; disable table
|
||||
O<restore> call [#<metric>] [#<absolute>] [#<feed>]
|
||||
O200 return [1] ; indicate success
|
||||
O200 endif
|
||||
|
||||
; tool changed - move to toolensor
|
||||
g53 g0 X #<_ini[toolsensor]x> Y #<_ini[toolsensor]y>
|
||||
g53 g0 Z #<_ini[toolsensor]z>
|
||||
|
||||
; probe tool length
|
||||
M64 P #<_ini[pins]probing> ; turn on probing led
|
||||
|
||||
F #<_ini[toolsensor]probefeed>
|
||||
G91 (relative mode)
|
||||
G38.3 Z #<_ini[toolsensor]maxprobe>
|
||||
|
||||
; we must execute this only in the milltask interpreter
|
||||
; or preview will break, so test for '#<_task>' which is 1 for
|
||||
; the milltask interpreter and 0 in the UI's
|
||||
|
||||
O300 if [[#<_task> GT 0] and [#5070 EQ 0]]
|
||||
O<restore> call [#<metric>] [#<absolute>] [#<feed>]
|
||||
O300 return [-2] ; indicate probe contact failure to epilog
|
||||
O300 endif
|
||||
|
||||
|
||||
; see whether this was the reference tool:
|
||||
M66 P #<_ini[pins]reftool> L0
|
||||
|
||||
O400 if [#5399 EQ 1]
|
||||
#1000=#5063 (save reference tool length)
|
||||
M68 E #<_ini[pins]reflen> Q #1000
|
||||
(print,reference length is #1000)
|
||||
O400 else
|
||||
g43.1 z[#5063-#1000] (set new tool offset)
|
||||
M68 E #<_ini[pins]currlen> Q [#5063-#1000]
|
||||
(print,new length is #5063)
|
||||
O400 endif
|
||||
|
||||
M65 P #<_ini[pins]probing> ; drop probing led
|
||||
M65 P #<_ini[pins]enable> ; disable table
|
||||
|
||||
G90 (absolute)
|
||||
|
||||
|
||||
; move back to toolchange position: z, then xy
|
||||
g53 g0 Z #<_ini[change_position]z>
|
||||
g53 g0 X #<_ini[change_position]x> Y #<_ini[change_position]y>
|
||||
|
||||
; restore g20/21, g90/g91, feed
|
||||
O<restore> call [#<metric>] [#<absolute>] [#<feed>]
|
||||
|
||||
; succeed by returning a positive value
|
||||
o<manual_change> endsub [1]
|
||||
m2
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
o<on_abort> sub
|
||||
|
||||
(print, on_abort executing)
|
||||
|
||||
M65 P #<_ini[pins]change> ; drop change pin
|
||||
M65 P #<_ini[pins]probing> ; drop probing led
|
||||
|
||||
o<reset_state> call
|
||||
|
||||
o<on_abort> endsub
|
||||
m2
|
||||
@@ -0,0 +1,26 @@
|
||||
; restore metric/inch absolute/relative, feed as per parameter values
|
||||
; call as 'O<restore> call [originalmetric] [originalabs] [originalfeed]
|
||||
;
|
||||
O<restore> sub
|
||||
O100 if [#1 NE #<_metric>]
|
||||
O200 if [#1]
|
||||
G21
|
||||
O200 else
|
||||
G20
|
||||
O200 endif
|
||||
O100 endif
|
||||
|
||||
O300 if [#2 NE #<_absolute>]
|
||||
O400 if [#2]
|
||||
G90
|
||||
O400 else
|
||||
G91
|
||||
O400 endif
|
||||
O300 endif
|
||||
|
||||
O500 if [#3 NE #<_feed>]
|
||||
F[#3]
|
||||
O500 endif
|
||||
|
||||
O<restore> endsub
|
||||
m2
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import hal
|
||||
|
||||
class HandlerClass:
|
||||
|
||||
def on_led_change(self,hal_led,data=None):
|
||||
'''
|
||||
the gladevcp.change led had a transition
|
||||
'''
|
||||
if hal_led.hal_pin.get():
|
||||
if self.halcomp["number"] > 0.0:
|
||||
self.change_text.set_label("Insert tool number %d" % (int(self.halcomp["number"])))
|
||||
else:
|
||||
self.change_text.set_label("Remove tool")
|
||||
else:
|
||||
self.change_text.set_label("No change requested")
|
||||
|
||||
def __init__(self, halcomp,builder,useropts):
|
||||
self.halcomp = halcomp
|
||||
self.change_text = builder.get_object("change-text")
|
||||
self.halcomp.newpin("number", hal.HAL_FLOAT, hal.HAL_IN)
|
||||
|
||||
def get_handlers(halcomp,builder,useropts):
|
||||
return [HandlerClass(halcomp,builder,useropts)]
|
||||
@@ -0,0 +1,19 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2011, 2012, 2013 Dewey Garrett <dgarrett@panix.com>,
|
||||
# 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.
|
||||
#
|
||||
from stdglue import *
|
||||
@@ -0,0 +1,20 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2011, 2013 Dewey Garrett <dgarrett@panix.com>, 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
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
T1 P1 Z1.1 D3 ;3mm end mill
|
||||
T2 P2 Z2.2 D1.5 ;1.5mm end mill
|
||||
T3 P5 Z3.3 D5 ;5mm tap drill
|
||||
T4 P3 Z4.4 D16 ;16 mm mill
|
||||
T5 P6 Z5.5 D25 ;25mm mill
|
||||
T6 P4 Z6.6 D1 ;1mm drill
|
||||
T7 P7 Z7.7 D2.5
|
||||
Reference in New Issue
Block a user