Working linuxcnc lathe config with 2 ms cycle time
This commit is contained in:
165
linuxcnc/Turner.2ms/#lathe_macros.ini#
Normal file
165
linuxcnc/Turner.2ms/#lathe_macros.ini#
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = gmoccapy_lathe
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
EMBED_TAB_NAME = Cycles
|
||||||
|
EMBED_TAB_LOCATION = ntb_preview
|
||||||
|
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||||
|
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros:./
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
#POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
3057
linuxcnc/Turner.2ms/LatheMacro.svg
Normal file
3057
linuxcnc/Turner.2ms/LatheMacro.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 4.8 MiB |
72
linuxcnc/Turner.2ms/README
Normal file
72
linuxcnc/Turner.2ms/README
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
This folder contains a number of simulated lathe configs.
|
||||||
|
|
||||||
|
the "lathemacro" config offers a number of simple macros to perform
|
||||||
|
the most common lathe operations.
|
||||||
|
|
||||||
|
The GUI that controls the macros can be viewed by clicking the "Cycles"
|
||||||
|
tab top left of the graphical preview window.
|
||||||
|
|
||||||
|
There are two load-time options to control the tab behaviour:
|
||||||
|
1) norun will hide the action button, use this if you want to use only
|
||||||
|
a physical button (connected to gladevcp.cycle-start) to start the macros
|
||||||
|
(Strongly recommended, especially with Touchy)
|
||||||
|
2) notouch will allow keyboard editing of the spinboxes. Otherwise the
|
||||||
|
custom numeric keyboard will be shown.
|
||||||
|
|
||||||
|
An example loadrt line, as used here in the Gmoccapy demo is:
|
||||||
|
|
||||||
|
[DISPLAY]
|
||||||
|
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||||
|
|
||||||
|
The window will resize slowly if you grab the corner and move the mouse
|
||||||
|
inside the window. It's not as bad as it was, but still needs work.
|
||||||
|
You may need to click the unmaximise button in the toolbar to get a
|
||||||
|
window border to be able to use the resize handles.
|
||||||
|
|
||||||
|
Notes on the keyboard:
|
||||||
|
As well as the obvious functions and unit conversions, it can be used to
|
||||||
|
enter fractions. For example if you type 1.1/2 it will automatically
|
||||||
|
update to display 1.5000 and 16.17/64 will show 16.2656.
|
||||||
|
This can be used in a limited way to halve the onscreen value eg for
|
||||||
|
entering radius instead of diameter.
|
||||||
|
However it only works for whole numbers: 100/2 will become 50 but
|
||||||
|
3.14149/2 is interpreted as 3 and 14 thousand halves so won't work.
|
||||||
|
|
||||||
|
Notes on adding your own cycles:
|
||||||
|
Create a new G-code subroutine in the same format as the existing ones.
|
||||||
|
In Glade add a new tab to the 'tabs1' notebook and give it a name matching
|
||||||
|
the new cycle.
|
||||||
|
Edit the action button (inside an eventbox) to call the new G-code sub.
|
||||||
|
Rename the action button to match the tab name and append '.action' eg
|
||||||
|
MyCycle.action
|
||||||
|
|
||||||
|
Create new artwork. I used Fusion360, the models are here:
|
||||||
|
https://a360.co/3uFPZNv
|
||||||
|
and the drawings are here:
|
||||||
|
https://a360.co/3uFPZNv
|
||||||
|
Esport the drawing page as PDF and import into the lathemacro.svg file in
|
||||||
|
Inkscape. You will need to resize. Add your own arrows and annotations.
|
||||||
|
|
||||||
|
Save the new layer in a layer named "layerN" (lower case) where N is the
|
||||||
|
tab number, starting at zero. You will need to invoke the XML editor for
|
||||||
|
this (Shift-Cmd-X on Mac)
|
||||||
|
|
||||||
|
The entry boxes are positioned relative to a 1500 x 1000 image; the
|
||||||
|
original size of the SVG. So you can hover your mouse over the image in
|
||||||
|
Inkscape to determine the coordinates.
|
||||||
|
In the in the case of on-drawing controls the coordinates are entered as
|
||||||
|
an XML comment in the Tooltip for the control in x,y format (The surface speed,
|
||||||
|
tool and coolant do not need this, they are in a fixed table)
|
||||||
|
|
||||||
|
An example:
|
||||||
|
|
||||||
|
<!--300,711->Peck distance
|
||||||
|
|
||||||
|
Make sure the comment has "use markup" selected for the tooltip.
|
||||||
|
Also ensure that the control has the "show_keyb" function allocated for
|
||||||
|
the Widget->button_press event. If you copy-paste a tab and copy-paste
|
||||||
|
extra controls this should be automatic.
|
||||||
|
_All_ your new spinboxes will need their own new Adjustment, or they will
|
||||||
|
change value when you alter the original spinbox that they are a copy of.
|
||||||
|
|
||||||
|
|
||||||
159
linuxcnc/Turner.2ms/Turner.hal
Normal file
159
linuxcnc/Turner.2ms/Turner.hal
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# Generated by PNCconf at Sat Sep 10 10:10:56 2016
|
||||||
|
# If you make changes to this file, they will be
|
||||||
|
# overwritten when you run PNCconf again
|
||||||
|
|
||||||
|
loadrt [KINS]KINEMATICS
|
||||||
|
#autoconverted trivkins
|
||||||
|
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||||
|
|
||||||
|
loadusr -W lcec_conf ethercat-conf.xml
|
||||||
|
loadrt lcec
|
||||||
|
loadrt metalmusings_encoder
|
||||||
|
|
||||||
|
addf lcec.read-all servo-thread
|
||||||
|
addf metalmusings-encoder.0 servo-thread
|
||||||
|
addf motion-command-handler servo-thread
|
||||||
|
addf motion-controller servo-thread
|
||||||
|
|
||||||
|
#*******************
|
||||||
|
# AXIS X
|
||||||
|
#*******************
|
||||||
|
|
||||||
|
# --- joint signals for motion
|
||||||
|
|
||||||
|
net x-pos-cmd <= joint.0.motor-pos-cmd
|
||||||
|
net x-vel-cmd <= joint.0.vel-cmd
|
||||||
|
net x-pos-fb <= joint.0.motor-pos-fb
|
||||||
|
net x-enable <= joint.0.amp-enable-out
|
||||||
|
|
||||||
|
# --- connect stepper driver to joint
|
||||||
|
# 1/2 of stepper's p/rev 2000 => 1000
|
||||||
|
setp lcec.0.0.steps-per-mm-1 200
|
||||||
|
net x-pos-cmd => lcec.0.0.commanded-position-1
|
||||||
|
net x-pos-fb => lcec.0.0.actual-position-1
|
||||||
|
#net x-enable => lcec.0.0.enable
|
||||||
|
|
||||||
|
#*******************
|
||||||
|
# AXIS Z
|
||||||
|
#*******************
|
||||||
|
|
||||||
|
# --- joint signals for motion
|
||||||
|
|
||||||
|
net z-pos-cmd <= joint.1.motor-pos-cmd
|
||||||
|
net z-vel-cmd <= joint.1.vel-cmd
|
||||||
|
net z-pos-fb <= joint.1.motor-pos-fb
|
||||||
|
net z-enable <= joint.1.amp-enable-out
|
||||||
|
|
||||||
|
# --- connect stepper driver to the joint
|
||||||
|
|
||||||
|
setp lcec.0.0.steps-per-mm-2 80
|
||||||
|
# 1/5 of drive's step/rev
|
||||||
|
net z-pos-cmd => lcec.0.0.commanded-position-2
|
||||||
|
net z-pos-fb => lcec.0.0.actual-position-2
|
||||||
|
# net z-enable => lcec.0.0.enable
|
||||||
|
|
||||||
|
#*********************
|
||||||
|
# E-STOP
|
||||||
|
#*********************
|
||||||
|
|
||||||
|
setp iocontrol.0.emc-enable-in 1
|
||||||
|
#net estop iocontrol.0.emc-enable-in lcec.0.1.din-0
|
||||||
|
|
||||||
|
#setp lcec.0.3.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||||
|
#setp lcec.0.0.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||||
|
|
||||||
|
#net spindle-revs <= lcec.0.3.enc-pos
|
||||||
|
net spindle-revs <= lcec.0.0.enc-position
|
||||||
|
loadrt invert
|
||||||
|
loadrt mult2 names=mult2.rps,mult2.rpm
|
||||||
|
addf invert.0 servo-thread
|
||||||
|
addf mult2.rps servo-thread
|
||||||
|
addf mult2.rpm servo-thread
|
||||||
|
|
||||||
|
setp invert.0.in [SPINDLE_9]ENCODER_SCALE
|
||||||
|
setp mult2.rpm.in0 -60.0
|
||||||
|
setp mult2.rpm.in0 60.0
|
||||||
|
#net enc-invert-pos-scale mult2.rps.in0 <= invert.0.out
|
||||||
|
#net enc-get-freq-rps mult2.rps.in1 <= lcec.0.3.enc-frequency
|
||||||
|
#net spindle-vel-fb-rps mult2.rpm.in1 <= mult2.rps.out
|
||||||
|
#net spindle-vel-fb-rpm mult2.rpm.out
|
||||||
|
#net spindle-index-enable lcec.0.3.enc-index-c-enable
|
||||||
|
|
||||||
|
net spindle-vel-fb-rps mult2.rpm.in1 <= lcec.0.0.enc-frequency
|
||||||
|
net spindle-vel-fb-rpm mult2.rpm.out
|
||||||
|
|
||||||
|
net to_encoder metalmusings-encoder.0.index-latch-enable lcec.0.0.enc-index-latch-enable
|
||||||
|
net from_encoder metalmusings-encoder.0.index-status lcec.0.0.index-status
|
||||||
|
net spindle-index-enable metalmusings-encoder.0.index-c-enable
|
||||||
|
|
||||||
|
# ---setup spindle control signals---
|
||||||
|
|
||||||
|
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
|
||||||
|
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
|
||||||
|
net spindle-vel-cmd-rpm <= spindle.0.speed-out
|
||||||
|
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
|
||||||
|
net spindle-enable <= spindle.0.on
|
||||||
|
net spindle-cw <= spindle.0.forward
|
||||||
|
net spindle-ccw <= spindle.0.reverse
|
||||||
|
net spindle-brake <= spindle.0.brake
|
||||||
|
net spindle-revs => spindle.0.revs
|
||||||
|
net spindle-at-speed => spindle.0.at-speed
|
||||||
|
net spindle-vel-fb-rps => spindle.0.speed-in
|
||||||
|
net spindle-index-enable <=> spindle.0.index-enable
|
||||||
|
|
||||||
|
|
||||||
|
#******************************
|
||||||
|
# connect miscellaneous signals
|
||||||
|
#******************************
|
||||||
|
|
||||||
|
# ---HALUI signals---
|
||||||
|
|
||||||
|
net joint-select-a halui.axis.x.select
|
||||||
|
net x-is-homed halui.joint.0.is-homed
|
||||||
|
net jog-x-pos halui.axis.x.plus
|
||||||
|
net jog-x-neg halui.axis.x.minus
|
||||||
|
net jog-x-analog halui.axis.x.analog
|
||||||
|
net joint-select-b halui.axis.z.select
|
||||||
|
net z-is-homed halui.joint.1.is-homed
|
||||||
|
net jog-z-pos halui.axis.z.plus
|
||||||
|
net jog-z-neg halui.axis.z.minus
|
||||||
|
net jog-z-analog halui.axis.z.analog
|
||||||
|
net jog-selected-pos halui.axis.selected.plus
|
||||||
|
net jog-selected-neg halui.axis.selected.minus
|
||||||
|
net spindle-manual-cw halui.spindle.0.forward
|
||||||
|
net spindle-manual-ccw halui.spindle.0.reverse
|
||||||
|
net spindle-manual-stop halui.spindle.0.stop
|
||||||
|
net machine-is-on halui.machine.is-on
|
||||||
|
net jog-speed halui.axis.jog-speed
|
||||||
|
net MDI-mode halui.mode.is-mdi
|
||||||
|
|
||||||
|
# ---coolant signals---
|
||||||
|
|
||||||
|
net coolant-mist <= iocontrol.0.coolant-mist
|
||||||
|
net coolant-flood <= iocontrol.0.coolant-flood
|
||||||
|
|
||||||
|
# ---probe signal---
|
||||||
|
|
||||||
|
net probe-in => motion.probe-input
|
||||||
|
|
||||||
|
# ---motion control signals---
|
||||||
|
|
||||||
|
net in-position <= motion.in-position
|
||||||
|
net machine-is-enabled <= motion.motion-enabled
|
||||||
|
|
||||||
|
# ---digital in / out signals---
|
||||||
|
|
||||||
|
# ---estop signals---
|
||||||
|
|
||||||
|
net estop-out <= iocontrol.0.user-enable-out
|
||||||
|
net estop-ext => iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
|
# ---manual tool change signals---
|
||||||
|
|
||||||
|
loadusr -W hal_manualtoolchange
|
||||||
|
#net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||||
|
#net tool-change-confirmed 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
|
||||||
|
|
||||||
|
addf lcec.write-all servo-thread
|
||||||
159
linuxcnc/Turner.2ms/Turner.hal~
Normal file
159
linuxcnc/Turner.2ms/Turner.hal~
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# Generated by PNCconf at Sat Sep 10 10:10:56 2016
|
||||||
|
# If you make changes to this file, they will be
|
||||||
|
# overwritten when you run PNCconf again
|
||||||
|
|
||||||
|
loadrt [KINS]KINEMATICS
|
||||||
|
#autoconverted trivkins
|
||||||
|
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||||
|
|
||||||
|
loadusr -W lcec_conf ethercat-conf.xml
|
||||||
|
loadrt lcec
|
||||||
|
loadrt metalmusings_encoder
|
||||||
|
|
||||||
|
addf lcec.read-all servo-thread
|
||||||
|
addf metalmusings-encoder.0 servo-thread
|
||||||
|
addf motion-command-handler servo-thread
|
||||||
|
addf motion-controller servo-thread
|
||||||
|
|
||||||
|
#*******************
|
||||||
|
# AXIS X
|
||||||
|
#*******************
|
||||||
|
|
||||||
|
# --- joint signals for motion
|
||||||
|
|
||||||
|
net x-pos-cmd <= joint.0.motor-pos-cmd
|
||||||
|
net x-vel-cmd <= joint.0.vel-cmd
|
||||||
|
net x-pos-fb <= joint.0.motor-pos-fb
|
||||||
|
net x-enable <= joint.0.amp-enable-out
|
||||||
|
|
||||||
|
# --- connect stepper driver to joint
|
||||||
|
# 1/2 of stepper's p/rev 2000 => 1000
|
||||||
|
setp lcec.0.0.steps-per-mm-1 500
|
||||||
|
net x-pos-cmd => lcec.0.0.commanded-position-1
|
||||||
|
net x-pos-fb => lcec.0.0.actual-position-1
|
||||||
|
#net x-enable => lcec.0.0.enable
|
||||||
|
|
||||||
|
#*******************
|
||||||
|
# AXIS Z
|
||||||
|
#*******************
|
||||||
|
|
||||||
|
# --- joint signals for motion
|
||||||
|
|
||||||
|
net z-pos-cmd <= joint.1.motor-pos-cmd
|
||||||
|
net z-vel-cmd <= joint.1.vel-cmd
|
||||||
|
net z-pos-fb <= joint.1.motor-pos-fb
|
||||||
|
net z-enable <= joint.1.amp-enable-out
|
||||||
|
|
||||||
|
# --- connect stepper driver to the joint
|
||||||
|
|
||||||
|
setp lcec.0.0.steps-per-mm-2 400
|
||||||
|
# 1/5 of drive's step/rev
|
||||||
|
net z-pos-cmd => lcec.0.0.commanded-position-2
|
||||||
|
net z-pos-fb => lcec.0.0.actual-position-2
|
||||||
|
# net z-enable => lcec.0.0.enable
|
||||||
|
|
||||||
|
#*********************
|
||||||
|
# E-STOP
|
||||||
|
#*********************
|
||||||
|
|
||||||
|
setp iocontrol.0.emc-enable-in 1
|
||||||
|
#net estop iocontrol.0.emc-enable-in lcec.0.1.din-0
|
||||||
|
|
||||||
|
#setp lcec.0.3.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||||
|
setp lcec.0.0.enc-pos-scale [SPINDLE_9]ENCODER_SCALE
|
||||||
|
|
||||||
|
#net spindle-revs <= lcec.0.3.enc-pos
|
||||||
|
net spindle-revs <= lcec.0.0.enc-position
|
||||||
|
loadrt invert
|
||||||
|
loadrt mult2 names=mult2.rps,mult2.rpm
|
||||||
|
addf invert.0 servo-thread
|
||||||
|
addf mult2.rps servo-thread
|
||||||
|
addf mult2.rpm servo-thread
|
||||||
|
|
||||||
|
setp invert.0.in [SPINDLE_9]ENCODER_SCALE
|
||||||
|
setp mult2.rpm.in0 -60.0
|
||||||
|
setp mult2.rpm.in0 60.0
|
||||||
|
#net enc-invert-pos-scale mult2.rps.in0 <= invert.0.out
|
||||||
|
#net enc-get-freq-rps mult2.rps.in1 <= lcec.0.3.enc-frequency
|
||||||
|
#net spindle-vel-fb-rps mult2.rpm.in1 <= mult2.rps.out
|
||||||
|
#net spindle-vel-fb-rpm mult2.rpm.out
|
||||||
|
#net spindle-index-enable lcec.0.3.enc-index-c-enable
|
||||||
|
|
||||||
|
net spindle-vel-fb-rps mult2.rpm.in1 <= lcec.0.0.enc-frequency
|
||||||
|
net spindle-vel-fb-rpm mult2.rpm.out
|
||||||
|
|
||||||
|
net to_encoder metalmusings-encoder.0.index-latch-enable lcec.0.0.enc-index-latch-enable
|
||||||
|
net from_encoder metalmusings-encoder.0.index-status lcec.0.0.index-status
|
||||||
|
net spindle-index-enable metalmusings-encoder.0.index-c-enable
|
||||||
|
|
||||||
|
# ---setup spindle control signals---
|
||||||
|
|
||||||
|
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
|
||||||
|
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
|
||||||
|
net spindle-vel-cmd-rpm <= spindle.0.speed-out
|
||||||
|
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
|
||||||
|
net spindle-enable <= spindle.0.on
|
||||||
|
net spindle-cw <= spindle.0.forward
|
||||||
|
net spindle-ccw <= spindle.0.reverse
|
||||||
|
net spindle-brake <= spindle.0.brake
|
||||||
|
net spindle-revs => spindle.0.revs
|
||||||
|
net spindle-at-speed => spindle.0.at-speed
|
||||||
|
net spindle-vel-fb-rps => spindle.0.speed-in
|
||||||
|
net spindle-index-enable <=> spindle.0.index-enable
|
||||||
|
|
||||||
|
|
||||||
|
#******************************
|
||||||
|
# connect miscellaneous signals
|
||||||
|
#******************************
|
||||||
|
|
||||||
|
# ---HALUI signals---
|
||||||
|
|
||||||
|
net joint-select-a halui.axis.x.select
|
||||||
|
net x-is-homed halui.joint.0.is-homed
|
||||||
|
net jog-x-pos halui.axis.x.plus
|
||||||
|
net jog-x-neg halui.axis.x.minus
|
||||||
|
net jog-x-analog halui.axis.x.analog
|
||||||
|
net joint-select-b halui.axis.z.select
|
||||||
|
net z-is-homed halui.joint.1.is-homed
|
||||||
|
net jog-z-pos halui.axis.z.plus
|
||||||
|
net jog-z-neg halui.axis.z.minus
|
||||||
|
net jog-z-analog halui.axis.z.analog
|
||||||
|
net jog-selected-pos halui.axis.selected.plus
|
||||||
|
net jog-selected-neg halui.axis.selected.minus
|
||||||
|
net spindle-manual-cw halui.spindle.0.forward
|
||||||
|
net spindle-manual-ccw halui.spindle.0.reverse
|
||||||
|
net spindle-manual-stop halui.spindle.0.stop
|
||||||
|
net machine-is-on halui.machine.is-on
|
||||||
|
net jog-speed halui.axis.jog-speed
|
||||||
|
net MDI-mode halui.mode.is-mdi
|
||||||
|
|
||||||
|
# ---coolant signals---
|
||||||
|
|
||||||
|
net coolant-mist <= iocontrol.0.coolant-mist
|
||||||
|
net coolant-flood <= iocontrol.0.coolant-flood
|
||||||
|
|
||||||
|
# ---probe signal---
|
||||||
|
|
||||||
|
net probe-in => motion.probe-input
|
||||||
|
|
||||||
|
# ---motion control signals---
|
||||||
|
|
||||||
|
net in-position <= motion.in-position
|
||||||
|
net machine-is-enabled <= motion.motion-enabled
|
||||||
|
|
||||||
|
# ---digital in / out signals---
|
||||||
|
|
||||||
|
# ---estop signals---
|
||||||
|
|
||||||
|
net estop-out <= iocontrol.0.user-enable-out
|
||||||
|
net estop-ext => iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
|
# ---manual tool change signals---
|
||||||
|
|
||||||
|
loadusr -W hal_manualtoolchange
|
||||||
|
#net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||||
|
#net tool-change-confirmed 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
|
||||||
|
|
||||||
|
addf lcec.write-all servo-thread
|
||||||
164
linuxcnc/Turner.2ms/Turner.ini
Normal file
164
linuxcnc/Turner.2ms/Turner.ini
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
# This config file was created 2016-11-26 11:13:55.093594 by the update_ini script
|
||||||
|
# The original config files may be found in the /home/debian/linuxcnc/configs/Turner/Turner.old directory
|
||||||
|
|
||||||
|
# Generated by PNCconf at Fri Sep 9 22:31:33 2016
|
||||||
|
# If you make changes to this file, they will be
|
||||||
|
# overwritten when you run PNCconf again
|
||||||
|
|
||||||
|
[EMC]
|
||||||
|
# The version string for this INI file.
|
||||||
|
VERSION = 1.1
|
||||||
|
|
||||||
|
MACHINE = Turner
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
[DISPLAY]
|
||||||
|
LATHE=1
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
CYCLE_TIME = 150
|
||||||
|
POSITION_OFFSET = RELATIVE
|
||||||
|
POSITION_FEEDBACK = ACTUAL
|
||||||
|
MAX_FEED_OVERRIDE = 2.000000
|
||||||
|
MAX_SPINDLE_OVERRIDE = 2.000000
|
||||||
|
MIN_SPINDLE_OVERRIDE = 0.500000
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 1
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/configs/Turner/nc_files
|
||||||
|
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
|
||||||
|
LATHE = 1
|
||||||
|
POSITION_FEEDBACK = ACTUAL
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 6.000000
|
||||||
|
MAX_LINEAR_VELOCITY = 25.000000
|
||||||
|
MIN_LINEAR_VELOCITY = 0.500000
|
||||||
|
DEFAULT_ANGULAR_VELOCITY = 12.000000
|
||||||
|
MAX_ANGULAR_VELOCITY = 1800.000000
|
||||||
|
MIN_ANGULAR_VELOCITY = 1.666667
|
||||||
|
EDITOR = gedit
|
||||||
|
|
||||||
|
#EMBED_TAB_NAME = Cycles
|
||||||
|
#EMBED_TAB_LOCATION = ntb_preview
|
||||||
|
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||||
|
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||||
|
|
||||||
|
[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
|
||||||
|
|
||||||
|
[RS274NGC]
|
||||||
|
PARAMETER_FILE = linuxcnc.var
|
||||||
|
SUBROUTINE_PATH = .:../../nc_files/subs:nc_files:../../../nc2
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G7 M9 M5 G64 P0.005
|
||||||
|
FEATURES=12
|
||||||
|
USER_M_PATH = nc_files:.
|
||||||
|
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
COMM_WAIT = 0.010
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 2000000
|
||||||
|
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
[HAL]
|
||||||
|
TWOPASS = true
|
||||||
|
HALUI = halui
|
||||||
|
HALFILE = Turner.hal
|
||||||
|
#HALFILE = custom_vfd.hal
|
||||||
|
HALFILE = custom.hal
|
||||||
|
#HALFILE = xhc-hb04.tcl
|
||||||
|
#HALFILE = monitor_xhc-hb04.tcl
|
||||||
|
POSTGUI_HALFILE = postgui_call_list.hal
|
||||||
|
SHUTDOWN = shutdown.hal
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
CYCLE_TIME = 0.010
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 20.0
|
||||||
|
MAX_LINEAR_VELOCITY = 40.00
|
||||||
|
DEFAULT_ACCELERATION = 400.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
TOOL_TABLE = tool.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
#This is a best-guess at the number of joints, it should be checked
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
#********************
|
||||||
|
# Axis X
|
||||||
|
#********************
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -106
|
||||||
|
MAX_LIMIT = 106
|
||||||
|
MAX_VELOCITY = 15.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
|
||||||
|
TYPE = LINEAR
|
||||||
|
HOME = 0.0
|
||||||
|
FERROR = 0.5
|
||||||
|
MIN_FERROR = 1
|
||||||
|
MAX_VELOCITY = 20.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
MAX_OUTPUT = 0.0
|
||||||
|
MIN_LIMIT = -106
|
||||||
|
MAX_LIMIT = 106
|
||||||
|
HOME_SEARCH_VEL = 0
|
||||||
|
HOME_LATCH_VEL = 0
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
|
||||||
|
|
||||||
|
#********************
|
||||||
|
# Axis Z
|
||||||
|
#********************
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -560.0
|
||||||
|
MAX_LIMIT = 560.0
|
||||||
|
MAX_VELOCITY = 50.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
|
||||||
|
TYPE = LINEAR
|
||||||
|
HOME = 0.0
|
||||||
|
FERROR = 0.5
|
||||||
|
MIN_FERROR = 1
|
||||||
|
MAX_VELOCITY = 75.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
HOME_SEARCH_VEL = 0
|
||||||
|
HOME_LATCH_VEL = 0
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
|
||||||
|
[SPINDLE_9]
|
||||||
|
P = 0.0
|
||||||
|
I = 0.0
|
||||||
|
D = 0.0
|
||||||
|
FF0 = 1.0
|
||||||
|
FF1 = 0.0
|
||||||
|
FF2 = 0.0
|
||||||
|
BIAS = 0.0
|
||||||
|
DEADBAND = 0.0
|
||||||
|
MAX_OUTPUT = 2400.0
|
||||||
|
OUTPUT_SCALE =5760
|
||||||
|
OUTPUT_MIN_LIMIT = 0
|
||||||
|
OUTPUT_MAX_LIMIT = 2400
|
||||||
|
#ENCODER_SCALE = -4000
|
||||||
|
ENCODER_SCALE = 2000
|
||||||
|
|
||||||
164
linuxcnc/Turner.2ms/Turner.ini~
Normal file
164
linuxcnc/Turner.2ms/Turner.ini~
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
# This config file was created 2016-11-26 11:13:55.093594 by the update_ini script
|
||||||
|
# The original config files may be found in the /home/debian/linuxcnc/configs/Turner/Turner.old directory
|
||||||
|
|
||||||
|
# Generated by PNCconf at Fri Sep 9 22:31:33 2016
|
||||||
|
# If you make changes to this file, they will be
|
||||||
|
# overwritten when you run PNCconf again
|
||||||
|
|
||||||
|
[EMC]
|
||||||
|
# The version string for this INI file.
|
||||||
|
VERSION = 1.1
|
||||||
|
|
||||||
|
MACHINE = Turner
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
[DISPLAY]
|
||||||
|
LATHE=1
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
CYCLE_TIME = 150
|
||||||
|
POSITION_OFFSET = RELATIVE
|
||||||
|
POSITION_FEEDBACK = ACTUAL
|
||||||
|
MAX_FEED_OVERRIDE = 2.000000
|
||||||
|
MAX_SPINDLE_OVERRIDE = 2.000000
|
||||||
|
MIN_SPINDLE_OVERRIDE = 0.500000
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 1
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/configs/Turner/nc_files
|
||||||
|
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
|
||||||
|
LATHE = 1
|
||||||
|
POSITION_FEEDBACK = ACTUAL
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 6.000000
|
||||||
|
MAX_LINEAR_VELOCITY = 25.000000
|
||||||
|
MIN_LINEAR_VELOCITY = 0.500000
|
||||||
|
DEFAULT_ANGULAR_VELOCITY = 12.000000
|
||||||
|
MAX_ANGULAR_VELOCITY = 1800.000000
|
||||||
|
MIN_ANGULAR_VELOCITY = 1.666667
|
||||||
|
EDITOR = gedit
|
||||||
|
|
||||||
|
#EMBED_TAB_NAME = Cycles
|
||||||
|
#EMBED_TAB_LOCATION = ntb_preview
|
||||||
|
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||||
|
#EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||||
|
|
||||||
|
[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
|
||||||
|
|
||||||
|
[RS274NGC]
|
||||||
|
PARAMETER_FILE = linuxcnc.var
|
||||||
|
SUBROUTINE_PATH = .:../../nc_files/subs:nc_files:../../../nc2
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G7 M9 M5 G64 P0.005
|
||||||
|
FEATURES=12
|
||||||
|
USER_M_PATH = nc_files:.
|
||||||
|
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
COMM_WAIT = 0.010
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
[HAL]
|
||||||
|
TWOPASS = true
|
||||||
|
HALUI = halui
|
||||||
|
HALFILE = Turner.hal
|
||||||
|
#HALFILE = custom_vfd.hal
|
||||||
|
HALFILE = custom.hal
|
||||||
|
#HALFILE = xhc-hb04.tcl
|
||||||
|
#HALFILE = monitor_xhc-hb04.tcl
|
||||||
|
POSTGUI_HALFILE = postgui_call_list.hal
|
||||||
|
SHUTDOWN = shutdown.hal
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
CYCLE_TIME = 0.010
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 20.0
|
||||||
|
MAX_LINEAR_VELOCITY = 40.00
|
||||||
|
DEFAULT_ACCELERATION = 400.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
TOOL_TABLE = tool.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
#This is a best-guess at the number of joints, it should be checked
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
#********************
|
||||||
|
# Axis X
|
||||||
|
#********************
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -106
|
||||||
|
MAX_LIMIT = 106
|
||||||
|
MAX_VELOCITY = 15.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
|
||||||
|
TYPE = LINEAR
|
||||||
|
HOME = 0.0
|
||||||
|
FERROR = 0.5
|
||||||
|
MIN_FERROR = 1
|
||||||
|
MAX_VELOCITY = 20.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
MAX_OUTPUT = 0.0
|
||||||
|
MIN_LIMIT = -106
|
||||||
|
MAX_LIMIT = 106
|
||||||
|
HOME_SEARCH_VEL = 0
|
||||||
|
HOME_LATCH_VEL = 0
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
|
||||||
|
|
||||||
|
#********************
|
||||||
|
# Axis Z
|
||||||
|
#********************
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -560.0
|
||||||
|
MAX_LIMIT = 560.0
|
||||||
|
MAX_VELOCITY = 50.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
|
||||||
|
TYPE = LINEAR
|
||||||
|
HOME = 0.0
|
||||||
|
FERROR = 0.5
|
||||||
|
MIN_FERROR = 1
|
||||||
|
MAX_VELOCITY = 75.0
|
||||||
|
MAX_ACCELERATION = 400.0
|
||||||
|
HOME_SEARCH_VEL = 0
|
||||||
|
HOME_LATCH_VEL = 0
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
|
||||||
|
[SPINDLE_9]
|
||||||
|
P = 0.0
|
||||||
|
I = 0.0
|
||||||
|
D = 0.0
|
||||||
|
FF0 = 1.0
|
||||||
|
FF1 = 0.0
|
||||||
|
FF2 = 0.0
|
||||||
|
BIAS = 0.0
|
||||||
|
DEADBAND = 0.0
|
||||||
|
MAX_OUTPUT = 2400.0
|
||||||
|
OUTPUT_SCALE =5760
|
||||||
|
OUTPUT_MIN_LIMIT = 0
|
||||||
|
OUTPUT_MAX_LIMIT = 2400
|
||||||
|
#ENCODER_SCALE = -4000
|
||||||
|
ENCODER_SCALE = 2000
|
||||||
|
|
||||||
79
linuxcnc/Turner.2ms/Turner.pref
Normal file
79
linuxcnc/Turner.2ms/Turner.pref
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_digits = 3
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
enable_dro = False
|
||||||
|
scale_jog_vel = 24.0
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
unlock_code = 123
|
||||||
|
toggle_readout = True
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
kbd_height = 250
|
||||||
|
view = y
|
||||||
|
blockheight = 0.0
|
||||||
|
reload_tool = False
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
hide_titlebar = False
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
use_toolmeasurement = False
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
icon_theme = classic
|
||||||
|
audio_enabled = True
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
hide_tooltips = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/debian
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = False
|
||||||
|
show_keyboard_on_mdi = False
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
blockdel = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = False
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = no
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = False
|
||||||
|
offset_axis_z = 150.0
|
||||||
|
diameter offset_axis_x = 0
|
||||||
|
offset_axis_x = 0.0
|
||||||
|
|
||||||
BIN
linuxcnc/Turner.2ms/__pycache__/lathehandler.cpython-311.pyc
Normal file
BIN
linuxcnc/Turner.2ms/__pycache__/lathehandler.cpython-311.pyc
Normal file
Binary file not shown.
27
linuxcnc/Turner.2ms/autosave.halscope
Normal file
27
linuxcnc/Turner.2ms/autosave.halscope
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
THREAD servo-thread
|
||||||
|
MAXCHAN 4
|
||||||
|
HMULT 1
|
||||||
|
HZOOM 1
|
||||||
|
HPOS 4,132653e-01
|
||||||
|
CHAN 1
|
||||||
|
PIN lcec.0.0.D1
|
||||||
|
VSCALE 1
|
||||||
|
VPOS 0,781382
|
||||||
|
VOFF 0,000000e+00
|
||||||
|
CHAN 2
|
||||||
|
PIN lcec.0.0.DiffT
|
||||||
|
VSCALE 0
|
||||||
|
VPOS 0,678420
|
||||||
|
VOFF 0,000000e+00
|
||||||
|
CHAN 3
|
||||||
|
PIN lcec.0.0.D3
|
||||||
|
VSCALE 1
|
||||||
|
VPOS 0,743300
|
||||||
|
VOFF 2,000000e+02
|
||||||
|
CHAN 4
|
||||||
|
PIN lcec.0.0.D4
|
||||||
|
VSCALE 5
|
||||||
|
VPOS 0,364679
|
||||||
|
VOFF 0,000000e+00
|
||||||
|
TMODE 1
|
||||||
|
RMODE 2
|
||||||
64
linuxcnc/Turner.2ms/boring.ngc
Normal file
64
linuxcnc/Turner.2ms/boring.ngc
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
;boring
|
||||||
|
|
||||||
|
O<boring> sub
|
||||||
|
|
||||||
|
G8 ; Radius mode (easier maths)
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
G91.1 ; but not for arcs
|
||||||
|
|
||||||
|
M6 T#8 G43
|
||||||
|
|
||||||
|
#1 = [#1 / 2] ; because of radius mode
|
||||||
|
|
||||||
|
#14 = [#<_x>] (starting X)
|
||||||
|
#13 = #<_z> (starting Z)
|
||||||
|
|
||||||
|
#20 = [#6 * SIN[#7]]
|
||||||
|
#21 = [-#6 * COS[#7]]
|
||||||
|
#22 = [#6 / COS[#7]]
|
||||||
|
#23 = [#5 + #6 - #20]
|
||||||
|
#24 = [[#23 - #13] * TAN[#7]]
|
||||||
|
|
||||||
|
|
||||||
|
G96 D2500 S#2 ; Constant Surface Speed Mode
|
||||||
|
m3 ;Start Spindle
|
||||||
|
g95 F#4 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#9 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
g4p1 ; Wait to reach speed
|
||||||
|
|
||||||
|
(debug, Turning finish dia #1 start dia #14 start length #13 finish length #5 coolant #9)
|
||||||
|
O100 WHILE [#14 LT [#1 - #3]]
|
||||||
|
g0 X #14
|
||||||
|
#14=[#14 + #3]
|
||||||
|
G1 X #14
|
||||||
|
G1 Z #23 X[#14 + #24]
|
||||||
|
O101 IF [#6 GT 0]
|
||||||
|
G3 Z#5 X[#14 + #24 + #21] I#21 K#20
|
||||||
|
G1 X[#14 + #24 + #21 - #3]
|
||||||
|
O101 ELSE
|
||||||
|
G1 X[#14 + #24 - [#3 * 1.5]]
|
||||||
|
O101 ENDIF
|
||||||
|
G0 Z[#13]
|
||||||
|
O100 ENDWHILE
|
||||||
|
|
||||||
|
G0 x#1
|
||||||
|
G1 Z #23 X[#1 + #24]
|
||||||
|
O102 IF [#6 GT 0]
|
||||||
|
G3 Z#5 X[#1 + #24 + #21] I#21 K#20
|
||||||
|
G1 X[#1 + #24 + #21 - #3]
|
||||||
|
O102 ELSE
|
||||||
|
G1 X[#1 + #24 - #3]
|
||||||
|
O102 ENDIF
|
||||||
|
G0 Z #13
|
||||||
|
G0 X #1 ; For touch-off
|
||||||
|
M5 M9
|
||||||
|
G7
|
||||||
|
O<boring> endsub
|
||||||
|
|
||||||
|
M2
|
||||||
77
linuxcnc/Turner.2ms/chamfer.ngc
Normal file
77
linuxcnc/Turner.2ms/chamfer.ngc
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
;chamfer
|
||||||
|
|
||||||
|
O<chamfer> sub
|
||||||
|
|
||||||
|
G8 ; Lathe radius Mode
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
|
||||||
|
|
||||||
|
M6 T#6 G43
|
||||||
|
|
||||||
|
#1 = [#1 / 2] ; because of radius mode
|
||||||
|
|
||||||
|
#14 = [#<_x>] (starting X)
|
||||||
|
#13 = [#<_z>] (starting Z)
|
||||||
|
|
||||||
|
G96 D1500 S#2 ; Constant Surface Speed Mode
|
||||||
|
M3
|
||||||
|
g95 F0.1 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#12 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
#20 = 0
|
||||||
|
O101 if [#9 GT 0.5] ; front outside
|
||||||
|
o100 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 - #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 - #20]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o100 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 - #8]
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 - #8]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 elseif [#10 GT 0.5] ; front inside
|
||||||
|
o102 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 + #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 - #20]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o102 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 + #8]
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 - #8]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 elseif [#11 GT 0.5] ; back outside
|
||||||
|
o103 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 - #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 + #20]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o103 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 - #8]
|
||||||
|
g1 z#5
|
||||||
|
g1 x#1 z[#5 + #8]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 endif
|
||||||
|
M5 M9
|
||||||
|
G7
|
||||||
|
O<chamfer> endsub
|
||||||
|
m2
|
||||||
|
%
|
||||||
31
linuxcnc/Turner.2ms/core_sim_lathe.hal
Normal file
31
linuxcnc/Turner.2ms/core_sim_lathe.hal
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# core HAL config file for simulation
|
||||||
|
|
||||||
|
# first load all the RT modules that will be needed
|
||||||
|
# kinematics
|
||||||
|
loadrt [KINS]KINEMATICS
|
||||||
|
# motion controller, get name and thread periods from ini file
|
||||||
|
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||||
|
|
||||||
|
# add motion controller functions to servo thread
|
||||||
|
addf motion-command-handler servo-thread
|
||||||
|
addf motion-controller servo-thread
|
||||||
|
|
||||||
|
# create HAL signals for position commands from motion module
|
||||||
|
# loop position commands back to motion module feedback
|
||||||
|
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb
|
||||||
|
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb
|
||||||
|
|
||||||
|
# estop loopback
|
||||||
|
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
|
# create signals for tool loading loopback
|
||||||
|
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||||
|
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||||
|
|
||||||
|
net spindle-fwd spindle.0.forward
|
||||||
|
net spindle-rev spindle.0.reverse
|
||||||
|
#net spindle-speed spindle.0.speed-out
|
||||||
|
|
||||||
|
net lube iocontrol.0.lube
|
||||||
|
net flood iocontrol.0.coolant-flood
|
||||||
|
net mist iocontrol.0.coolant-mist
|
||||||
59
linuxcnc/Turner.2ms/core_sim_lathe_C.hal
Normal file
59
linuxcnc/Turner.2ms/core_sim_lathe_C.hal
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# core HAL config file for simulation
|
||||||
|
|
||||||
|
# first load all the RT modules that will be needed
|
||||||
|
# kinematics
|
||||||
|
loadrt [KINS]KINEMATICS
|
||||||
|
# motion controller, get name and thread periods from ini file
|
||||||
|
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||||
|
# load 6 differentiators (for velocity and accel signals
|
||||||
|
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
|
||||||
|
# load additional blocks
|
||||||
|
loadrt hypot names=vel_xy,vel_xyz
|
||||||
|
|
||||||
|
# add motion controller functions to servo thread
|
||||||
|
addf motion-command-handler servo-thread
|
||||||
|
addf motion-controller servo-thread
|
||||||
|
# link the differentiator functions into the code
|
||||||
|
addf ddt_x servo-thread
|
||||||
|
addf ddt_xv servo-thread
|
||||||
|
addf ddt_y servo-thread
|
||||||
|
addf ddt_yv servo-thread
|
||||||
|
addf ddt_z servo-thread
|
||||||
|
addf ddt_zv servo-thread
|
||||||
|
addf vel_xy servo-thread
|
||||||
|
addf vel_xyz servo-thread
|
||||||
|
|
||||||
|
# create HAL signals for position commands from motion module
|
||||||
|
# loop position commands back to motion module feedback
|
||||||
|
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
|
||||||
|
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_z.in
|
||||||
|
net Cpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
|
||||||
|
|
||||||
|
|
||||||
|
# send the position commands thru differentiators to
|
||||||
|
# generate velocity and accel signals
|
||||||
|
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
|
||||||
|
net Xacc <= ddt_xv.out
|
||||||
|
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
|
||||||
|
net Yacc <= ddt_yv.out
|
||||||
|
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
|
||||||
|
net Zacc <= ddt_zv.out
|
||||||
|
|
||||||
|
# Cartesian 2- and 3-axis velocities
|
||||||
|
net XYvel vel_xy.out => vel_xyz.in1
|
||||||
|
net XYZvel <= vel_xyz.out
|
||||||
|
|
||||||
|
# estop loopback
|
||||||
|
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
|
# create signals for tool loading loopback
|
||||||
|
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||||
|
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||||
|
|
||||||
|
net spindle-fwd spindle.0.forward
|
||||||
|
net spindle-rev spindle.0.reverse
|
||||||
|
#net spindle-speed spindle.0.speed-out
|
||||||
|
|
||||||
|
net lube iocontrol.0.lube
|
||||||
|
net flood iocontrol.0.coolant-flood
|
||||||
|
net mist iocontrol.0.coolant-mist
|
||||||
59
linuxcnc/Turner.2ms/core_sim_lathe_CW.hal
Normal file
59
linuxcnc/Turner.2ms/core_sim_lathe_CW.hal
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# core HAL config file for simulation
|
||||||
|
|
||||||
|
# first load all the RT modules that will be needed
|
||||||
|
# kinematics
|
||||||
|
loadrt [KINS]KINEMATICS
|
||||||
|
# motion controller, get name and thread periods from ini file
|
||||||
|
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
|
||||||
|
# load 6 differentiators (for velocity and accel signals
|
||||||
|
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
|
||||||
|
# load additional blocks
|
||||||
|
loadrt hypot names=vel_xy,vel_xyz
|
||||||
|
|
||||||
|
# add motion controller functions to servo thread
|
||||||
|
addf motion-command-handler servo-thread
|
||||||
|
addf motion-controller servo-thread
|
||||||
|
# link the differentiator functions into the code
|
||||||
|
addf ddt_x servo-thread
|
||||||
|
addf ddt_xv servo-thread
|
||||||
|
addf ddt_y servo-thread
|
||||||
|
addf ddt_yv servo-thread
|
||||||
|
addf ddt_z servo-thread
|
||||||
|
addf ddt_zv servo-thread
|
||||||
|
addf vel_xy servo-thread
|
||||||
|
addf vel_xyz servo-thread
|
||||||
|
|
||||||
|
# create HAL signals for position commands from motion module
|
||||||
|
# loop position commands back to motion module feedback
|
||||||
|
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
|
||||||
|
net Zpos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_z.in
|
||||||
|
net Cpos joint.2.motor-pos-cmd => joint.2.motor-pos-fb
|
||||||
|
net Wpos joint.3.motor-pos-cmd => joint.3.motor-pos-fb
|
||||||
|
|
||||||
|
# send the position commands thru differentiators to
|
||||||
|
# generate velocity and accel signals
|
||||||
|
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
|
||||||
|
net Xacc <= ddt_xv.out
|
||||||
|
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
|
||||||
|
net Yacc <= ddt_yv.out
|
||||||
|
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
|
||||||
|
net Zacc <= ddt_zv.out
|
||||||
|
|
||||||
|
# Cartesian 2- and 3-axis velocities
|
||||||
|
net XYvel vel_xy.out => vel_xyz.in1
|
||||||
|
net XYZvel <= vel_xyz.out
|
||||||
|
|
||||||
|
# estop loopback
|
||||||
|
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
|
# create signals for tool loading loopback
|
||||||
|
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
|
||||||
|
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
|
||||||
|
|
||||||
|
net spindle-fwd spindle.0.forward
|
||||||
|
net spindle-rev spindle.0.reverse
|
||||||
|
#net spindle-speed spindle.0.speed-out
|
||||||
|
|
||||||
|
net lube iocontrol.0.lube
|
||||||
|
net flood iocontrol.0.coolant-flood
|
||||||
|
net mist iocontrol.0.coolant-mist
|
||||||
4
linuxcnc/Turner.2ms/custom.hal
Normal file
4
linuxcnc/Turner.2ms/custom.hal
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# Gamepad
|
||||||
|
loadusr -W hal_input -KRAL F310
|
||||||
|
# Resten är i custom_postgui.hal
|
||||||
51
linuxcnc/Turner.2ms/custom.hal~
Normal file
51
linuxcnc/Turner.2ms/custom.hal~
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Include your custom HAL commands here
|
||||||
|
|
||||||
|
# Load the Huanyang VFD user component
|
||||||
|
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||||
|
|
||||||
|
# motion.spindle-speed-in needs rev per second
|
||||||
|
loadrt scale names=scale.0,scale.1,scale.2
|
||||||
|
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||||
|
# scale.1 Inverted gear ratio
|
||||||
|
# scale.2 motion.spindle-speed.in in rev/sec
|
||||||
|
loadrt limit2 names=spindlemax
|
||||||
|
loadrt mult2 names=mult2.1
|
||||||
|
addf scale.0 servo-thread
|
||||||
|
addf scale.1 servo-thread
|
||||||
|
addf scale.2 servo-thread
|
||||||
|
addf mult2.1 servo-thread
|
||||||
|
addf spindlemax servo-thread
|
||||||
|
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||||
|
setp scale.1.gain 1.13045
|
||||||
|
setp scale.2.gain 0.0166666667
|
||||||
|
setp mult2.1.in1 25.0
|
||||||
|
unlinkp spindle.0.forward
|
||||||
|
unlinkp spindle.0.reverse
|
||||||
|
unlinkp spindle.0.on
|
||||||
|
#unlinkp motion.spindle-at-speed
|
||||||
|
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||||
|
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||||
|
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||||
|
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||||
|
#net spindle-enable => spindle-vfd.enable
|
||||||
|
setp spindle-vfd.enable 1
|
||||||
|
|
||||||
|
# Prepare max limit rpm for spindle
|
||||||
|
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||||
|
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||||
|
|
||||||
|
# Give speed to vfd, limited to max possible
|
||||||
|
unlinkp spindle.0.speed-out-abs
|
||||||
|
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||||
|
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||||
|
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||||
|
|
||||||
|
# Convert actual feed from rpm to rps, consider gear in use.
|
||||||
|
unlinkp spindle.0.speed-in
|
||||||
|
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||||
|
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||||
|
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||||
|
|
||||||
|
# Gamepad
|
||||||
|
loadusr -W hal_input -KRAL F310
|
||||||
|
# Resten är i custom_postgui.hal
|
||||||
74
linuxcnc/Turner.2ms/custom_postgui.hal
Normal file
74
linuxcnc/Turner.2ms/custom_postgui.hal
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# Include your custom_postgui HAL commands here
|
||||||
|
# This file will not be overwritten when you run PNCconf again
|
||||||
|
|
||||||
|
loadrt or2 count=2
|
||||||
|
loadrt mux4 count=1
|
||||||
|
loadrt and2 count=4
|
||||||
|
loadrt oneshot count=1
|
||||||
|
|
||||||
|
addf or2.0 servo-thread
|
||||||
|
addf or2.1 servo-thread
|
||||||
|
addf mux4.0 servo-thread
|
||||||
|
addf and2.0 servo-thread
|
||||||
|
addf and2.1 servo-thread
|
||||||
|
addf and2.2 servo-thread
|
||||||
|
addf and2.3 servo-thread
|
||||||
|
addf oneshot.0 servo-thread
|
||||||
|
|
||||||
|
setp mux4.0.in0 0
|
||||||
|
setp mux4.0.in1 25
|
||||||
|
setp mux4.0.in2 50
|
||||||
|
setp mux4.0.in3 1000
|
||||||
|
|
||||||
|
net remote-speed-slow or2.0.in0 <= input.0.btn-x
|
||||||
|
net remote-speed-medium or2.1.in0 <= input.0.btn-a
|
||||||
|
net remote-speed-fast or2.0.in1 <= input.0.btn-b
|
||||||
|
net remote-speed-fast or2.1.in1 <= input.0.btn-b
|
||||||
|
|
||||||
|
net joy-speed-1 mux4.0.sel0 <= or2.0.out
|
||||||
|
net joy-speed-2 mux4.0.sel1 <= or2.1.out
|
||||||
|
net jog-speed <= mux4.0.out
|
||||||
|
|
||||||
|
net jog-x-analog <= input.0.abs-y-position
|
||||||
|
net jog-z-analog <= input.0.abs-x-position
|
||||||
|
|
||||||
|
# Spindle start+manual and stop
|
||||||
|
|
||||||
|
net manual-mode-spindle-lock and2.3.in0 halui.mode.manual <= input.0.btn-mode
|
||||||
|
net spindle-safe-start and2.3.in1 <= input.0.btn-tr
|
||||||
|
net spindle-manual-cw <= and2.3.out
|
||||||
|
net spindle-manual-stop <= input.0.btn-tl
|
||||||
|
|
||||||
|
# E-stop
|
||||||
|
|
||||||
|
net estop halui.estop.activate <= input.0.btn-y
|
||||||
|
|
||||||
|
# net manual-mode halui.mode.manual <= input.0.btn-mode
|
||||||
|
|
||||||
|
# Start/pause/resume stop
|
||||||
|
|
||||||
|
setp oneshot.0.width 0.0011
|
||||||
|
setp oneshot.0.retriggerable 0
|
||||||
|
setp oneshot.0.rising 1
|
||||||
|
setp oneshot.0.falling 0
|
||||||
|
|
||||||
|
net program-is-idle halui.program.is-idle => and2.0.in0
|
||||||
|
net program-is-running halui.program.is-running => and2.1.in0
|
||||||
|
net program-is-paused halui.program.is-paused => and2.2.in0
|
||||||
|
net button-edge-trig input.0.btn-start => oneshot.0.in
|
||||||
|
net button-start oneshot.0.out => and2.0.in1 and2.1.in1 and2.2.in1
|
||||||
|
|
||||||
|
net program-start and2.0.out => halui.program.run halui.mode.auto
|
||||||
|
net program-pause and2.1.out => halui.program.pause
|
||||||
|
net program-resume and2.2.out => halui.program.resume
|
||||||
|
net program-stop input.0.btn-select => halui.program.stop
|
||||||
|
|
||||||
|
net spindle-at-speed gmoccapy.spindle_at_speed_led
|
||||||
|
net spindle-vel-fb-rpm => gmoccapy.spindle_feedback_bar
|
||||||
|
|
||||||
|
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
|
||||||
|
net tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
|
||||||
|
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z
|
||||||
48
linuxcnc/Turner.2ms/custom_vfd.hal
Normal file
48
linuxcnc/Turner.2ms/custom_vfd.hal
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Include your custom HAL commands here
|
||||||
|
|
||||||
|
# Load the Huanyang VFD user component
|
||||||
|
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||||
|
|
||||||
|
# motion.spindle-speed-in needs rev per second
|
||||||
|
loadrt scale names=scale.0,scale.1,scale.2
|
||||||
|
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||||
|
# scale.1 Inverted gear ratio
|
||||||
|
# scale.2 motion.spindle-speed.in in rev/sec
|
||||||
|
loadrt limit2 names=spindlemax
|
||||||
|
loadrt mult2 names=mult2.1
|
||||||
|
addf scale.0 servo-thread
|
||||||
|
addf scale.1 servo-thread
|
||||||
|
addf scale.2 servo-thread
|
||||||
|
addf mult2.1 servo-thread
|
||||||
|
addf spindlemax servo-thread
|
||||||
|
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||||
|
setp scale.1.gain 1.13045
|
||||||
|
setp scale.2.gain 0.0166666667
|
||||||
|
setp mult2.1.in1 25.0
|
||||||
|
unlinkp spindle.0.forward
|
||||||
|
unlinkp spindle.0.reverse
|
||||||
|
unlinkp spindle.0.on
|
||||||
|
#unlinkp motion.spindle-at-speed
|
||||||
|
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||||
|
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||||
|
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||||
|
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||||
|
#net spindle-enable => spindle-vfd.enable
|
||||||
|
setp spindle-vfd.enable 1
|
||||||
|
|
||||||
|
# Prepare max limit rpm for spindle
|
||||||
|
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||||
|
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||||
|
|
||||||
|
# Give speed to vfd, limited to max possible
|
||||||
|
unlinkp spindle.0.speed-out-abs
|
||||||
|
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||||
|
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||||
|
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||||
|
|
||||||
|
# Convert actual feed from rpm to rps, consider gear in use.
|
||||||
|
unlinkp spindle.0.speed-in
|
||||||
|
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||||
|
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||||
|
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||||
|
|
||||||
51
linuxcnc/Turner.2ms/custom_vfd.hal~
Normal file
51
linuxcnc/Turner.2ms/custom_vfd.hal~
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Include your custom HAL commands here
|
||||||
|
|
||||||
|
# Load the Huanyang VFD user component
|
||||||
|
loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -d /dev/hy_vfd -r 19200 -p none -s 1 -b 8
|
||||||
|
|
||||||
|
# motion.spindle-speed-in needs rev per second
|
||||||
|
loadrt scale names=scale.0,scale.1,scale.2
|
||||||
|
# scale.0 gearbox via M101-M106, M101 being lowest gear.
|
||||||
|
# scale.1 Inverted gear ratio
|
||||||
|
# scale.2 motion.spindle-speed.in in rev/sec
|
||||||
|
loadrt limit2 names=spindlemax
|
||||||
|
loadrt mult2 names=mult2.1
|
||||||
|
addf scale.0 servo-thread
|
||||||
|
addf scale.1 servo-thread
|
||||||
|
addf scale.2 servo-thread
|
||||||
|
addf mult2.1 servo-thread
|
||||||
|
addf spindlemax servo-thread
|
||||||
|
setp scale.0.gain 0.8846 # Start with fourth gear
|
||||||
|
setp scale.1.gain 1.13045
|
||||||
|
setp scale.2.gain 0.0166666667
|
||||||
|
setp mult2.1.in1 25.0
|
||||||
|
unlinkp spindle.0.forward
|
||||||
|
unlinkp spindle.0.reverse
|
||||||
|
unlinkp spindle.0.on
|
||||||
|
#unlinkp motion.spindle-at-speed
|
||||||
|
net spindle-fwd spindle.0.forward => spindle-vfd.spindle-forward
|
||||||
|
net spindle-reverse spindle.0.reverse => spindle-vfd.spindle-reverse
|
||||||
|
net spindle-on spindle.0.on => spindle-vfd.spindle-on
|
||||||
|
net spindle-at-speed <= spindle-vfd.spindle-at-speed
|
||||||
|
#net spindle-enable => spindle-vfd.enable
|
||||||
|
setp spindle-vfd.enable 1
|
||||||
|
|
||||||
|
# Prepare max limit rpm for spindle
|
||||||
|
net spindle-max-freq spindle-vfd.max-freq => mult2.1.in0
|
||||||
|
net spindle-max-rpm mult2.1.out => spindlemax.max # Max limit for motor rpm, like 67*25 = 1675
|
||||||
|
|
||||||
|
# Give speed to vfd, limited to max possible
|
||||||
|
unlinkp spindle.0.speed-out-abs
|
||||||
|
net spindle-speed-scale spindle.0.speed-out-abs => scale.1.in # Spindle rpm => Motor rpm
|
||||||
|
net spindle-speed-cmd-unlimited scale.1.out => spindlemax.in # Limit spindle rpm
|
||||||
|
net spindle-speed-cmd-limited spindlemax.out => spindle-vfd.speed-command # Feed to vfd
|
||||||
|
|
||||||
|
# Convert actual feed from rpm to rps, consider gear in use.
|
||||||
|
unlinkp spindle.0.speed-in
|
||||||
|
net spindle-speed-scale2 spindle-vfd.spindle-speed-fb => scale.2.in # Motor rpm => Motor rps
|
||||||
|
net spindle-speed-gears scale.2.out => scale.0.in # Motor rps => spindle rps
|
||||||
|
net spindle-speed-in scale.0.out => spindle.0.speed-in
|
||||||
|
|
||||||
|
# Gamepad
|
||||||
|
loadusr -W hal_input -KRAL F310
|
||||||
|
# Resten är i custom_postgui.hal
|
||||||
49
linuxcnc/Turner.2ms/drilling.ngc
Normal file
49
linuxcnc/Turner.2ms/drilling.ngc
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
;drilling
|
||||||
|
|
||||||
|
; Use T = 0 for tailstock drilling, then this just sets speed
|
||||||
|
|
||||||
|
O<drilling> SUB
|
||||||
|
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
G91.1 ; but not for arcs
|
||||||
|
|
||||||
|
#10 = [#2 * 1000 / [ #1 * 3.141592]]
|
||||||
|
(debug, #10)
|
||||||
|
O90 IF [#7 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
O100 IF [#6 LT 0.5]
|
||||||
|
G97 M3 S#10
|
||||||
|
O<drilling> RETURN
|
||||||
|
O100 ENDIF
|
||||||
|
|
||||||
|
M6 T#6 G43
|
||||||
|
G0 X0
|
||||||
|
|
||||||
|
O83 IF [#5 GT 0] ; Pecking
|
||||||
|
G17
|
||||||
|
G95 F#3 ; Feed-Per-Rev Mode
|
||||||
|
G97 M3 S#10
|
||||||
|
G98
|
||||||
|
G83 R#<_z> Q#5 Z#4
|
||||||
|
M5 M9 G18
|
||||||
|
O<drilling> RETURN
|
||||||
|
O83 ENDIF
|
||||||
|
|
||||||
|
O82 IF [1]; not pecking
|
||||||
|
G17
|
||||||
|
G95 F#3 ; Feed-Per-Rev Mode
|
||||||
|
G97 M3 S#10
|
||||||
|
G98
|
||||||
|
G82 R#<_z> P0.5 Z#4
|
||||||
|
M5 M9 G18
|
||||||
|
O82 ENDIF
|
||||||
|
|
||||||
|
O<drilling> ENDSUB
|
||||||
|
|
||||||
|
O<drilling> call [10] [100] [0.03] [0] [2] [0] [1]
|
||||||
|
|
||||||
|
M2
|
||||||
59
linuxcnc/Turner.2ms/ethercat-conf.xml
Normal file
59
linuxcnc/Turner.2ms/ethercat-conf.xml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<masters>
|
||||||
|
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1">
|
||||||
|
<slave idx="0" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||||
|
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="500000"/>
|
||||||
|
<syncManager idx="2" dir="out">
|
||||||
|
<pdo idx="1600">
|
||||||
|
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1601">
|
||||||
|
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="commanded-position-1" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1602">
|
||||||
|
<pdoEntry idx="7002" subIdx="00" bitLen="32" halPin="commanded-position-2" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1603">
|
||||||
|
<pdoEntry idx="7003" subIdx="00" bitLen="16" halPin="steps-per-mm-1" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1604">
|
||||||
|
<pdoEntry idx="7004" subIdx="00" bitLen="16" halPin="steps-per-mm-2" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
<syncManager idx="3" dir="in">
|
||||||
|
<pdo idx="1a00">
|
||||||
|
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a01">
|
||||||
|
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a02">
|
||||||
|
<pdoEntry idx="6002" subIdx="00" bitLen="16" halPin="DiffT" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a03">
|
||||||
|
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a04">
|
||||||
|
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a05">
|
||||||
|
<pdoEntry idx="6005" subIdx="00" bitLen="32" halPin="actual-position-1" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a06">
|
||||||
|
<pdoEntry idx="6006" subIdx="00" bitLen="32" halPin="actual-position-2" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a07">
|
||||||
|
<pdoEntry idx="6007" subIdx="00" bitLen="16" halPin="D1" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a08">
|
||||||
|
<pdoEntry idx="6008" subIdx="00" bitLen="16" halPin="D2" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a09">
|
||||||
|
<pdoEntry idx="6009" subIdx="00" bitLen="16" halPin="D3" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a0a">
|
||||||
|
<pdoEntry idx="600a" subIdx="00" bitLen="16" halPin="D4" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
</slave>
|
||||||
|
</master>
|
||||||
|
</masters>
|
||||||
82
linuxcnc/Turner.2ms/ethercat-conf.xml.org
Normal file
82
linuxcnc/Turner.2ms/ethercat-conf.xml.org
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<masters>
|
||||||
|
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
|
||||||
|
<slave idx="0" type="EK1100"/>
|
||||||
|
<slave idx="1" type="EL1008"/>
|
||||||
|
<slave idx="2" type="EL2008"/>
|
||||||
|
<slave idx="3" type="EL5101"/>
|
||||||
|
<slave idx="4" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
|
||||||
|
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||||
|
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="b8 0b"/></sdoConfig> <!-- Max motor current (3.0A) -->
|
||||||
|
<sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig> <!-- Standby current percentage (100%) -->
|
||||||
|
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig> <!-- Open loop -->
|
||||||
|
<syncManager idx="2" dir="out">
|
||||||
|
<pdo idx="1600">
|
||||||
|
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
|
||||||
|
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
|
||||||
|
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
|
||||||
|
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
<syncManager idx="3" dir="in">
|
||||||
|
<pdo idx="1a00">
|
||||||
|
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
|
||||||
|
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
|
||||||
|
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
|
||||||
|
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
|
||||||
|
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
</slave>
|
||||||
|
<slave idx="5" type="generic" vid="00000a88" pid="0a880002" configPdos="true">
|
||||||
|
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||||
|
<sdoConfig idx="2000" subIdx="0"><sdoDataRaw data ="68 10"/></sdoConfig> <!-- Max motor current (4.2A) -->
|
||||||
|
<sdoConfig idx="2003" subIdx="0"><sdoDataRaw data ="64 00"/></sdoConfig> <!-- Standby current percentage (100%) -->
|
||||||
|
<sdoConfig idx="2011" subIdx="0"><sdoDataRaw data ="00 00"/></sdoConfig> <!-- Open loop -->
|
||||||
|
<syncManager idx="2" dir="out">
|
||||||
|
<pdo idx="1600">
|
||||||
|
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
|
||||||
|
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
|
||||||
|
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
|
||||||
|
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
<syncManager idx="3" dir="in">
|
||||||
|
<pdo idx="1a00">
|
||||||
|
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
|
||||||
|
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
|
||||||
|
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
|
||||||
|
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
|
||||||
|
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
</slave>
|
||||||
|
<slave idx="6" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||||
|
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||||
|
<syncManager idx="2" dir="out">
|
||||||
|
<pdo idx="1600">
|
||||||
|
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-pos-scale" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1601">
|
||||||
|
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
<syncManager idx="3" dir="in">
|
||||||
|
<pdo idx="1a00">
|
||||||
|
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a01">
|
||||||
|
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a02">
|
||||||
|
<pdoEntry idx="6002" subIdx="00" bitLen="32" halPin="DiffT" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a03">
|
||||||
|
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a04">
|
||||||
|
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
</slave>
|
||||||
|
</master>
|
||||||
|
</masters>
|
||||||
59
linuxcnc/Turner.2ms/ethercat-conf.xml~
Normal file
59
linuxcnc/Turner.2ms/ethercat-conf.xml~
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<masters>
|
||||||
|
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1">
|
||||||
|
<slave idx="0" type="generic" vid="00aaa" pid="000bbbccc" configPdos="true">
|
||||||
|
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
|
||||||
|
<syncManager idx="2" dir="out">
|
||||||
|
<pdo idx="1600">
|
||||||
|
<pdoEntry idx="7000" subIdx="00" bitLen="32" halPin="enc-index-latch-enable" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1601">
|
||||||
|
<pdoEntry idx="7001" subIdx="00" bitLen="32" halPin="commanded-position-1" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1602">
|
||||||
|
<pdoEntry idx="7002" subIdx="00" bitLen="32" halPin="commanded-position-2" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1603">
|
||||||
|
<pdoEntry idx="7003" subIdx="00" bitLen="16" halPin="steps-per-mm-1" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1604">
|
||||||
|
<pdoEntry idx="7004" subIdx="00" bitLen="16" halPin="steps-per-mm-2" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
<syncManager idx="3" dir="in">
|
||||||
|
<pdo idx="1a00">
|
||||||
|
<pdoEntry idx="6000" subIdx="00" bitLen="32" halPin="enc-position" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a01">
|
||||||
|
<pdoEntry idx="6001" subIdx="00" bitLen="32" halPin="enc-frequency" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a02">
|
||||||
|
<pdoEntry idx="6002" subIdx="00" bitLen="16" halPin="DiffT" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a03">
|
||||||
|
<pdoEntry idx="6003" subIdx="00" bitLen="32" halPin="index-byte" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a04">
|
||||||
|
<pdoEntry idx="6004" subIdx="00" bitLen="32" halPin="index-status" halType="u32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a05">
|
||||||
|
<pdoEntry idx="6005" subIdx="00" bitLen="32" halPin="actual-position-1" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a06">
|
||||||
|
<pdoEntry idx="6006" subIdx="00" bitLen="32" halPin="actual-position-2" halType="float-ieee"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a07">
|
||||||
|
<pdoEntry idx="6007" subIdx="00" bitLen="16" halPin="D1" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a08">
|
||||||
|
<pdoEntry idx="6008" subIdx="00" bitLen="16" halPin="D2" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a09">
|
||||||
|
<pdoEntry idx="6009" subIdx="00" bitLen="16" halPin="D3" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
<pdo idx="1a0a">
|
||||||
|
<pdoEntry idx="600a" subIdx="00" bitLen="16" halPin="D4" halType="s32"/>
|
||||||
|
</pdo>
|
||||||
|
</syncManager>
|
||||||
|
</slave>
|
||||||
|
</master>
|
||||||
|
</masters>
|
||||||
45
linuxcnc/Turner.2ms/facing.ngc
Normal file
45
linuxcnc/Turner.2ms/facing.ngc
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
;Facing
|
||||||
|
O<facing> sub
|
||||||
|
|
||||||
|
G7 ; Lathe Diameter Mode
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
|
||||||
|
M6 T#7 G43
|
||||||
|
|
||||||
|
O90 IF [#8 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
O10 IF [#6 NE 0]
|
||||||
|
(MSG, Angled facing isn't supported yet)
|
||||||
|
O10 ENDIF
|
||||||
|
|
||||||
|
#14 = [#<_x> * 2] (starting X)
|
||||||
|
#13 = #<_z> (starting Z)
|
||||||
|
|
||||||
|
G96 D2500 S#2 ; Constant Surface Speed Mode
|
||||||
|
M3
|
||||||
|
g95 F#4 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
g4p1 ; Wait to reach speed
|
||||||
|
|
||||||
|
O200 WHILE [#13 GT #5 + #3]
|
||||||
|
|
||||||
|
#13=[#13-#3]
|
||||||
|
G1 Z#13
|
||||||
|
G1 X#1
|
||||||
|
G0 Z[#13+#3]
|
||||||
|
G0 X#14
|
||||||
|
G0 Z#13
|
||||||
|
O200 ENDWHILE
|
||||||
|
|
||||||
|
G1 Z#5
|
||||||
|
G1 X#1
|
||||||
|
G0 Z[#13+#3]
|
||||||
|
G0 X[#14+#3]
|
||||||
|
G0 Z#5 ; For touch-off
|
||||||
|
M5 M9
|
||||||
|
O<facing> endsub
|
||||||
|
M2
|
||||||
83
linuxcnc/Turner.2ms/gmoccapy_lathe.pref
Normal file
83
linuxcnc/Turner.2ms/gmoccapy_lathe.pref
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
view = y
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 140.4
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = False
|
||||||
|
show_keyboard_on_mdi = False
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
reload_tool = True
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = no
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = True
|
||||||
|
dro_digits = 3
|
||||||
|
toggle_readout = True
|
||||||
|
tool_in_spindle = 3
|
||||||
|
diameter offset_axis_x = 0
|
||||||
|
offset_axis_x = 0.0
|
||||||
|
offset_axis_z = 0.0
|
||||||
|
offset_axis_r = 50.0
|
||||||
|
radius offset_axis_x = 0
|
||||||
|
use_toolmeasurement = False
|
||||||
|
kbd_height = 250
|
||||||
|
icon_theme = None
|
||||||
|
hide_tooltips = False
|
||||||
|
hide_titlebar = False
|
||||||
|
audio_enabled = True
|
||||||
|
|
||||||
72
linuxcnc/Turner.2ms/gmoccapy_lathe_c.pref
Normal file
72
linuxcnc/Turner.2ms/gmoccapy_lathe_c.pref
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
view = y
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 140.4
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = True
|
||||||
|
show_keyboard_on_mdi = True
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
reload_tool = True
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = use
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = False
|
||||||
|
dro_digits = 3
|
||||||
|
toggle_readout = True
|
||||||
|
tool_in_spindle = 0
|
||||||
|
|
||||||
23
linuxcnc/Turner.2ms/gmoccapy_postgui.hal
Normal file
23
linuxcnc/Turner.2ms/gmoccapy_postgui.hal
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
###################################################################
|
||||||
|
# moccapy_postgui.hal file from Norbert Schechner #
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
loadrt abs names=abs_spindle_feedback
|
||||||
|
addf abs_spindle_feedback servo-thread
|
||||||
|
|
||||||
|
net spindle-speed-limited => abs_spindle_feedback.in
|
||||||
|
net spindle-abs abs_spindle_feedback.out => gmoccapy.spindle_feedback_bar
|
||||||
|
net spindle-at-speed gmoccapy.spindle_at_speed_led
|
||||||
|
|
||||||
|
# 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
|
||||||
|
unlinkp iocontrol.0.tool-prep-number
|
||||||
|
|
||||||
|
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 tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
|
||||||
|
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z
|
||||||
32
linuxcnc/Turner.2ms/grooving.ngc
Normal file
32
linuxcnc/Turner.2ms/grooving.ngc
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
;grooving
|
||||||
|
|
||||||
|
O<grooving> sub
|
||||||
|
|
||||||
|
G8 ; Radius mode (easier maths)
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
G91.1 ; but not for arcs
|
||||||
|
|
||||||
|
M6 T#4 G43
|
||||||
|
|
||||||
|
#1 = [#1 / 2] ; because of radius mode
|
||||||
|
|
||||||
|
#14 = [#<_x>] (starting X)
|
||||||
|
|
||||||
|
G96 D1500 S#2 ; Constant Surface Speed Mode
|
||||||
|
m3 ;Start Spindle
|
||||||
|
g95 F#3 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#5 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
g4p1 ; Wait to reach speed
|
||||||
|
G1 F#3 X#1
|
||||||
|
G0 X#14
|
||||||
|
M5 M9
|
||||||
|
G7
|
||||||
|
O<grooving> endsub
|
||||||
|
|
||||||
|
M2
|
||||||
22
linuxcnc/Turner.2ms/halshow.preferences
Normal file
22
linuxcnc/Turner.2ms/halshow.preferences
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Halshow settings
|
||||||
|
# This file is generated automatically.
|
||||||
|
wm geometry . 700x475+1121+46
|
||||||
|
placeFrames 0.3
|
||||||
|
set ::ratio 0.3
|
||||||
|
set ::old_w_leftf 160
|
||||||
|
set ::watchlist {
|
||||||
|
pin+lcec.0.0.DiffT
|
||||||
|
pin+lcec.0.0.D1
|
||||||
|
pin+lcec.0.0.D2
|
||||||
|
pin+lcec.0.0.D3
|
||||||
|
pin+lcec.0.0.D4
|
||||||
|
pin+lcec.0.0.commanded-position-2
|
||||||
|
pin+lcec.0.0.actual-position-2
|
||||||
|
}
|
||||||
|
set ::workmode watchhal
|
||||||
|
set ::watchInterval 100
|
||||||
|
set ::col1_width 100
|
||||||
|
set ::ffmts
|
||||||
|
set ::ifmts
|
||||||
|
set ::alwaysOnTop 0
|
||||||
|
set ::autoSaveWatchlist 1
|
||||||
159
linuxcnc/Turner.2ms/lathe.ini
Normal file
159
linuxcnc/Turner.2ms/lathe.ini
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = gmoccapy_lathe
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 100
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = 250
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
74
linuxcnc/Turner.2ms/lathe.pref
Normal file
74
linuxcnc/Turner.2ms/lathe.pref
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
gremlin_view = rbt_view_y2
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 140.4
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
use_screen2 = False
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
view = p
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = True
|
||||||
|
show_keyboard_on_mdi = True
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
reload_tool = True
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = use
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = False
|
||||||
|
dro_digits = 3
|
||||||
|
toggle_readout = True
|
||||||
|
tool_in_spindle = 0
|
||||||
|
|
||||||
5
linuxcnc/Turner.2ms/lathe.tbl
Normal file
5
linuxcnc/Turner.2ms/lathe.tbl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
T1 P1 X-12.0 Y0.0 Z-25.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.4 I26.0 J86.0 Q2.0 ;60 Grad vorn
|
||||||
|
T2 P2 X-10.356 Y0.0 Z12.123 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I50.0 J85.0 Q2.0 ;35 Grad vorn
|
||||||
|
T3 P3 X1.123 Y0.0 Z25.456 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.4 I-80.0 J-25.0 Q3.0 ;55 Grad vorn
|
||||||
|
T4 P4 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I94.0 J154.0 Q1.0 ;60 Grad Rück
|
||||||
|
T5 P5 X5.737 Y0.0 Z12.2399 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I0.0 J0.0 Q6.0 ;Einstichstahl
|
||||||
182
linuxcnc/Turner.2ms/lathe_C.ini
Normal file
182
linuxcnc/Turner.2ms/lathe_C.ini
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = lathe_c
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe_C.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z C
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZC
|
||||||
|
JOINTS = 3
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
|
||||||
|
[AXIS_C]
|
||||||
|
MAX_VELOCITY = 90.0
|
||||||
|
MAX_ACCELERATION = 1200.0
|
||||||
|
|
||||||
|
[JOINT_2]
|
||||||
|
TYPE = ANGULAR
|
||||||
|
HOME = 0.0
|
||||||
|
MAX_VELOCITY = 90.0
|
||||||
|
MAX_ACCELERATION = 1200.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 40
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
FERROR = 5.0
|
||||||
|
MIN_FERROR = 1.0
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME_SEARCH_VEL = 0.0
|
||||||
|
HOME_LATCH_VEL = 0.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
210
linuxcnc/Turner.2ms/lathe_CW.ini
Normal file
210
linuxcnc/Turner.2ms/lathe_CW.ini
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = lathe_cw
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe_CW.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z C W
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZCW
|
||||||
|
JOINTS = 4
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
|
||||||
|
[AXIS_C]
|
||||||
|
MAX_VELOCITY = 90.0
|
||||||
|
MAX_ACCELERATION = 1200.0
|
||||||
|
|
||||||
|
[JOINT_2]
|
||||||
|
TYPE = ANGULAR
|
||||||
|
HOME = 0.0
|
||||||
|
MAX_VELOCITY = 90.0
|
||||||
|
MAX_ACCELERATION = 1200.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 40
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
FERROR = 5.0
|
||||||
|
MIN_FERROR = 1.0
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME_SEARCH_VEL = 0.0
|
||||||
|
HOME_LATCH_VEL = 0.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
|
||||||
|
|
||||||
|
[AXIS_W]
|
||||||
|
MIN_LIMIT = -200.0
|
||||||
|
MAX_LIMIT = 0.0
|
||||||
|
MAX_VELOCITY = 66
|
||||||
|
MAX_ACCELERATION = 150.0
|
||||||
|
|
||||||
|
[JOINT_3]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 66
|
||||||
|
MAX_ACCELERATION = 150.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -200.0
|
||||||
|
MAX_LIMIT = 0.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 0.0
|
||||||
|
HOME_SEARCH_VEL = 0.0
|
||||||
|
HOME_LATCH_VEL = 0.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
160
linuxcnc/Turner.2ms/lathe_backtool.ini
Normal file
160
linuxcnc/Turner.2ms/lathe_backtool.ini
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = gmoccapy_lathe
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 1
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
73
linuxcnc/Turner.2ms/lathe_c.pref
Normal file
73
linuxcnc/Turner.2ms/lathe_c.pref
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
reload_tool = True
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = True
|
||||||
|
show_keyboard_on_mdi = False
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rotation of Z
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
unlock_way = no
|
||||||
|
grid_size = 1.0
|
||||||
|
view = y2
|
||||||
|
gremlin_view = rbt_view_y
|
||||||
|
tool_in_spindle = 0
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 140.4
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
hide_cursor = False
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
run_from_line = run
|
||||||
|
show_preview_on_offset = True
|
||||||
|
use_keyboard_shortcuts = True
|
||||||
|
dro_digits = 3
|
||||||
|
toggle_readout = True
|
||||||
|
|
||||||
72
linuxcnc/Turner.2ms/lathe_cw.pref
Normal file
72
linuxcnc/Turner.2ms/lathe_cw.pref
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
view = y2
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 140.4
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = False
|
||||||
|
show_keyboard_on_mdi = False
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
reload_tool = True
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = no
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = True
|
||||||
|
dro_digits = 3
|
||||||
|
toggle_readout = True
|
||||||
|
tool_in_spindle = 2
|
||||||
|
|
||||||
160
linuxcnc/Turner.2ms/lathe_imperial.ini
Normal file
160
linuxcnc/Turner.2ms/lathe_imperial.ini
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = lathe_imperial
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 0.4 inch, 0.04 inch , 0.004 inch, 0.0004 inch
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G20 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.001
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = inch
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 1.6
|
||||||
|
MAX_LINEAR_VELOCITY = 10
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -2.0
|
||||||
|
MAX_LIMIT = 40.0
|
||||||
|
MAX_VELOCITY = 6.5
|
||||||
|
MAX_ACCELERATION = 59.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 6.5
|
||||||
|
MAX_ACCELERATION = 59.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -2.0
|
||||||
|
MAX_LIMIT = 40.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 4
|
||||||
|
HOME_SEARCH_VEL = 40.0
|
||||||
|
HOME_LATCH_VEL = 2.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -3.0
|
||||||
|
MAX_LIMIT = 400.0
|
||||||
|
MAX_VELOCITY = 6.5
|
||||||
|
MAX_ACCELERATION = 59.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 6.5
|
||||||
|
MAX_ACCELERATION = 59.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -3.0
|
||||||
|
MAX_LIMIT = 400.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -4
|
||||||
|
HOME_SEARCH_VEL = 40.0
|
||||||
|
HOME_LATCH_VEL = 2.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
# Sections for display options ------------------------------------------------
|
||||||
71
linuxcnc/Turner.2ms/lathe_imperial.pref
Normal file
71
linuxcnc/Turner.2ms/lathe_imperial.pref
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
dro_size = 28
|
||||||
|
abs_color = #0000FF
|
||||||
|
rel_color = #000000
|
||||||
|
dtg_color = #FFFF00
|
||||||
|
homed_color = #00FF00
|
||||||
|
unhomed_color = #FF0000
|
||||||
|
spindle_bar_min = 0.0
|
||||||
|
spindle_bar_max = 6000.0
|
||||||
|
unlock_code = 123
|
||||||
|
blockheight = 0.0
|
||||||
|
spindle_start_rpm = 300.0
|
||||||
|
scale_jog_vel = 6.0
|
||||||
|
scale_spindle_override = 1
|
||||||
|
scale_feed_override = 1
|
||||||
|
scale_rapid_override = 1
|
||||||
|
hide_turtle_jog_button = False
|
||||||
|
turtle_jog_factor = 20
|
||||||
|
open_file =
|
||||||
|
screen1 = window
|
||||||
|
x_pos = 40
|
||||||
|
y_pos = 30
|
||||||
|
width = 979
|
||||||
|
height = 750
|
||||||
|
gtk_theme = Follow System Theme
|
||||||
|
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
|
||||||
|
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
|
||||||
|
grid_size = 1.0
|
||||||
|
mouse_btn_mode = 4
|
||||||
|
hide_cursor = False
|
||||||
|
system_name_tool = Tool
|
||||||
|
system_name_g5x = G5x
|
||||||
|
system_name_rot = Rot
|
||||||
|
system_name_g92 = G92
|
||||||
|
system_name_g54 = G54
|
||||||
|
system_name_g55 = G55
|
||||||
|
system_name_g56 = G56
|
||||||
|
system_name_g57 = G57
|
||||||
|
system_name_g58 = G58
|
||||||
|
system_name_g59 = G59
|
||||||
|
system_name_g59.1 = G59.1
|
||||||
|
system_name_g59.2 = G59.2
|
||||||
|
system_name_g59.3 = G59.3
|
||||||
|
jump_to_dir = /home/emcmesa
|
||||||
|
show_keyboard_on_offset = False
|
||||||
|
show_keyboard_on_tooledit = False
|
||||||
|
show_keyboard_on_edit = True
|
||||||
|
show_keyboard_on_mdi = True
|
||||||
|
show_keyboard_on_file_selection = False
|
||||||
|
x_pos_popup = 45.0
|
||||||
|
y_pos_popup = 55
|
||||||
|
width_popup = 250.0
|
||||||
|
max_messages = 10
|
||||||
|
message_font = sans 10
|
||||||
|
use_frames = True
|
||||||
|
reload_tool = True
|
||||||
|
blockdel = False
|
||||||
|
opstop = False
|
||||||
|
enable_dro = False
|
||||||
|
show_offsets = False
|
||||||
|
show_dtg = False
|
||||||
|
view_tool_path = True
|
||||||
|
view_dimension = True
|
||||||
|
run_from_line = no_run
|
||||||
|
unlock_way = use
|
||||||
|
show_preview_on_offset = False
|
||||||
|
use_keyboard_shortcuts = False
|
||||||
|
dro_digits = 4
|
||||||
|
toggle_readout = True
|
||||||
|
view = y
|
||||||
|
|
||||||
165
linuxcnc/Turner.2ms/lathe_macros.ini
Normal file
165
linuxcnc/Turner.2ms/lathe_macros.ini
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
# EMC controller parameters for a simulated machine.
|
||||||
|
# General note: Comments can either be preceded with a # or ; - either is
|
||||||
|
# acceptable, although # is in keeping with most linux config files.
|
||||||
|
|
||||||
|
# General section -------------------------------------------------------------
|
||||||
|
[EMC]
|
||||||
|
VERSION = 1.1
|
||||||
|
MACHINE = gmoccapy_lathe
|
||||||
|
#DEBUG = 0x7FFFFFFF
|
||||||
|
DEBUG = 0
|
||||||
|
|
||||||
|
# for details see nc_files/subroutines/maco_instructions.txt
|
||||||
|
[DISPLAY]
|
||||||
|
DISPLAY = gmoccapy
|
||||||
|
LATHE = 1
|
||||||
|
BACK_TOOL_LATHE = 0
|
||||||
|
|
||||||
|
# Cycle time, in milliseconds, that display will sleep between polls
|
||||||
|
CYCLE_TIME = 100
|
||||||
|
|
||||||
|
# Highest value that will be allowed for feed override, 1.0 = 100%
|
||||||
|
MAX_FEED_OVERRIDE = 1.5
|
||||||
|
MAX_SPINDLE_OVERRIDE = 1.2
|
||||||
|
MIN_SPINDLE_OVERRIDE = .5
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix to be used
|
||||||
|
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
|
||||||
|
|
||||||
|
# Introductory graphic
|
||||||
|
INTRO_GRAPHIC = linuxcnc.gif
|
||||||
|
INTRO_TIME = 5
|
||||||
|
|
||||||
|
# list of selectable jog increments
|
||||||
|
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm
|
||||||
|
|
||||||
|
EMBED_TAB_NAME = Cycles
|
||||||
|
EMBED_TAB_LOCATION = ntb_preview
|
||||||
|
#EMBED_TAB_LOCATION = ntb_user_tabs
|
||||||
|
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -U notouch=1 -U norun=0 -u lathehandler.py -x {XID} lathemacro.ui
|
||||||
|
|
||||||
|
[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 = python
|
||||||
|
|
||||||
|
# Task controller section -----------------------------------------------------
|
||||||
|
[RS274NGC]
|
||||||
|
RS274NGC_STARTUP_CODE = G18 G21 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
|
||||||
|
PARAMETER_FILE = sim.var
|
||||||
|
SUBROUTINE_PATH = macros:./
|
||||||
|
|
||||||
|
# Motion control section ------------------------------------------------------
|
||||||
|
[EMCMOT]
|
||||||
|
EMCMOT = motmod
|
||||||
|
COMM_TIMEOUT = 1.0
|
||||||
|
BASE_PERIOD = 100000
|
||||||
|
SERVO_PERIOD = 1000000
|
||||||
|
|
||||||
|
# Hardware Abstraction Layer section --------------------------------------------------
|
||||||
|
[TASK]
|
||||||
|
TASK = milltask
|
||||||
|
CYCLE_TIME = 0.001
|
||||||
|
|
||||||
|
# Part program interpreter section --------------------------------------------
|
||||||
|
[HAL]
|
||||||
|
HALFILE = core_sim_lathe.hal
|
||||||
|
HALFILE = spindle_sim.hal
|
||||||
|
HALFILE = simulated_home_lathe.hal
|
||||||
|
|
||||||
|
# Single file that is executed after the GUI has started.
|
||||||
|
#POSTGUI_HALFILE = gmoccapy_postgui.hal
|
||||||
|
|
||||||
|
HALUI = halui
|
||||||
|
|
||||||
|
# Trajectory planner section --------------------------------------------------
|
||||||
|
[HALUI]
|
||||||
|
#No Content
|
||||||
|
|
||||||
|
[TRAJ]
|
||||||
|
COORDINATES = X Z
|
||||||
|
LINEAR_UNITS = mm
|
||||||
|
ANGULAR_UNITS = degree
|
||||||
|
DEFAULT_LINEAR_VELOCITY = 50
|
||||||
|
MAX_LINEAR_VELOCITY = 234
|
||||||
|
POSITION_FILE = position.txt
|
||||||
|
#NO_FORCE_HOMING = 1
|
||||||
|
|
||||||
|
# First axis
|
||||||
|
[EMCIO]
|
||||||
|
EMCIO = io
|
||||||
|
CYCLE_TIME = 0.100
|
||||||
|
|
||||||
|
# tool table file
|
||||||
|
TOOL_TABLE = lathe.tbl
|
||||||
|
|
||||||
|
[KINS]
|
||||||
|
KINEMATICS = trivkins coordinates=XZ
|
||||||
|
JOINTS = 2
|
||||||
|
|
||||||
|
[AXIS_X]
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_0]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -50.0
|
||||||
|
MAX_LIMIT = 200.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 0.0
|
||||||
|
HOME = 10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 1
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# Third axis
|
||||||
|
[AXIS_Z]
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
|
||||||
|
[JOINT_1]
|
||||||
|
TYPE = LINEAR
|
||||||
|
MAX_VELOCITY = 166
|
||||||
|
MAX_ACCELERATION = 1500.0
|
||||||
|
BACKLASH = 0.000
|
||||||
|
INPUT_SCALE = 4000
|
||||||
|
OUTPUT_SCALE = 1.000
|
||||||
|
MIN_LIMIT = -75.0
|
||||||
|
MAX_LIMIT = 1000.0
|
||||||
|
FERROR = 0.050
|
||||||
|
MIN_FERROR = 0.010
|
||||||
|
HOME_OFFSET = 1.0
|
||||||
|
HOME = -10
|
||||||
|
HOME_SEARCH_VEL = 200.0
|
||||||
|
HOME_LATCH_VEL = 20.0
|
||||||
|
HOME_USE_INDEX = NO
|
||||||
|
HOME_IGNORE_LIMITS = NO
|
||||||
|
HOME_SEQUENCE = 0
|
||||||
|
HOME_IS_SHARED = 1
|
||||||
|
|
||||||
|
# section for main IO controller parameters -----------------------------------
|
||||||
|
[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
|
||||||
|
|
||||||
|
|
||||||
217
linuxcnc/Turner.2ms/lathehandler.py
Executable file
217
linuxcnc/Turner.2ms/lathehandler.py
Executable file
@@ -0,0 +1,217 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# vim: sts=4 sw=4 et
|
||||||
|
# This is a component of EMC
|
||||||
|
# savestate.py copyright 2013 Andy Pugh
|
||||||
|
# based on code from
|
||||||
|
# probe.py Copyright 2010 Michael Haberler
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA''''''
|
||||||
|
|
||||||
|
import os,sys
|
||||||
|
from gladevcp.persistence import IniFile,widget_defaults,set_debug,select_widgets
|
||||||
|
import hal
|
||||||
|
import hal_glib
|
||||||
|
import glib
|
||||||
|
import linuxcnc
|
||||||
|
import cairo
|
||||||
|
import signal
|
||||||
|
import re
|
||||||
|
import gi
|
||||||
|
gi.require_version('Rsvg', '2.0')
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import Gdk
|
||||||
|
from gi.repository import GObject
|
||||||
|
from gi.repository import Pango
|
||||||
|
from gi.repository import Rsvg
|
||||||
|
from gi.repository import GdkPixbuf
|
||||||
|
debug = 0
|
||||||
|
notouch = 0
|
||||||
|
norun = 0
|
||||||
|
|
||||||
|
class HandlerClass:
|
||||||
|
active = False
|
||||||
|
tab_num = 0
|
||||||
|
|
||||||
|
def on_expose(self,nb,data=None):
|
||||||
|
tab_num = nb.get_current_page()
|
||||||
|
tab = nb.get_nth_page(tab_num)
|
||||||
|
alloc = tab.get_allocation()
|
||||||
|
x, y, w, h = (alloc.x, alloc.y, alloc.width, alloc.height)
|
||||||
|
pixbuf = self.svg.get_pixbuf_sub(f'#layer{tab_num}').scale_simple(w-10, h-10, GdkPixbuf.InterpType.BILINEAR)
|
||||||
|
im = self.builder.get_object(f'Image{tab_num}')
|
||||||
|
im.set_from_pixbuf(pixbuf)
|
||||||
|
for c in im.get_parent().get_children():
|
||||||
|
if c.get_has_tooltip():
|
||||||
|
m = re.findall(r'<!--(\d+),(\d+)-->', c.get_tooltip_markup())
|
||||||
|
if len(m) > 0:
|
||||||
|
x1 = int(m[0][0]); y1 = int(m[0][1])
|
||||||
|
c.set_margin_left(max(0, w * x1/1500))
|
||||||
|
c.set_margin_top(max(0, h * y1/1000))
|
||||||
|
|
||||||
|
|
||||||
|
# decide if our window is active to mask the cycle-start hardware button
|
||||||
|
# FIXME: This is probably not as reliable as one might wish.
|
||||||
|
def event(self,w,event):
|
||||||
|
if w.is_active():
|
||||||
|
if w.has_toplevel_focus() :
|
||||||
|
self.active = True
|
||||||
|
else:
|
||||||
|
self.active = False
|
||||||
|
|
||||||
|
# Capture notify events
|
||||||
|
def on_map_event(self, widget, data=None):
|
||||||
|
top = widget.get_toplevel()
|
||||||
|
top.connect('notify', self.event)
|
||||||
|
|
||||||
|
def on_destroy(self,obj,data=None):
|
||||||
|
self.ini.save_state(self)
|
||||||
|
|
||||||
|
def on_restore_defaults(self,button,data=None):
|
||||||
|
'''
|
||||||
|
example callback for 'Reset to defaults' button
|
||||||
|
currently unused
|
||||||
|
'''
|
||||||
|
self.ini.create_default_ini()
|
||||||
|
self.ini.restore_state(self)
|
||||||
|
|
||||||
|
def __init__(self, halcomp,builder,useropts):
|
||||||
|
self.halcomp = halcomp
|
||||||
|
self.builder = builder
|
||||||
|
self.ini_filename = 'savestate.sav'
|
||||||
|
self.defaults = { IniFile.vars: dict(),
|
||||||
|
IniFile.widgets : widget_defaults(select_widgets(self.builder.get_objects(),
|
||||||
|
hal_only=False,output_only = True))
|
||||||
|
}
|
||||||
|
self.ini = IniFile(self.ini_filename,self.defaults,self.builder)
|
||||||
|
self.ini.restore_state(self)
|
||||||
|
|
||||||
|
# A pin to use a physical switch to start the cycle
|
||||||
|
self.cycle_start = hal_glib.GPin(halcomp.newpin('cycle-start', hal.HAL_BIT, hal.HAL_IN))
|
||||||
|
self.cycle_start.connect('value-changed', self.cycle_pin)
|
||||||
|
|
||||||
|
# This catches the signal from Touchy to say that the tab is exposed
|
||||||
|
t = self.builder.get_object('macrobox')
|
||||||
|
t.connect('map-event',self.on_map_event)
|
||||||
|
t.add_events(Gdk.EventMask.STRUCTURE_MASK)
|
||||||
|
|
||||||
|
self.cmd = linuxcnc.command()
|
||||||
|
|
||||||
|
# This connects the expose event to re-draw and scale the SVG frames
|
||||||
|
t = self.builder.get_object('tabs1')
|
||||||
|
t.connect_after("draw", self.on_expose)
|
||||||
|
t.connect("destroy", Gtk.main_quit)
|
||||||
|
t.add_events(Gdk.EventMask.STRUCTURE_MASK)
|
||||||
|
self.svg = Rsvg.Handle().new_from_file('LatheMacro.svg')
|
||||||
|
self.active = True
|
||||||
|
|
||||||
|
# handle Useropts
|
||||||
|
if norun:
|
||||||
|
for c in range(0,6):
|
||||||
|
print(c)
|
||||||
|
print( f'tab{c}.action')
|
||||||
|
self.builder.get_object(f'tab{c}.action').set_visible(False)
|
||||||
|
|
||||||
|
def show_keyb(self, obj, data=None):
|
||||||
|
if notouch: return False
|
||||||
|
self.active_ctrl = obj
|
||||||
|
self.keyb = self.builder.get_object('keyboard')
|
||||||
|
self.entry = self.builder.get_object('entry1')
|
||||||
|
self.entry.modify_font(Pango.FontDescription("courier 42"))
|
||||||
|
self.entry.set_text("")
|
||||||
|
resp = self.keyb.run()
|
||||||
|
return True
|
||||||
|
|
||||||
|
def keyb_prev_click(self, obj, data=None):
|
||||||
|
self.entry.set_text(self.active_ctrl.get_text())
|
||||||
|
|
||||||
|
def keyb_number_click(self, obj, data=None):
|
||||||
|
data = self.entry.get_text()
|
||||||
|
data = data + obj.get_label()
|
||||||
|
if any( x in data for x in [ '/2', '/4', '/8', '/16', '/32', '/64', '/128']):
|
||||||
|
v = [0] + [float(x) for x in data.replace('/','.').split('.')]
|
||||||
|
data = f'{v[-3] + v[-2]/v[-1]:6.7}'
|
||||||
|
self.entry.set_text(data)
|
||||||
|
|
||||||
|
def keyb_pm_click(self, obj, data=None):
|
||||||
|
data = self.entry.get_text()
|
||||||
|
if data[0] == '-':
|
||||||
|
data = data[1:]
|
||||||
|
else:
|
||||||
|
data = '-' + data
|
||||||
|
self.entry.set_text(data)
|
||||||
|
|
||||||
|
def keyb_convert_click(self, obj, data=None):
|
||||||
|
v = float(self.entry.get_text())
|
||||||
|
op = obj.get_label()
|
||||||
|
if op == 'in->mm':
|
||||||
|
self.entry.set_text(f'{v * 25.4:6.4}')
|
||||||
|
elif op == 'mm->in':
|
||||||
|
self.entry.set_text(f'{v / 25.4:6.4}')
|
||||||
|
elif op == 'tpi->pitch':
|
||||||
|
self.entry.set_text(f'{25.4 / v:6.4}')
|
||||||
|
elif op == 'pitch->tpi':
|
||||||
|
self.entry.set_text(f'{25.4 / v:6.4}')
|
||||||
|
|
||||||
|
def keyb_del_click(self, obj, data=None):
|
||||||
|
data = self.entry.get_text()
|
||||||
|
data = data[:-1]
|
||||||
|
self.entry.set_text(data)
|
||||||
|
|
||||||
|
def keyb_clear_click(self, obj, data=None):
|
||||||
|
self.entry.set_text('')
|
||||||
|
|
||||||
|
def keyb_cancel_click(self, obj, data=None):
|
||||||
|
self.keyb.hide()
|
||||||
|
|
||||||
|
def keyb_ok_click(self, obj, data=None):
|
||||||
|
if self.entry.get_text() != '':
|
||||||
|
self.active_ctrl.set_value(float(self.entry.get_text()))
|
||||||
|
self.keyb.hide()
|
||||||
|
|
||||||
|
def set_alpha(self, obj, data = None):
|
||||||
|
cr = obj.get_property('window').cairo_create()
|
||||||
|
cr.set_source_rgba(1.0, 1.0, 1.0, 0.0)
|
||||||
|
|
||||||
|
def cycle_pin(self, pin, data = None):
|
||||||
|
if pin.get() == 0:
|
||||||
|
return
|
||||||
|
if self.active:
|
||||||
|
nb = self.builder.get_object('tabs1')
|
||||||
|
print('current tab', nb.get_current_page())
|
||||||
|
c = self.builder.get_object(f"tab{nb.get_current_page()}.action")
|
||||||
|
if c is not None:
|
||||||
|
self.cmd.abort()
|
||||||
|
self.cmd.mode(linuxcnc.MODE_MDI)
|
||||||
|
self.cmd.wait_complete()
|
||||||
|
c.emit('clicked')
|
||||||
|
print(c.get_name(), "clicked")
|
||||||
|
|
||||||
|
def testing(self, obj, data = None):
|
||||||
|
print('event', data)
|
||||||
|
|
||||||
|
def get_handlers(halcomp,builder,useropts):
|
||||||
|
|
||||||
|
global debug
|
||||||
|
for cmd in useropts:
|
||||||
|
print(cmd)
|
||||||
|
exec(cmd, globals())
|
||||||
|
|
||||||
|
set_debug(debug)
|
||||||
|
return [HandlerClass(halcomp,builder,useropts)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2937
linuxcnc/Turner.2ms/lathemacro.ui
Normal file
2937
linuxcnc/Turner.2ms/lathemacro.ui
Normal file
File diff suppressed because it is too large
Load Diff
119
linuxcnc/Turner.2ms/linuxcnc.var
Normal file
119
linuxcnc/Turner.2ms/linuxcnc.var
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
5161 0.000000
|
||||||
|
5162 0.000000
|
||||||
|
5163 0.000000
|
||||||
|
5164 0.000000
|
||||||
|
5165 0.000000
|
||||||
|
5166 0.000000
|
||||||
|
5167 0.000000
|
||||||
|
5168 0.000000
|
||||||
|
5169 0.000000
|
||||||
|
5181 0.000000
|
||||||
|
5182 0.000000
|
||||||
|
5183 0.000000
|
||||||
|
5184 0.000000
|
||||||
|
5185 0.000000
|
||||||
|
5186 0.000000
|
||||||
|
5187 0.000000
|
||||||
|
5188 0.000000
|
||||||
|
5189 0.000000
|
||||||
|
5210 0.000000
|
||||||
|
5211 0.000000
|
||||||
|
5212 0.000000
|
||||||
|
5213 0.000000
|
||||||
|
5214 0.000000
|
||||||
|
5215 0.000000
|
||||||
|
5216 0.000000
|
||||||
|
5217 0.000000
|
||||||
|
5218 0.000000
|
||||||
|
5219 0.000000
|
||||||
|
5220 1.000000
|
||||||
|
5221 0.000000
|
||||||
|
5222 0.000000
|
||||||
|
5223 -138.733334
|
||||||
|
5224 0.000000
|
||||||
|
5225 0.000000
|
||||||
|
5226 0.000000
|
||||||
|
5227 0.000000
|
||||||
|
5228 0.000000
|
||||||
|
5229 0.000000
|
||||||
|
5230 0.000000
|
||||||
|
5241 0.000000
|
||||||
|
5242 0.000000
|
||||||
|
5243 0.000000
|
||||||
|
5244 0.000000
|
||||||
|
5245 0.000000
|
||||||
|
5246 0.000000
|
||||||
|
5247 0.000000
|
||||||
|
5248 0.000000
|
||||||
|
5249 0.000000
|
||||||
|
5250 0.000000
|
||||||
|
5261 0.000000
|
||||||
|
5262 0.000000
|
||||||
|
5263 0.000000
|
||||||
|
5264 0.000000
|
||||||
|
5265 0.000000
|
||||||
|
5266 0.000000
|
||||||
|
5267 0.000000
|
||||||
|
5268 0.000000
|
||||||
|
5269 0.000000
|
||||||
|
5270 0.000000
|
||||||
|
5281 0.000000
|
||||||
|
5282 0.000000
|
||||||
|
5283 0.000000
|
||||||
|
5284 0.000000
|
||||||
|
5285 0.000000
|
||||||
|
5286 0.000000
|
||||||
|
5287 0.000000
|
||||||
|
5288 0.000000
|
||||||
|
5289 0.000000
|
||||||
|
5290 0.000000
|
||||||
|
5301 0.000000
|
||||||
|
5302 0.000000
|
||||||
|
5303 0.000000
|
||||||
|
5304 0.000000
|
||||||
|
5305 0.000000
|
||||||
|
5306 0.000000
|
||||||
|
5307 0.000000
|
||||||
|
5308 0.000000
|
||||||
|
5309 0.000000
|
||||||
|
5310 0.000000
|
||||||
|
5321 0.000000
|
||||||
|
5322 0.000000
|
||||||
|
5323 0.000000
|
||||||
|
5324 0.000000
|
||||||
|
5325 0.000000
|
||||||
|
5326 0.000000
|
||||||
|
5327 0.000000
|
||||||
|
5328 0.000000
|
||||||
|
5329 0.000000
|
||||||
|
5330 0.000000
|
||||||
|
5341 0.000000
|
||||||
|
5342 0.000000
|
||||||
|
5343 0.000000
|
||||||
|
5344 0.000000
|
||||||
|
5345 0.000000
|
||||||
|
5346 0.000000
|
||||||
|
5347 0.000000
|
||||||
|
5348 0.000000
|
||||||
|
5349 0.000000
|
||||||
|
5350 0.000000
|
||||||
|
5361 0.000000
|
||||||
|
5362 0.000000
|
||||||
|
5363 0.000000
|
||||||
|
5364 0.000000
|
||||||
|
5365 0.000000
|
||||||
|
5366 0.000000
|
||||||
|
5367 0.000000
|
||||||
|
5368 0.000000
|
||||||
|
5369 0.000000
|
||||||
|
5370 0.000000
|
||||||
|
5381 0.000000
|
||||||
|
5382 0.000000
|
||||||
|
5383 0.000000
|
||||||
|
5384 0.000000
|
||||||
|
5385 0.000000
|
||||||
|
5386 0.000000
|
||||||
|
5387 0.000000
|
||||||
|
5388 0.000000
|
||||||
|
5389 0.000000
|
||||||
|
5390 0.000000
|
||||||
119
linuxcnc/Turner.2ms/linuxcnc.var.bak
Normal file
119
linuxcnc/Turner.2ms/linuxcnc.var.bak
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
5161 0.000000
|
||||||
|
5162 0.000000
|
||||||
|
5163 0.000000
|
||||||
|
5164 0.000000
|
||||||
|
5165 0.000000
|
||||||
|
5166 0.000000
|
||||||
|
5167 0.000000
|
||||||
|
5168 0.000000
|
||||||
|
5169 0.000000
|
||||||
|
5181 0.000000
|
||||||
|
5182 0.000000
|
||||||
|
5183 0.000000
|
||||||
|
5184 0.000000
|
||||||
|
5185 0.000000
|
||||||
|
5186 0.000000
|
||||||
|
5187 0.000000
|
||||||
|
5188 0.000000
|
||||||
|
5189 0.000000
|
||||||
|
5210 0.000000
|
||||||
|
5211 0.000000
|
||||||
|
5212 0.000000
|
||||||
|
5213 0.000000
|
||||||
|
5214 0.000000
|
||||||
|
5215 0.000000
|
||||||
|
5216 0.000000
|
||||||
|
5217 0.000000
|
||||||
|
5218 0.000000
|
||||||
|
5219 0.000000
|
||||||
|
5220 1.000000
|
||||||
|
5221 0.000000
|
||||||
|
5222 0.000000
|
||||||
|
5223 -138.733334
|
||||||
|
5224 0.000000
|
||||||
|
5225 0.000000
|
||||||
|
5226 0.000000
|
||||||
|
5227 0.000000
|
||||||
|
5228 0.000000
|
||||||
|
5229 0.000000
|
||||||
|
5230 0.000000
|
||||||
|
5241 0.000000
|
||||||
|
5242 0.000000
|
||||||
|
5243 0.000000
|
||||||
|
5244 0.000000
|
||||||
|
5245 0.000000
|
||||||
|
5246 0.000000
|
||||||
|
5247 0.000000
|
||||||
|
5248 0.000000
|
||||||
|
5249 0.000000
|
||||||
|
5250 0.000000
|
||||||
|
5261 0.000000
|
||||||
|
5262 0.000000
|
||||||
|
5263 0.000000
|
||||||
|
5264 0.000000
|
||||||
|
5265 0.000000
|
||||||
|
5266 0.000000
|
||||||
|
5267 0.000000
|
||||||
|
5268 0.000000
|
||||||
|
5269 0.000000
|
||||||
|
5270 0.000000
|
||||||
|
5281 0.000000
|
||||||
|
5282 0.000000
|
||||||
|
5283 0.000000
|
||||||
|
5284 0.000000
|
||||||
|
5285 0.000000
|
||||||
|
5286 0.000000
|
||||||
|
5287 0.000000
|
||||||
|
5288 0.000000
|
||||||
|
5289 0.000000
|
||||||
|
5290 0.000000
|
||||||
|
5301 0.000000
|
||||||
|
5302 0.000000
|
||||||
|
5303 0.000000
|
||||||
|
5304 0.000000
|
||||||
|
5305 0.000000
|
||||||
|
5306 0.000000
|
||||||
|
5307 0.000000
|
||||||
|
5308 0.000000
|
||||||
|
5309 0.000000
|
||||||
|
5310 0.000000
|
||||||
|
5321 0.000000
|
||||||
|
5322 0.000000
|
||||||
|
5323 0.000000
|
||||||
|
5324 0.000000
|
||||||
|
5325 0.000000
|
||||||
|
5326 0.000000
|
||||||
|
5327 0.000000
|
||||||
|
5328 0.000000
|
||||||
|
5329 0.000000
|
||||||
|
5330 0.000000
|
||||||
|
5341 0.000000
|
||||||
|
5342 0.000000
|
||||||
|
5343 0.000000
|
||||||
|
5344 0.000000
|
||||||
|
5345 0.000000
|
||||||
|
5346 0.000000
|
||||||
|
5347 0.000000
|
||||||
|
5348 0.000000
|
||||||
|
5349 0.000000
|
||||||
|
5350 0.000000
|
||||||
|
5361 0.000000
|
||||||
|
5362 0.000000
|
||||||
|
5363 0.000000
|
||||||
|
5364 0.000000
|
||||||
|
5365 0.000000
|
||||||
|
5366 0.000000
|
||||||
|
5367 0.000000
|
||||||
|
5368 0.000000
|
||||||
|
5369 0.000000
|
||||||
|
5370 0.000000
|
||||||
|
5381 0.000000
|
||||||
|
5382 0.000000
|
||||||
|
5383 0.000000
|
||||||
|
5384 0.000000
|
||||||
|
5385 0.000000
|
||||||
|
5386 0.000000
|
||||||
|
5387 0.000000
|
||||||
|
5388 0.000000
|
||||||
|
5389 0.000000
|
||||||
|
5390 0.000000
|
||||||
14
linuxcnc/Turner.2ms/metalmusings_encoder.comp
Normal file
14
linuxcnc/Turner.2ms/metalmusings_encoder.comp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
component metalmusings_encoder;
|
||||||
|
pin io bit index-c-enable;
|
||||||
|
pin in u32 index-status;
|
||||||
|
pin out u32 index-latch-enable;
|
||||||
|
|
||||||
|
function _;
|
||||||
|
license "GPL";
|
||||||
|
;;
|
||||||
|
|
||||||
|
//main function
|
||||||
|
FUNCTION(_) {
|
||||||
|
index_latch_enable = index_c_enable;
|
||||||
|
index_c_enable = index_status;
|
||||||
|
}
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M101
Executable file
6
linuxcnc/Turner.2ms/nc_files/M101
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=0.1923
|
||||||
|
MAXRPM=380
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M102
Executable file
6
linuxcnc/Turner.2ms/nc_files/M102
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=0.3189
|
||||||
|
MAXRPM=630
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M103
Executable file
6
linuxcnc/Turner.2ms/nc_files/M103
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=0.4638
|
||||||
|
MAXRPM=920
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M104
Executable file
6
linuxcnc/Turner.2ms/nc_files/M104
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=0.8846
|
||||||
|
MAXRPM=1770
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M105
Executable file
6
linuxcnc/Turner.2ms/nc_files/M105
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=1.4672
|
||||||
|
MAXRPM=2930
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
6
linuxcnc/Turner.2ms/nc_files/M106
Executable file
6
linuxcnc/Turner.2ms/nc_files/M106
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
R=2.1334
|
||||||
|
MAXRPM=4260
|
||||||
|
halcmd setp scale.0.gain $R
|
||||||
|
halcmd setp scale.1.gain $(echo "scale=5;1.0 / $R"| bc -q)
|
||||||
|
exit 0
|
||||||
10
linuxcnc/Turner.2ms/nc_files/M111
Executable file
10
linuxcnc/Turner.2ms/nc_files/M111
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
%
|
||||||
|
(1)
|
||||||
|
#1 = 0
|
||||||
|
o100 while [#1 LT 10]
|
||||||
|
G0 X-200 Z-200
|
||||||
|
G0 X200 Z200
|
||||||
|
#1 = [#1+1]
|
||||||
|
o100 endwhile
|
||||||
|
M2
|
||||||
|
%
|
||||||
16
linuxcnc/Turner.2ms/position.txt
Normal file
16
linuxcnc/Turner.2ms/position.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
0.55999995357589616
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
|
0.00000000000000000
|
||||||
3
linuxcnc/Turner.2ms/postgui_call_list.hal
Normal file
3
linuxcnc/Turner.2ms/postgui_call_list.hal
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# These files are loaded post GUI, in the order they appear
|
||||||
|
|
||||||
|
source custom_postgui.hal
|
||||||
76
linuxcnc/Turner.2ms/radius.ngc
Normal file
76
linuxcnc/Turner.2ms/radius.ngc
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
;radius
|
||||||
|
|
||||||
|
O<radius> sub
|
||||||
|
|
||||||
|
G8 ; Lathe radius Mode
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
|
||||||
|
|
||||||
|
M6 T#6 G43
|
||||||
|
|
||||||
|
#1 = [#1 / 2] ; because of radius mode
|
||||||
|
#14 = [#<_x>] (starting X)
|
||||||
|
#13 = [#<_z>] (starting Z)
|
||||||
|
|
||||||
|
G96 D2400 S#2 ; Constant Surface Speed Mode
|
||||||
|
M3
|
||||||
|
g95 F0.1 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#12 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
#20 = 0
|
||||||
|
O101 if [#9 GT 0.5] ; Front outside
|
||||||
|
o100 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 - #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g3 x#1 z[#5 - #20] K[-#20]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o100 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 - #8]
|
||||||
|
g1 z#5
|
||||||
|
g3 x#1 z[#5 - #8] K[-#8]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 elseif [#10 GT 0.5] ; front inside
|
||||||
|
o102 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 + #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g2 x#1 z[#5 - #20] K[-#20]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o102 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 + #8]
|
||||||
|
g1 z#5
|
||||||
|
g2 x#1 z[#5 - #8] K[-#8]
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 elseif [#11 GT 0.5] ; back outside
|
||||||
|
o103 while [[#20 + #3] lt #8]
|
||||||
|
#20 = [#20 + #3]
|
||||||
|
g0 x[#1 - #20] z#13
|
||||||
|
g1 z#5
|
||||||
|
g2 x#1 z[#5 + #20] K#20
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
o103 endwhile
|
||||||
|
g0 x#14 z#13
|
||||||
|
g0 x[#1 - #8]
|
||||||
|
g1 z#5
|
||||||
|
g2 x#1 z[#5 + #8] K#8
|
||||||
|
g1 x #14
|
||||||
|
g0 z#13
|
||||||
|
O101 endif
|
||||||
|
M5 M9
|
||||||
|
G7
|
||||||
|
O<radius> endsub
|
||||||
|
m2
|
||||||
|
%
|
||||||
71
linuxcnc/Turner.2ms/savestate.sav
Normal file
71
linuxcnc/Turner.2ms/savestate.sav
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
# generated by gladevcp.persistence.create_default_ini() on Tue Jul 12 01:49:47 2022
|
||||||
|
[ini]
|
||||||
|
signature = a9fe768b61bb9201e86d89ad226616650f20e7ac
|
||||||
|
version = 1
|
||||||
|
[vars]
|
||||||
|
[widgets]
|
||||||
|
chamfer.fi = False
|
||||||
|
chamfer.fo = False
|
||||||
|
turn.rad = 3.0
|
||||||
|
groove.coolant = True
|
||||||
|
turn.z = 120.0
|
||||||
|
turn.x = 15.0
|
||||||
|
drill.dia = 10.0
|
||||||
|
radius.x = 0.0
|
||||||
|
radius.z = 0.0
|
||||||
|
thread.pitch = 1.0
|
||||||
|
turn.feed = 0.15
|
||||||
|
thread.x = 6.0
|
||||||
|
bore.rad = 0.0
|
||||||
|
radius.coolant = False
|
||||||
|
radius.bo = False
|
||||||
|
thread.z = 0.0
|
||||||
|
face.coolant = False
|
||||||
|
drill.peck = 2.0
|
||||||
|
face.cut = 2.8999999999999977
|
||||||
|
radius.rad = 1.0
|
||||||
|
thread.internal = False
|
||||||
|
face.sf = 0.0
|
||||||
|
bore.sf = 100.0
|
||||||
|
turn.tool = 1.0
|
||||||
|
face.feed = 0.15
|
||||||
|
chamfer.tool = 1.0
|
||||||
|
chamfer.bo = True
|
||||||
|
groove.sf = 100.0
|
||||||
|
thread.tool = 5.0
|
||||||
|
groove.feed = 0.03
|
||||||
|
bore.feed = 0.15
|
||||||
|
radius.sf = 100.0
|
||||||
|
chamfer.x = 0.0
|
||||||
|
chamfer.z = 0.0
|
||||||
|
thread.external = True
|
||||||
|
turn.coolant = True
|
||||||
|
face.z = 0.0
|
||||||
|
bore.x = 0.0
|
||||||
|
bore.z = 0.0
|
||||||
|
groove.x = 0.0
|
||||||
|
face.tool = 1.0
|
||||||
|
face.x = 0.0
|
||||||
|
chamfer.size = 1.0
|
||||||
|
turn.cut = 1.0
|
||||||
|
drill.coolant = True
|
||||||
|
chamfer.sf = 100.0
|
||||||
|
bore.tool = 1.0
|
||||||
|
groove.tool = 4.0
|
||||||
|
face.angle = 0.0
|
||||||
|
bore.coolant = True
|
||||||
|
drill.feed = 0.020000000000000004
|
||||||
|
drill.z = 0.0
|
||||||
|
turn.sf = 60.0
|
||||||
|
thread.sf = 60.0
|
||||||
|
radius.fo = False
|
||||||
|
turn.angle = 0.0
|
||||||
|
thread.coolant = False
|
||||||
|
bore.cut = 1.0
|
||||||
|
radius.fi = True
|
||||||
|
drill.tool = 3.0
|
||||||
|
drill.sf = 100.0
|
||||||
|
radius.tool = 1.0
|
||||||
|
bore.angle = 0.0
|
||||||
|
chamfer.coolant = False
|
||||||
|
# last update by gladevcp.persistence.save_state() on Wed Mar 20 16:28:06 2024
|
||||||
2
linuxcnc/Turner.2ms/shutdown.hal
Normal file
2
linuxcnc/Turner.2ms/shutdown.hal
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Include your shutdown HAL commands here
|
||||||
|
# This file will not be overwritten when you run PNCconf again
|
||||||
119
linuxcnc/Turner.2ms/sim.var
Normal file
119
linuxcnc/Turner.2ms/sim.var
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
5161 0.000000
|
||||||
|
5162 0.000000
|
||||||
|
5163 0.000000
|
||||||
|
5164 0.000000
|
||||||
|
5165 0.000000
|
||||||
|
5166 0.000000
|
||||||
|
5167 0.000000
|
||||||
|
5168 0.000000
|
||||||
|
5169 0.000000
|
||||||
|
5181 0.000000
|
||||||
|
5182 0.000000
|
||||||
|
5183 0.000000
|
||||||
|
5184 0.000000
|
||||||
|
5185 0.000000
|
||||||
|
5186 0.000000
|
||||||
|
5187 0.000000
|
||||||
|
5188 0.000000
|
||||||
|
5189 0.000000
|
||||||
|
5210 0.000000
|
||||||
|
5211 0.000000
|
||||||
|
5212 0.000000
|
||||||
|
5213 0.000000
|
||||||
|
5214 0.000000
|
||||||
|
5215 0.000000
|
||||||
|
5216 0.000000
|
||||||
|
5217 0.000000
|
||||||
|
5218 0.000000
|
||||||
|
5219 0.000000
|
||||||
|
5220 1.000000
|
||||||
|
5221 0.000000
|
||||||
|
5222 0.000000
|
||||||
|
5223 0.000000
|
||||||
|
5224 0.000000
|
||||||
|
5225 0.000000
|
||||||
|
5226 0.000000
|
||||||
|
5227 0.000000
|
||||||
|
5228 0.000000
|
||||||
|
5229 0.000000
|
||||||
|
5230 0.000000
|
||||||
|
5241 0.000000
|
||||||
|
5242 0.000000
|
||||||
|
5243 0.000000
|
||||||
|
5244 0.000000
|
||||||
|
5245 0.000000
|
||||||
|
5246 0.000000
|
||||||
|
5247 0.000000
|
||||||
|
5248 0.000000
|
||||||
|
5249 0.000000
|
||||||
|
5250 0.000000
|
||||||
|
5261 0.000000
|
||||||
|
5262 0.000000
|
||||||
|
5263 0.000000
|
||||||
|
5264 0.000000
|
||||||
|
5265 0.000000
|
||||||
|
5266 0.000000
|
||||||
|
5267 0.000000
|
||||||
|
5268 0.000000
|
||||||
|
5269 0.000000
|
||||||
|
5270 0.000000
|
||||||
|
5281 0.000000
|
||||||
|
5282 0.000000
|
||||||
|
5283 0.000000
|
||||||
|
5284 0.000000
|
||||||
|
5285 0.000000
|
||||||
|
5286 0.000000
|
||||||
|
5287 0.000000
|
||||||
|
5288 0.000000
|
||||||
|
5289 0.000000
|
||||||
|
5290 0.000000
|
||||||
|
5301 0.000000
|
||||||
|
5302 0.000000
|
||||||
|
5303 0.000000
|
||||||
|
5304 0.000000
|
||||||
|
5305 0.000000
|
||||||
|
5306 0.000000
|
||||||
|
5307 0.000000
|
||||||
|
5308 0.000000
|
||||||
|
5309 0.000000
|
||||||
|
5310 0.000000
|
||||||
|
5321 0.000000
|
||||||
|
5322 0.000000
|
||||||
|
5323 0.000000
|
||||||
|
5324 0.000000
|
||||||
|
5325 0.000000
|
||||||
|
5326 0.000000
|
||||||
|
5327 0.000000
|
||||||
|
5328 0.000000
|
||||||
|
5329 0.000000
|
||||||
|
5330 0.000000
|
||||||
|
5341 0.000000
|
||||||
|
5342 0.000000
|
||||||
|
5343 0.000000
|
||||||
|
5344 0.000000
|
||||||
|
5345 0.000000
|
||||||
|
5346 0.000000
|
||||||
|
5347 0.000000
|
||||||
|
5348 0.000000
|
||||||
|
5349 0.000000
|
||||||
|
5350 0.000000
|
||||||
|
5361 0.000000
|
||||||
|
5362 0.000000
|
||||||
|
5363 0.000000
|
||||||
|
5364 0.000000
|
||||||
|
5365 0.000000
|
||||||
|
5366 0.000000
|
||||||
|
5367 0.000000
|
||||||
|
5368 0.000000
|
||||||
|
5369 0.000000
|
||||||
|
5370 0.000000
|
||||||
|
5381 0.000000
|
||||||
|
5382 0.000000
|
||||||
|
5383 0.000000
|
||||||
|
5384 0.000000
|
||||||
|
5385 0.000000
|
||||||
|
5386 0.000000
|
||||||
|
5387 0.000000
|
||||||
|
5388 0.000000
|
||||||
|
5389 0.000000
|
||||||
|
5390 0.000000
|
||||||
119
linuxcnc/Turner.2ms/sim.var.bak
Normal file
119
linuxcnc/Turner.2ms/sim.var.bak
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
5161 0.000000
|
||||||
|
5162 0.000000
|
||||||
|
5163 0.000000
|
||||||
|
5164 0.000000
|
||||||
|
5165 0.000000
|
||||||
|
5166 0.000000
|
||||||
|
5167 0.000000
|
||||||
|
5168 0.000000
|
||||||
|
5169 0.000000
|
||||||
|
5181 0.000000
|
||||||
|
5182 0.000000
|
||||||
|
5183 0.000000
|
||||||
|
5184 0.000000
|
||||||
|
5185 0.000000
|
||||||
|
5186 0.000000
|
||||||
|
5187 0.000000
|
||||||
|
5188 0.000000
|
||||||
|
5189 0.000000
|
||||||
|
5210 0.000000
|
||||||
|
5211 0.000000
|
||||||
|
5212 0.000000
|
||||||
|
5213 0.000000
|
||||||
|
5214 0.000000
|
||||||
|
5215 0.000000
|
||||||
|
5216 0.000000
|
||||||
|
5217 0.000000
|
||||||
|
5218 0.000000
|
||||||
|
5219 0.000000
|
||||||
|
5220 1.000000
|
||||||
|
5221 0.000000
|
||||||
|
5222 0.000000
|
||||||
|
5223 0.000000
|
||||||
|
5224 0.000000
|
||||||
|
5225 0.000000
|
||||||
|
5226 0.000000
|
||||||
|
5227 0.000000
|
||||||
|
5228 0.000000
|
||||||
|
5229 0.000000
|
||||||
|
5230 0.000000
|
||||||
|
5241 0.000000
|
||||||
|
5242 0.000000
|
||||||
|
5243 0.000000
|
||||||
|
5244 0.000000
|
||||||
|
5245 0.000000
|
||||||
|
5246 0.000000
|
||||||
|
5247 0.000000
|
||||||
|
5248 0.000000
|
||||||
|
5249 0.000000
|
||||||
|
5250 0.000000
|
||||||
|
5261 0.000000
|
||||||
|
5262 0.000000
|
||||||
|
5263 0.000000
|
||||||
|
5264 0.000000
|
||||||
|
5265 0.000000
|
||||||
|
5266 0.000000
|
||||||
|
5267 0.000000
|
||||||
|
5268 0.000000
|
||||||
|
5269 0.000000
|
||||||
|
5270 0.000000
|
||||||
|
5281 0.000000
|
||||||
|
5282 0.000000
|
||||||
|
5283 0.000000
|
||||||
|
5284 0.000000
|
||||||
|
5285 0.000000
|
||||||
|
5286 0.000000
|
||||||
|
5287 0.000000
|
||||||
|
5288 0.000000
|
||||||
|
5289 0.000000
|
||||||
|
5290 0.000000
|
||||||
|
5301 0.000000
|
||||||
|
5302 0.000000
|
||||||
|
5303 0.000000
|
||||||
|
5304 0.000000
|
||||||
|
5305 0.000000
|
||||||
|
5306 0.000000
|
||||||
|
5307 0.000000
|
||||||
|
5308 0.000000
|
||||||
|
5309 0.000000
|
||||||
|
5310 0.000000
|
||||||
|
5321 0.000000
|
||||||
|
5322 0.000000
|
||||||
|
5323 0.000000
|
||||||
|
5324 0.000000
|
||||||
|
5325 0.000000
|
||||||
|
5326 0.000000
|
||||||
|
5327 0.000000
|
||||||
|
5328 0.000000
|
||||||
|
5329 0.000000
|
||||||
|
5330 0.000000
|
||||||
|
5341 0.000000
|
||||||
|
5342 0.000000
|
||||||
|
5343 0.000000
|
||||||
|
5344 0.000000
|
||||||
|
5345 0.000000
|
||||||
|
5346 0.000000
|
||||||
|
5347 0.000000
|
||||||
|
5348 0.000000
|
||||||
|
5349 0.000000
|
||||||
|
5350 0.000000
|
||||||
|
5361 0.000000
|
||||||
|
5362 0.000000
|
||||||
|
5363 0.000000
|
||||||
|
5364 0.000000
|
||||||
|
5365 0.000000
|
||||||
|
5366 0.000000
|
||||||
|
5367 0.000000
|
||||||
|
5368 0.000000
|
||||||
|
5369 0.000000
|
||||||
|
5370 0.000000
|
||||||
|
5381 0.000000
|
||||||
|
5382 0.000000
|
||||||
|
5383 0.000000
|
||||||
|
5384 0.000000
|
||||||
|
5385 0.000000
|
||||||
|
5386 0.000000
|
||||||
|
5387 0.000000
|
||||||
|
5388 0.000000
|
||||||
|
5389 0.000000
|
||||||
|
5390 0.000000
|
||||||
21
linuxcnc/Turner.2ms/simulated_home_lathe.hal
Normal file
21
linuxcnc/Turner.2ms/simulated_home_lathe.hal
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
loadrt comp names=comp_x,comp_z
|
||||||
|
|
||||||
|
addf comp_x servo-thread
|
||||||
|
addf comp_z servo-thread
|
||||||
|
|
||||||
|
net Xhomeswpos => comp_x.in0
|
||||||
|
net Zhomeswpos => comp_z.in0
|
||||||
|
|
||||||
|
sets Xhomeswpos 1
|
||||||
|
sets Zhomeswpos 2
|
||||||
|
|
||||||
|
net Xpos => comp_x.in1
|
||||||
|
net Zpos => comp_z.in1
|
||||||
|
|
||||||
|
setp comp_x.hyst .02
|
||||||
|
setp comp_z.hyst .02
|
||||||
|
|
||||||
|
net Xhomesw <= comp_x.out => joint.0.home-sw-in
|
||||||
|
net Zhomesw <= comp_z.out => joint.1.home-sw-in
|
||||||
|
|
||||||
|
|
||||||
21
linuxcnc/Turner.2ms/simulated_home_lathe_CW.hal
Normal file
21
linuxcnc/Turner.2ms/simulated_home_lathe_CW.hal
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
loadrt comp names=comp_x,comp_z
|
||||||
|
|
||||||
|
addf comp_x servo-thread
|
||||||
|
addf comp_z servo-thread
|
||||||
|
|
||||||
|
net Xhomeswpos => comp_x.in0
|
||||||
|
net Zhomeswpos => comp_z.in0
|
||||||
|
|
||||||
|
sets Xhomeswpos 1
|
||||||
|
sets Zhomeswpos 2
|
||||||
|
|
||||||
|
net Xpos => comp_x.in1
|
||||||
|
net Zpos => comp_z.in1
|
||||||
|
|
||||||
|
setp comp_x.hyst .02
|
||||||
|
setp comp_z.hyst .02
|
||||||
|
|
||||||
|
net Xhomesw <= comp_x.out => joint.0.home-sw-in
|
||||||
|
net Zhomesw <= comp_z.out => joint.1.home-sw-in
|
||||||
|
|
||||||
|
|
||||||
69
linuxcnc/Turner.2ms/spindle_sim.hal
Normal file
69
linuxcnc/Turner.2ms/spindle_sim.hal
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# counting the spindle encoder in software
|
||||||
|
loadrt encoder names=encoder_0
|
||||||
|
# simulate the encoder
|
||||||
|
loadrt sim_encoder names=sim_encoder_0
|
||||||
|
loadrt limit2 names=limit_speed
|
||||||
|
|
||||||
|
addf limit_speed servo-thread
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
# Beginning of threading related stuff
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
# spindle speed control
|
||||||
|
net spindle-speed-cmd spindle.0.speed-out => limit_speed.in
|
||||||
|
net spindle-speed-limited limit_speed.out => sim_encoder_0.speed
|
||||||
|
|
||||||
|
# simulate spindle mass
|
||||||
|
setp limit_speed.maxv 3000.0 # rpm/second
|
||||||
|
|
||||||
|
# spindle encoder
|
||||||
|
# connect encoder signals to encoder counter
|
||||||
|
net spindle-phase-A sim_encoder_0.phase-A => encoder_0.phase-A
|
||||||
|
net spindle-phase-B sim_encoder_0.phase-B => encoder_0.phase-B
|
||||||
|
net spindle-phase-Z sim_encoder_0.phase-Z => encoder_0.phase-Z
|
||||||
|
|
||||||
|
# assume 120 ppr = 480 counts/rev for the spindle
|
||||||
|
setp sim_encoder_0.ppr 12
|
||||||
|
# iocontrol output is in rpm, but sim-encoder speed is rps
|
||||||
|
setp sim_encoder_0.scale 60
|
||||||
|
# scale encoder output to read in revolutions
|
||||||
|
# (that way thread pitches can be straightforward,
|
||||||
|
# a 20 tpi thread would multiply the encoder output
|
||||||
|
# by 1/20, etc)
|
||||||
|
setp encoder_0.position-scale 48
|
||||||
|
|
||||||
|
# encoder reset control
|
||||||
|
# hook up motion controller's sync output
|
||||||
|
net spindle-index-enable spindle.0.index-enable <=> encoder_0.index-enable
|
||||||
|
|
||||||
|
# report our revolution count to the motion controller
|
||||||
|
net spindle-pos encoder_0.position => spindle.0.revs
|
||||||
|
|
||||||
|
# for spindle velocity estimate
|
||||||
|
loadrt lowpass names=lowpass_velocity
|
||||||
|
loadrt scale names=scale_to_rpm
|
||||||
|
net spindle-rps-raw encoder_0.velocity lowpass_velocity.in
|
||||||
|
net spindle-rps-filtered lowpass_velocity.out scale_to_rpm.in spindle.0.speed-in
|
||||||
|
net spindle-rpm-filtered scale_to_rpm.out
|
||||||
|
setp scale_to_rpm.gain 60
|
||||||
|
setp lowpass_velocity.gain .07
|
||||||
|
addf lowpass_velocity servo-thread
|
||||||
|
addf scale_to_rpm servo-thread
|
||||||
|
|
||||||
|
# for at-speed detection
|
||||||
|
loadrt near names=near_speed
|
||||||
|
addf near_speed servo-thread
|
||||||
|
setp near_speed.scale 1.1
|
||||||
|
setp near_speed.difference 10
|
||||||
|
net spindle-speed-cmd => near_speed.in1
|
||||||
|
net spindle-rpm-filtered => near_speed.in2
|
||||||
|
net spindle-at-speed near_speed.out spindle.0.at-speed
|
||||||
|
|
||||||
|
net spindle-fwd <= spindle.0.forward
|
||||||
|
|
||||||
|
addf encoder.capture-position servo-thread
|
||||||
|
addf sim-encoder.update-speed servo-thread
|
||||||
|
|
||||||
|
addf sim-encoder.make-pulses base-thread
|
||||||
|
addf encoder.update-counters base-thread
|
||||||
59
linuxcnc/Turner.2ms/threading.ngc
Normal file
59
linuxcnc/Turner.2ms/threading.ngc
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
;threading
|
||||||
|
|
||||||
|
O<threading> sub
|
||||||
|
|
||||||
|
G7 ; Lathe Diameter Mode
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
|
||||||
|
|
||||||
|
M6 T#3 G43
|
||||||
|
|
||||||
|
#14 = [#<_x> * 2] (starting X)
|
||||||
|
#13 = #<_z> (starting Z)
|
||||||
|
|
||||||
|
G96 D200 S#2 ; Constant Surface Speed Mode
|
||||||
|
M3
|
||||||
|
g95 F0.25 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#8 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
|
||||||
|
g4p1 ; Wait to reach speed
|
||||||
|
|
||||||
|
;Threading
|
||||||
|
O51 IF [#6 GT 0.5]
|
||||||
|
#<OD> = [#1]
|
||||||
|
#<ID> = [#1 - 1.3 * #4]
|
||||||
|
;g1X [#<ID> - 1] ;thread truncation
|
||||||
|
;g0 Z #13
|
||||||
|
;g1 X #<ID>
|
||||||
|
;g1 Z #5
|
||||||
|
G0 X[#<ID> - 1]
|
||||||
|
g0 Z #13
|
||||||
|
#3 = [#4 * 1.3]
|
||||||
|
(debug, INTERNAL Threading thread dia-#1 start-#13 finish-#5 Pitch-#4 Depth-#3)
|
||||||
|
g1X [#<ID> - 1]
|
||||||
|
g76 p#4 z#5 i1 j1 k#3 h3 r1.5 q29.5 e0 l0
|
||||||
|
|
||||||
|
O51 ELSE
|
||||||
|
#<OD> = [#1 - 0.108 * #4]
|
||||||
|
#<ID> = [#1 - 1.0825 * #4]
|
||||||
|
(debug, EXTERNAL Threading OD = #<OD> ID = #<ID>)
|
||||||
|
#3 = [#4 * 1.0825]
|
||||||
|
g1X [#<OD> + 1] ;final thread truncation
|
||||||
|
g0 z#13
|
||||||
|
g1 X #<OD>
|
||||||
|
g1 Z #5
|
||||||
|
G0 X[#<OD> +1]
|
||||||
|
G0 Z #13
|
||||||
|
g76 p#4 z#5 i-1 j1 k#3 h3 r1.5 q29.5 e0 l0
|
||||||
|
|
||||||
|
O51 ENDIF
|
||||||
|
G0 Z #13
|
||||||
|
m5 M9
|
||||||
|
O<threading> endsub
|
||||||
|
|
||||||
|
M2
|
||||||
19
linuxcnc/Turner.2ms/tool.tbl
Normal file
19
linuxcnc/Turner.2ms/tool.tbl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
T1 P1 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;# rh turning
|
||||||
|
T2 P2 X-25.3242 Y0.0 Z15.924 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I80.0 J20.0 Q3.0 ;
|
||||||
|
T3 P3 X-15.4825 Y0.0 Z258.6854 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D3.0 I90.0 J90.0 Q6.0 ;
|
||||||
|
T4 P4 X-0.5336 Y0.0 Z54.9583 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I87.0 J40.0 Q2.0 ;
|
||||||
|
T5 P5 X-15.0582 Y0.0 Z117.9963 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I60.0 J200.0 Q5.0 ;
|
||||||
|
T6 P6 X2.6969 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.5 I120.0 J70.0 Q6.0 ;# threading
|
||||||
|
T7 P7 X-8.408 Y0.0 Z13.7459 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.8 I107.5 J77.5 Q6.0 ;# vcmt110304
|
||||||
|
T8 P8 X-11.16 Y0.0 Z-31.05 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I200.0 J300.0 Q8.0 ;
|
||||||
|
T9 P9 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.1 I0.0 J0.0 Q9.0 ;
|
||||||
|
T10 P10 X-0.07 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;
|
||||||
|
T11 P11 X-23.0718 Y0.0 Z-3.7292 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;
|
||||||
|
T12 P12 X-1.8392 Y0.0 Z-3.8279 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;
|
||||||
|
T13 P13 X-10.8533 Y0.0 Z-6.2652 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;
|
||||||
|
T14 P14 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I300.0 J200.0 Q4.0 ;
|
||||||
|
T15 P15 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I200.0 J200.0 Q5.0 ;
|
||||||
|
T16 P16 X-15.13 Y0.0 Z14.91 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I100.0 J60.0 Q6.0 ;
|
||||||
|
T17 P17 X-15.14 Y0.0 Z5.992 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I-30.0 J30.0 Q7.0 ;
|
||||||
|
T18 P18 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I200.0 J300.0 Q8.0 ;
|
||||||
|
T19 P19 X29.7817 Y0.0 Z-21.8231 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D0.0 I0.0 J0.0 Q9.0 ;
|
||||||
66
linuxcnc/Turner.2ms/turning.ngc
Normal file
66
linuxcnc/Turner.2ms/turning.ngc
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
;Turning
|
||||||
|
|
||||||
|
O<turning> sub
|
||||||
|
|
||||||
|
G8 ; Radius mode (easier maths)
|
||||||
|
G18 ; XZ Plane
|
||||||
|
G21 ; Metric Units
|
||||||
|
G90 ; Absolute Distance
|
||||||
|
G91.1 ; but not for arcs
|
||||||
|
|
||||||
|
M6 T#8 G43
|
||||||
|
|
||||||
|
#1 = [#1 / 2] ; because of radius mode
|
||||||
|
#14 = [#<_x>] (starting X)
|
||||||
|
#13 = #<_z> (starting Z)
|
||||||
|
|
||||||
|
#20 = [#6 * SIN[#7]]
|
||||||
|
#21 = [#6 * COS[#7]]
|
||||||
|
#22 = [#6 / COS[#7]]
|
||||||
|
#23 = [#5 + #6 - #20]
|
||||||
|
#24 = [[#13 - #23] * TAN[#7]]
|
||||||
|
|
||||||
|
G96 D2500 S#2 ; Constant Surface Speed Mode
|
||||||
|
m3 ;Start Spindle
|
||||||
|
g95 F#4 ; Feed-Per-Rev Mode
|
||||||
|
|
||||||
|
O90 IF [#9 GT 0.5]
|
||||||
|
M8
|
||||||
|
O90 ENDIF
|
||||||
|
g4p1 ; Wait to reach speed
|
||||||
|
|
||||||
|
O100 WHILE [#14 GT [#1 + #3 / 2]]
|
||||||
|
g0 X #14
|
||||||
|
#14=[#14-#3 / 2]
|
||||||
|
G1 X #14
|
||||||
|
G1 Z #23 X[#14 + #24]
|
||||||
|
O101 IF [#6 GT 0]
|
||||||
|
G2 Z#5 X[#14 + #24 + #21] I#21 K#20
|
||||||
|
G1 X[#14 + #24 + #21 + #3/2]
|
||||||
|
O101 ELSE
|
||||||
|
G1 X[#14 + #24 + [#3 * .6]]
|
||||||
|
O101 ENDIF
|
||||||
|
O104 IF [#7 LT 0]
|
||||||
|
G0 X#14
|
||||||
|
O104 ENDIF
|
||||||
|
G0 Z[#13]
|
||||||
|
O100 ENDWHILE
|
||||||
|
|
||||||
|
G0 x#1
|
||||||
|
G1 Z #23 X[#1 + #24]
|
||||||
|
O102 IF [#6 GT 0]
|
||||||
|
G2 Z#5 X[#1 + #24 + #21] I#21 K#20
|
||||||
|
G1 X[#1 + #24 + #21 + #3]
|
||||||
|
O102 ELSE
|
||||||
|
G1 X[#1 + #24 + #3]
|
||||||
|
O102 ENDIF
|
||||||
|
O106 IF [#7 LT 0]
|
||||||
|
G0 X#14
|
||||||
|
O106 ENDIF
|
||||||
|
M9
|
||||||
|
G0 Z #13
|
||||||
|
G0 X #1 ; For touch-off
|
||||||
|
M5
|
||||||
|
G7
|
||||||
|
O<turning> endsub
|
||||||
|
M2
|
||||||
Reference in New Issue
Block a user