Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

1
configs/by_machine/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
core_stepper.hal

View File

@@ -0,0 +1,3 @@
by_machine
Configs are examples for specific machines.

View File

@@ -0,0 +1,27 @@
This configuration is for my (petev) Bridgeport BOSS6. It shows how I used the boss_plc component. It is intended for servo machines running the Vitalsystems (www.vsi99.com) Motenc-100 or Motenc-Lite card.
You can either have a standard pinout, or you could make a new one which would suit your own custom cabling. The changes are done in HAL (the Hardware Abstraction Layer), which is very flexible (read more about it at http://wiki.linuxcnc.org/)
The standard configuration assumes a card installed with the board id jumper set at 0. If you get errors, try to adjust the jumper.
Multiple cards are supported by reading the board id jumper settings and using them as the <boardId> in the exported HAL names. There are two jumpers on J3 of the motenc-100 board that are defined as the board id. Installing a jumper causes the corresponding bit to read as zero. Since there are two board id jumpers, up to four cards are supported. Using the board id allows the configuration to be independent of which PCI slot the card is plugged into.
Detailed description:
* nml files
-- it uses a default nml file (found in configs/common/linuxcnc.nml)
* hal files
-- boss.hal - this is the main hal file for the Motenc, it loads the motenc driver and sets up motion and IO links (like the pin number where the X limit switch is, or where the spindle start pin is connected), it is fairly well commented, so it should be easy to read / modify. This servo setup is mostly for serious machines, so the ESTOP should really be planned / implemented properly (that means use an external ESTOP chain, and let LinuxCNC know about it, and let LinuxCNC interrupt the external chain too). Read more about this in the wiki at http://wiki.linuxcnc.org/
* additional files
-- boss.tbl - this is the tool table file, and it holds definitions for the tools used, along with tool sizes for compensation (tool length & tool diameter)
-- boss.var - the variables file. This file is used by the interpreter to save internal variables when LinuxCNC shuts down, and rereads them on the next startup.
Further specific information can be found in the LinuxCNC wiki:
http://wiki.linuxcnc.org/

View File

@@ -0,0 +1,300 @@
# HAL config file for Bridgeport BOSS.
#
# Load the core RT modules that will be needed.
# Kinematics
loadrt [KINS]KINEMATICS
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# PID module, for four PID loops
loadrt pid num_chan=4
# Install motenc driver.
loadrt hal_motenc
# Install PLC.
loadrt boss_plc
# Install debounce filters for operator console (cycle hold/start,
# limit override, spindle increase/decrease/status).
loadrt debounce cfg="7"
# Add functions to servo thread so they will be evaluated
# every servo period.
#
# Inputs are read at the beginning of the thread
addf debounce.0 servo-thread 1
addf motenc.0.encoder-read servo-thread 1
addf motenc.0.misc-update servo-thread 1
#addf motenc.0.adc-read servo-thread 1
addf motenc.0.digital-in-read servo-thread 1
# Do processing.
addf boss_plc.0.refresh servo-thread -1
addf motion-command-handler servo-thread -1
addf motion-controller servo-thread -1
addf pid.0.do-pid-calcs servo-thread -1
addf pid.1.do-pid-calcs servo-thread -1
addf pid.2.do-pid-calcs servo-thread -1
addf pid.3.do-pid-calcs servo-thread -1
# Outputs are updated at the end of the thread
addf motenc.0.dac-write servo-thread -1
addf motenc.0.digital-out-write servo-thread -1
# PID loops.
#
# Get maximum (and minimum) output volts from ini file.
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
# Set PID loop gains.
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
# deadband should be just over 1 count
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
# deadband should be just over 1 count
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
# deadband should be just over 1 count
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
# deadband should be just over 1 count
setp pid.3.deadband [JOINT_3]DEADBAND
# Connect the enable signals to the PID blocks.
net xEnable joint.0.amp-enable-out => pid.0.enable
net yEnable joint.1.amp-enable-out => pid.1.enable
net zEnable joint.2.amp-enable-out => pid.2.enable
net aEnable joint.3.amp-enable-out => pid.3.enable
# Connect position commands to PID inputs.
net xPosCmd joint.0.motor-pos-cmd => pid.0.command
net yPosCmd joint.1.motor-pos-cmd => pid.1.command
net zPosCmd joint.2.motor-pos-cmd => pid.2.command
net aPosCmd joint.3.motor-pos-cmd => pid.3.command
# DACs
#
# Set DAC output scaling from ini file.
setp motenc.0.dac-01-gain [JOINT_0]OUTPUT_SCALE
setp motenc.0.dac-03-gain [JOINT_1]OUTPUT_SCALE
setp motenc.0.dac-02-gain [JOINT_2]OUTPUT_SCALE
setp motenc.0.dac-00-gain [JOINT_3]OUTPUT_SCALE
# Set DAC offset from ini file.
setp motenc.0.dac-01-offset [JOINT_0]OUTPUT_OFFSET
setp motenc.0.dac-03-offset [JOINT_1]OUTPUT_OFFSET
setp motenc.0.dac-02-offset [JOINT_2]OUTPUT_OFFSET
setp motenc.0.dac-00-offset [JOINT_3]OUTPUT_OFFSET
# Connect PID output signals to DACs.
net xOutput pid.0.output => motenc.0.dac-01-value
net yOutput pid.1.output => motenc.0.dac-03-value
net zOutput pid.2.output => motenc.0.dac-02-value
net aOutput pid.3.output => motenc.0.dac-00-value
# Encoders.
#
# Set feedback scaling from ini file.
setp motenc.0.enc-01-scale [JOINT_0]INPUT_SCALE
setp motenc.0.enc-03-scale [JOINT_1]INPUT_SCALE
setp motenc.0.enc-02-scale [JOINT_2]INPUT_SCALE
setp motenc.0.enc-00-scale [JOINT_3]INPUT_SCALE
# Connect position feedback to PID loop.
net xPosFb motenc.0.enc-01-position => pid.0.feedback
net yPosFb motenc.0.enc-03-position => pid.1.feedback
net zPosFb motenc.0.enc-02-position => pid.2.feedback
net aPosFb motenc.0.enc-00-position => pid.3.feedback
# Connect position feedback to motion module.
net xPosFb => joint.0.motor-pos-fb
net yPosFb => joint.1.motor-pos-fb
net zPosFb => joint.2.motor-pos-fb
net aPosFb => joint.3.motor-pos-fb
# Connect position feedback to PLC.
net xPosFb => boss_plc.0.x-position-in
net yPosFb => boss_plc.0.y-position-in
# Connect index pulses to motion controller.
net xIndex motenc.0.enc-01-index-enable <=> joint.0.index-enable
net yIndex motenc.0.enc-03-index-enable <=> joint.1.index-enable
net zIndex motenc.0.enc-02-index-enable <=> joint.2.index-enable
net aIndex motenc.0.enc-00-index-enable <=> joint.3.index-enable
# Limits.
#
# Connect limit/home switch inputs to PLC and motion controller.
net xLimitSw motenc.0.in-09 => boss_plc.0.x-limit-in
net xLimitSw => joint.0.home-sw-in
net yLimitSw motenc.0.in-13 => boss_plc.0.y-limit-in
net yLimitSw => joint.1.home-sw-in
net zMinlimSw motenc.0.in-26 => boss_plc.0.z-limit-neg-in
net zMaxlimSw motenc.0.in-25 => boss_plc.0.z-limit-pos-in
net zHome motenc.0.in-27 => joint.2.home-sw-in
# Connect PLC limit switch outputs to motion controller.
net xMinLim boss_plc.0.x-limit-neg-out => joint.0.neg-lim-sw-in
net xMaxLim boss_plc.0.x-limit-pos-out => joint.0.pos-lim-sw-in
net yMinLim boss_plc.0.y-limit-neg-out => joint.1.neg-lim-sw-in
net yMaxLim boss_plc.0.y-limit-pos-out => joint.1.pos-lim-sw-in
net zMinLim boss_plc.0.z-limit-neg-out => joint.2.neg-lim-sw-in
net zMaxLim boss_plc.0.z-limit-pos-out => joint.2.pos-lim-sw-in
# Amp enables/faults.
#
# Connect amp ready to PLC.
net xReady motenc.0.in-08 => boss_plc.0.x-amp-ready-in
net yReady motenc.0.in-12 => boss_plc.0.y-amp-ready-in
net zReady motenc.0.in-24 => boss_plc.0.z-amp-ready-in
net aReady motenc.0.in-28 => boss_plc.0.a-amp-ready-in
# Connect amp enables to I/O.
net xEnable => motenc.0.out-00
net yEnable => motenc.0.out-01
net zEnable => motenc.0.out-08
net aEnable => motenc.0.out-09
# Connect amp enables to PLC.
net xEnable => boss_plc.0.x-amp-enable-in
net yEnable => boss_plc.0.y-amp-enable-in
net zEnable => boss_plc.0.z-amp-enable-in
net aEnable => boss_plc.0.a-amp-enable-in
# Connect amp faults to motion controller.
net xFault boss_plc.0.x-amp-fault-out => joint.0.amp-fault-in
net yFault boss_plc.0.y-amp-fault-out => joint.1.amp-fault-in
net zFault boss_plc.0.z-amp-fault-out => joint.2.amp-fault-in
net aFault boss_plc.0.a-amp-fault-out => joint.3.amp-fault-in
# Spindle.
#
# Connect spindle speed to PLC and spindle fwd/rev/stat to I/O.
net spindleSpeed spindle.0.speed-out => boss_plc.0.spindle-speed-in
net spindleFwd boss_plc.0.spindle-fwd-out => motenc.0.out-11
net spindleRev boss_plc.0.spindle-rev-out => motenc.0.out-12
net spindleIsOnSw motenc.0.in-29-not => debounce.0.5.in
net spindleIsOnDly debounce.0.5.out => debounce.0.6.in
net spindleIsOn debounce.0.6.out => boss_plc.0.spindle-is-on-in
# Connect spindle brake to PLC and PLC brake to I/O.
setp boss_plc.0.brake-on-delay 500
setp boss_plc.0.brake-off-delay 800
net spindleBrakeOnMot spindle.0.brake => boss_plc.0.brake-en-in
setp motenc.0.out-02-invert 1
net spindleBrakeOn boss_plc.0.brake-en-out => motenc.0.out-02
# Tool change.
#
# Loop back tool prepare pins.
net toolPrepare iocontrol.0.tool-prepare iocontrol.0.tool-prepared
# Connect tool change pins to PLC.
net toolChange iocontrol.0.tool-change => boss_plc.0.tool-change-in
net toolChanged boss_plc.0.tool-changed-out => iocontrol.0.tool-changed
# Coolant.
#
# Connect mist/flood coolant to PLC.
net mistOnIo iocontrol.0.coolant-mist => boss_plc.0.mist-on-in
net floodOnIo iocontrol.0.coolant-flood => boss_plc.0.flood-on-in
# Connect mist/flood coolant to I/O.
net mistOn boss_plc.0.mist-on-out => motenc.0.out-14
net floodOn boss_plc.0.flood-on-out => motenc.0.out-15
# Operator console.
#
# Set debounce time.
setp debounce.0.delay 20
# Connect e-stop I/O.
net eStopSense motenc.0.in-32 => iocontrol.0.emc-enable-in
net eStopWrite iocontrol.0.user-enable-out => motenc.0.out-16
# Connect cycle hold/start.
net cycleHoldSw motenc.0.in-33-not => debounce.0.0.in
net cycleHold debounce.0.0.out => boss_plc.0.cycle-hold-in
net cycleStartSw motenc.0.in-34 => debounce.0.1.in
net cycleStart debounce.0.1.out => boss_plc.0.cycle-start-in
net feedHold boss_plc.0.feed-hold-out => motion.feed-hold
net waitUser boss_plc.0.wait-user-out => motenc.0.out-17
# Connect speed overrides.
net spindleIncSw motenc.0.enc-04-index => debounce.0.2.in
net spindleIncDb debounce.0.2.out => boss_plc.0.spindle-inc-in
net spindleInc boss_plc.0.spindle-inc-out => motenc.0.out-03
net spindleDecSw motenc.0.enc-06-index => debounce.0.3.in
net spindleDecDb debounce.0.3.out => boss_plc.0.spindle-dec-in
net spindleDec boss_plc.0.spindle-dec-out => motenc.0.out-04
# Connect limit override.
net limitOverrideSw motenc.0.in-35-not => debounce.0.4.in
net limitOverride debounce.0.4.out => boss_plc.0.limit-override-in
net limitActive boss_plc.0.limit-active-out => motenc.0.out-18
# Connect rapid/feed overrides.
net adaptiveFeed boss_plc.0.adaptive-feed-out => motion.adaptive-feed
setp halui.feed-override.scale 0.01
net feedOverride motenc.0.enc-04-count => halui.feed-override.counts
#net rapidOverride motenc.0.enc-06-count => halui.rapid-override.counts
# Set the jog mode so motion stops as soon as the wheel stops.
setp joint.0.jog-vel-mode TRUE
setp joint.1.jog-vel-mode TRUE
setp joint.2.jog-vel-mode TRUE
setp joint.3.jog-vel-mode TRUE
# Connect jog axis select to motion controller and PLC.
net xJog motenc.0.in-40 => joint.0.jog-enable
net yJog motenc.0.in-41 => joint.1.jog-enable
net zJog motenc.0.in-42 => joint.2.jog-enable
net aJog motenc.0.in-43 => joint.3.jog-enable
net xJog => boss_plc.0.x-jog-en-in
net yJog => boss_plc.0.y-jog-en-in
net zJog => boss_plc.0.z-jog-en-in
# Connect jog wheel encoder.
net jogCounts motenc.0.enc-05-count => joint.0.jog-counts joint.1.jog-counts joint.2.jog-counts joint.3.jog-counts
# Connect jog scale selects to PLC.
setp boss_plc.0.jog-scale-0 0.000001
setp boss_plc.0.jog-scale-1 0.000010
setp boss_plc.0.jog-scale-2 0.000100
net jogScaleSel0 motenc.0.in-36 => boss_plc.0.jog-sel-in-0
net jogScaleSel1 motenc.0.in-37 => boss_plc.0.jog-sel-in-1
net jogScaleSel2 motenc.0.in-38 => boss_plc.0.jog-sel-in-2
# Connect PLC jog scale output.
net jogScale boss_plc.0.jog-scale-out => joint.0.jog-scale joint.1.jog-scale joint.2.jog-scale joint.3.jog-scale

View File

@@ -0,0 +1,257 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-BP-BOSS6
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
# Name of display program, e.g., tklinuxcnc
DISPLAY = tklinuxcnc
#DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tklinuxcnc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
#No Content
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = boss.var
# Enable adaptive feed input, we use it to limit rapid/feed when
# limits are being overridden.
RS274NGC_STARTUP_CODE = M52 P1
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nanoseconds
SERVO_PERIOD = 200000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# HALUI to interact with NML.
# Run before any other HALFILE.
HALUI = halui
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = boss.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Trajectory planner section --------------------------------------------------
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
# 2000 rpm, 2:1 reduction, 5 tpi = 200 ipm = 3.33333333333333 ips.
MAX_LINEAR_VELOCITY = 2.5
DEFAULT_LINEAR_VELOCITY = 0.1
# 3000 lbs continuous force. Use 1% = 30 lbs for accel. With 600 lbs load
# that's 0.05g * 9.8 mpss * 39.37 i/m = 19.29 ipss. Motor peak torque
# is 3x continuous.
MAX_LINEAR_ACCELERATION = 15.0
DEFAULT_LINEAR_ACCELERATION = 15.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = boss.tbl
TOOL_CHANGE_POSITION = -18.0 -12.0 0.0
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = 0.0
MAX_LIMIT = 18.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 18.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.05
HOME_SEARCH_VEL = -0.5
HOME_LATCH_VEL = 0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 60.0
I = 1250.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
# Second axis
[AXIS_Y]
MIN_LIMIT = 0.0
MAX_LIMIT = 12.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 12.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -0.4
HOME_LATCH_VEL = 0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 60.0
I = 1250.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
# Third axis
[AXIS_Z]
MIN_LIMIT = -4.75
MAX_LIMIT = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
BACKLASH = 0.0
INPUT_SCALE = -100000
OUTPUT_SCALE = -3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = -4.75
MAX_LIMIT = 0.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = -0.225
HOME_SEARCH_VEL = 0.1
HOME_LATCH_VEL = -0.01
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 60.0
I = 1250.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
# Fourth axis
[AXIS_A]
MIN_LIMIT = 0.0
MAX_LIMIT = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 10.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 0.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = -0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 60.0
I = 1250.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,381 @@
# HAL config file for Bridgeport BOSS.
#
# Load the core RT modules that will be needed.
# Kinematics
loadrt [KINS]KINEMATICS
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# PID module, for four PID loops
loadrt pid num_chan=4
# Install motenc driver.
loadrt hal_motenc
# Install PLC.
loadrt boss_plc
# Install debounce filters for operator console (cycle hold/start,
# limit override, spindle increase/decrease/status).
loadrt debounce cfg="6"
# Load muxes for motion feedback and PID command.
loadrt mux2 count=8
# Load differentiators for debug.
loadrt ddt count=3
# Load the signal generator module for tuning.
loadrt siggen
# Add functions to servo thread so they will be evaluated
# every servo period.
#
# Inputs are read at the beginning of the thread
addf mux2.0 servo-thread 1
addf debounce.0 servo-thread 1
addf motenc.0.encoder-read servo-thread 1
addf motenc.0.misc-update servo-thread 1
#addf motenc.0.adc-read servo-thread 1
addf motenc.0.digital-in-read servo-thread 1
addf siggen.0.update servo-thread 1
# Do processing.
addf boss_plc.0.refresh servo-thread -1
addf motion-command-handler servo-thread -1
addf motion-controller servo-thread -1
addf pid.0.do-pid-calcs servo-thread -1
addf pid.1.do-pid-calcs servo-thread -1
addf pid.2.do-pid-calcs servo-thread -1
addf pid.3.do-pid-calcs servo-thread -1
# Outputs are updated at the end of the thread
addf motenc.0.dac-write servo-thread -1
addf motenc.0.digital-out-write servo-thread -1
addf ddt.0 servo-thread -1
addf ddt.1 servo-thread -1
addf ddt.2 servo-thread -1
# PID loops.
#
# Get maximum (and minimum) output volts from ini file.
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
# Set PID loop output limits.
setp pid.0.maxoutput [JOINT_0]MAX_VELOCITY
setp pid.1.maxoutput [JOINT_1]MAX_VELOCITY
setp pid.2.maxoutput [JOINT_2]MAX_VELOCITY
setp pid.3.maxoutput [JOINT_3]MAX_VELOCITY
# Set PID loop gains.
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.maxerrorI [JOINT_0]MAX_ERROR_I
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
# deadband should be just over 1 count
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.tune-effort [JOINT_0]TUNE_EFFORT
setp pid.0.tune-cycles [JOINT_0]TUNE_CYCLES
setp pid.0.tune-type [JOINT_0]TUNE_TYPE
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.maxerrorI [JOINT_1]MAX_ERROR_I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
# deadband should be just over 1 count
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.tune-effort [JOINT_1]TUNE_EFFORT
setp pid.1.tune-cycles [JOINT_1]TUNE_CYCLES
setp pid.1.tune-type [JOINT_1]TUNE_TYPE
setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.maxerrorI [JOINT_2]MAX_ERROR_I
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
# deadband should be just over 1 count
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.2.tune-effort [JOINT_2]TUNE_EFFORT
setp pid.2.tune-cycles [JOINT_2]TUNE_CYCLES
setp pid.2.tune-type [JOINT_2]TUNE_TYPE
setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.maxerrorI [JOINT_3]MAX_ERROR_I
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
# deadband should be just over 1 count
setp pid.3.deadband [JOINT_3]DEADBAND
setp pid.3.tune-effort [JOINT_3]TUNE_EFFORT
setp pid.3.tune-cycles [JOINT_3]TUNE_CYCLES
setp pid.3.tune-type [JOINT_3]TUNE_TYPE
# Connect the enable signals to the PID blocks.
net xEnable joint.0.amp-enable-out => pid.0.enable
net yEnable joint.1.amp-enable-out => pid.1.enable
net zEnable joint.2.amp-enable-out => pid.2.enable
net aEnable joint.3.amp-enable-out => pid.3.enable
# Set siggen parameters.
setp siggen.0.frequency 0.5
setp siggen.0.offset 0
setp siggen.0.amplitude 0.01
# Connect position commands to PID inputs.
net xPosCmd joint.0.motor-pos-cmd => mux2.4.in0
net yPosCmd joint.1.motor-pos-cmd => mux2.5.in0
net zPosCmd joint.2.motor-pos-cmd => mux2.6.in0
net aPosCmd joint.3.motor-pos-cmd => mux2.7.in0
net squareWave siggen.0.square => mux2.4.in1
net squareWave => mux2.5.in1
net squareWave => mux2.6.in1
net squareWave => mux2.7.in1
net xPidPosCmd mux2.4.out => pid.0.command
net yPidPosCmd mux2.5.out => pid.1.command
net zPidPosCmd mux2.6.out => pid.2.command
net aPidPosCmd mux2.7.out => pid.3.command
net xTestMode => mux2.4.sel
net yTestMode => mux2.5.sel
net zTestMode => mux2.6.sel
net aTestMode => mux2.7.sel
# Connect signals to auto-tune pins.
net xStartTune pid.0.tune-start
net xTuneMode pid.0.tune-mode
net yStartTune pid.1.tune-start
net yTuneMode pid.1.tune-mode
net zStartTune pid.2.tune-start
net zTuneMode pid.2.tune-mode
net aStartTune pid.3.tune-start
net aTuneMode pid.3.tune-mode
# DACs
#
# Set DAC output scaling from ini file.
setp motenc.0.dac-01-gain [JOINT_0]OUTPUT_SCALE
setp motenc.0.dac-03-gain [JOINT_1]OUTPUT_SCALE
setp motenc.0.dac-02-gain [JOINT_2]OUTPUT_SCALE
setp motenc.0.dac-00-gain [JOINT_3]OUTPUT_SCALE
# Set DAC offset from ini file.
setp motenc.0.dac-01-offset [JOINT_0]OUTPUT_OFFSET
setp motenc.0.dac-03-offset [JOINT_1]OUTPUT_OFFSET
setp motenc.0.dac-02-offset [JOINT_2]OUTPUT_OFFSET
setp motenc.0.dac-00-offset [JOINT_3]OUTPUT_OFFSET
# Connect PID output signals to DACs.
net xOutput pid.0.output => motenc.0.dac-01-value
net yOutput pid.1.output => motenc.0.dac-03-value
net zOutput pid.2.output => motenc.0.dac-02-value
net aOutput pid.3.output => motenc.0.dac-00-value
net zPosCmd ddt.0.in
net zVelCmd ddt.0.out => ddt.1.in
net zAccCmd ddt.1.out
net zOutput ddt.2.in
net zPidAccCmd ddt.2.out
# Encoders.
#
# Set feedback scaling from ini file.
setp motenc.0.enc-01-scale [JOINT_0]INPUT_SCALE
setp motenc.0.enc-03-scale [JOINT_1]INPUT_SCALE
setp motenc.0.enc-02-scale [JOINT_2]INPUT_SCALE
setp motenc.0.enc-00-scale [JOINT_3]INPUT_SCALE
# Connect position feedback to PID loop.
net xMotorPosFb motenc.0.enc-01-position => pid.0.feedback
net yMotorPosFb motenc.0.enc-03-position => pid.1.feedback
net zMotorPosFb motenc.0.enc-02-position => pid.2.feedback
net aMotorPosFb motenc.0.enc-00-position => pid.3.feedback
# Connect position feedback to motion module.
net xMotorPosFb => mux2.0.in0
net yMotorPosFb => mux2.1.in0
net zMotorPosFb => mux2.2.in0
net aMotorPosFb => mux2.3.in0
net xPosCmd => mux2.0.in1
net yPosCmd => mux2.1.in1
net zPosCmd => mux2.2.in1
net aPosCmd => mux2.3.in1
net xPosFb mux2.0.out => joint.0.motor-pos-fb
net yPosFb mux2.1.out => joint.1.motor-pos-fb
net zPosFb mux2.2.out => joint.2.motor-pos-fb
net aPosFb mux2.3.out => joint.3.motor-pos-fb
net xTuneMode => mux2.0.sel
net yTuneMode => mux2.1.sel
net zTuneMode => mux2.2.sel
net aTuneMode => mux2.3.sel
# Connect position feedback to PLC.
net xMotorPosFb => boss_plc.0.x-position-in
net yMotorPosFb => boss_plc.0.y-position-in
# Connect index pulses to motion controller.
net xIndex motenc.0.enc-01-index-enable <=> joint.0.index-enable
net yIndex motenc.0.enc-03-index-enable <=> joint.1.index-enable
net zIndex motenc.0.enc-02-index-enable <=> joint.2.index-enable
net aIndex motenc.0.enc-00-index-enable <=> joint.3.index-enable
# Limits.
#
# Connect limit/home switch inputs to PLC and motion controller.
net xLimitSw motenc.0.in-09 => boss_plc.0.x-limit-in
net xLimitSw => joint.0.home-sw-in
net yLimitSw motenc.0.in-13 => boss_plc.0.y-limit-in
net yLimitSw => joint.1.home-sw-in
net zMinlimSw motenc.0.in-26 => boss_plc.0.z-limit-neg-in
net zMaxlimSw motenc.0.in-25 => boss_plc.0.z-limit-pos-in
net zHome motenc.0.in-27 => joint.2.home-sw-in
# Connect PLC limit switch outputs to motion controller.
net xMinLim boss_plc.0.x-limit-neg-out => joint.0.neg-lim-sw-in
net xMaxLim boss_plc.0.x-limit-pos-out => joint.0.pos-lim-sw-in
net yMinLim boss_plc.0.y-limit-neg-out => joint.1.neg-lim-sw-in
net yMaxLim boss_plc.0.y-limit-pos-out => joint.1.pos-lim-sw-in
net zMinLim boss_plc.0.z-limit-neg-out => joint.2.neg-lim-sw-in
net zMaxLim boss_plc.0.z-limit-pos-out => joint.2.pos-lim-sw-in
# Amp enables/faults.
#
# Connect amp ready to PLC.
net xReady motenc.0.in-08 => boss_plc.0.x-amp-ready-in
net yReady motenc.0.in-12 => boss_plc.0.y-amp-ready-in
net zReady motenc.0.in-24 => boss_plc.0.z-amp-ready-in
net aReady motenc.0.in-28 => boss_plc.0.a-amp-ready-in
# Connect amp enables to I/O.
net xEnable => motenc.0.out-00
net yEnable => motenc.0.out-01
net zEnable => motenc.0.out-08
net aEnable => motenc.0.out-09
# Connect amp enables to PLC.
net xEnable => boss_plc.0.x-amp-enable-in
net yEnable => boss_plc.0.y-amp-enable-in
net zEnable => boss_plc.0.z-amp-enable-in
net aEnable => boss_plc.0.a-amp-enable-in
# Connect amp faults to motion controller.
net xFault boss_plc.0.x-amp-fault-out => joint.0.amp-fault-in
net yFault boss_plc.0.y-amp-fault-out => joint.1.amp-fault-in
net zFault boss_plc.0.z-amp-fault-out => joint.2.amp-fault-in
net aFault boss_plc.0.a-amp-fault-out => joint.3.amp-fault-in
# Spindle.
#
# Connect spindle speed to PLC and spindle fwd/rev/stat to I/O.
net spindleSpeed spindle.0.speed-out => boss_plc.0.spindle-speed-in
net spindleFwd boss_plc.0.spindle-fwd-out => motenc.0.out-11
net spindleRev boss_plc.0.spindle-rev-out => motenc.0.out-12
net spindleIsOnSw motenc.0.in-29-not => debounce.0.5.in
net spindleIsOn debounce.0.5.out => boss_plc.0.spindle-is-on-in
# Connect spindle brake to PLC and PLC brake to I/O.
setp boss_plc.0.brake-on-delay 500
setp boss_plc.0.brake-off-delay 800
net spindleBrakeOnMot spindle.0.brake => boss_plc.0.brake-en-in
net spindleBrakeOn boss_plc.0.brake-en-out => motenc.0.out-02
# Tool change.
#
# Loop back tool prepare pins.
net toolPrepare iocontrol.0.tool-prepare iocontrol.0.tool-prepared
# Connect tool change pins to PLC.
net toolChange iocontrol.0.tool-change => boss_plc.0.tool-change-in
net toolChanged boss_plc.0.tool-changed-out => iocontrol.0.tool-changed
# Coolant.
#
# Connect mist/flood coolant to I/O.
net mistOn iocontrol.0.coolant-mist => motenc.0.out-14
net floodOn iocontrol.0.coolant-flood => motenc.0.out-15
# Operator console.
#
# Set debounce time.
setp debounce.0.delay 20
# Connect e-stop I/O.
net eStopSense motenc.0.in-32 => iocontrol.0.emc-enable-in
net eStopWrite iocontrol.0.user-enable-out => motenc.0.out-16
# Connect cycle hold/start.
net cycleHoldSw motenc.0.in-33-not => debounce.0.0.in
net cycleHold debounce.0.0.out => boss_plc.0.cycle-hold-in
net cycleStartSw motenc.0.in-34 => debounce.0.1.in
net cycleStart debounce.0.1.out => boss_plc.0.cycle-start-in
net feedHold boss_plc.0.feed-hold-out => motion.feed-hold
net waitUser boss_plc.0.wait-user-out => motenc.0.out-17
# Connect speed overrides.
net spindleIncSw motenc.0.enc-04-index => debounce.0.2.in
net spindleIncDb debounce.0.2.out => boss_plc.0.spindle-inc-in
net spindleInc boss_plc.0.spindle-inc-out => motenc.0.out-03
net spindleDecSw motenc.0.enc-06-index => debounce.0.3.in
net spindleDecDb debounce.0.3.out => boss_plc.0.spindle-dec-in
net spindleDec boss_plc.0.spindle-dec-out => motenc.0.out-04
# Connect limit override.
net limitOverrideSw motenc.0.in-35-not => debounce.0.4.in
net limitOverride debounce.0.4.out => boss_plc.0.limit-override-in
net limitActive boss_plc.0.limit-active-out => motenc.0.out-18
# Connect rapid/feed overrides.
net adaptiveFeed boss_plc.0.adaptive-feed-out => motion.adaptive-feed
setp halui.feed-override.scale 0.01
net feedOverride motenc.0.enc-04-count => halui.feed-override.counts
#net rapidOverride motenc.0.enc-06-count => halui.rapid-override.counts
# Set the jog mode so motion stops as soon as the wheel stops.
setp joint.0.jog-vel-mode TRUE
setp joint.1.jog-vel-mode TRUE
setp joint.2.jog-vel-mode TRUE
setp joint.3.jog-vel-mode TRUE
# Connect jog axis select to motion controller and PLC.
net xJog motenc.0.in-40 => joint.0.jog-enable
net yJog motenc.0.in-41 => joint.1.jog-enable
net zJog motenc.0.in-42 => joint.2.jog-enable
net aJog motenc.0.in-43 => joint.3.jog-enable
net xJog => boss_plc.0.x-jog-en-in
net yJog => boss_plc.0.y-jog-en-in
net zJog => boss_plc.0.z-jog-en-in
# Connect jog wheel encoder.
net jogCounts motenc.0.enc-05-count => joint.0.jog-counts joint.1.jog-counts joint.2.jog-counts joint.3.jog-counts
# Connect jog scale selects to PLC.
setp boss_plc.0.jog-scale-0 0.000001
setp boss_plc.0.jog-scale-1 0.000010
setp boss_plc.0.jog-scale-2 0.000100
net jogScaleSel0 motenc.0.in-36 => boss_plc.0.jog-sel-in-0
net jogScaleSel1 motenc.0.in-37 => boss_plc.0.jog-sel-in-1
net jogScaleSel2 motenc.0.in-38 => boss_plc.0.jog-sel-in-2
# Connect PLC jog scale output.
net jogScale boss_plc.0.jog-scale-out => joint.0.jog-scale joint.1.jog-scale joint.2.jog-scale joint.3.jog-scale

View File

@@ -0,0 +1,269 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-BP-BOSS6
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
# Name of display program, e.g., tklinuxcnc
DISPLAY = tklinuxcnc
#DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tklinuxcnc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
#No Content
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = boss.var
# Enable adaptive feed input, we use it to limit rapid/feed when
# limits are being overridden.
RS274NGC_STARTUP_CODE = M52 P1
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nanoseconds
SERVO_PERIOD = 200000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# HALUI to interact with NML.
# Run before any other HALFILE.
HALUI = halui
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = pid_test.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Trajectory planner section --------------------------------------------------
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
# 2000 rpm, 2:1 reduction, 5 tpi = 200 ipm = 3.33333333333333 ips.
MAX_LINEAR_VELOCITY = 2.5
DEFAULT_LINEAR_VELOCITY = 0.1
# 3000 lbs continuous force. Use 1% = 30 lbs for accel. With 600 lbs load
# that's 0.05g * 9.8 mpss * 39.37 i/m = 19.29 ipss. Motor peak torque
# is 3x continuous.
MAX_LINEAR_ACCELERATION = 3.0
DEFAULT_LINEAR_ACCELERATION = 3.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = boss.tbl
TOOL_CHANGE_POSITION = -18.0 -12.0 0.0
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = 0.0
MAX_LIMIT = 18.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 18.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.05
HOME_SEARCH_VEL = -0.5
HOME_LATCH_VEL = 0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 100.0
I = 0.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
TUNE_EFFORT = 0.5
TUNE_CYCLES = 50
TUNE_TYPE = 1
# Second axis
[AXIS_Y]
MIN_LIMIT = 0.0
MAX_LIMIT = 12.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 12.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -0.4
HOME_LATCH_VEL = 0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 100.0
I = 0.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
TUNE_EFFORT = 0.5
TUNE_CYCLES = 50
TUNE_TYPE = 1
# Third axis
[AXIS_Z]
MIN_LIMIT = -4.75
MAX_LIMIT = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
BACKLASH = 0.0
INPUT_SCALE = -100000
OUTPUT_SCALE = -3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = -4.75
MAX_LIMIT = 0.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = -0.225
HOME_SEARCH_VEL = 0.1
HOME_LATCH_VEL = -0.01
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 100.0
I = 0.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
TUNE_EFFORT = 0.5
TUNE_CYCLES = 50
TUNE_TYPE = 1
# Fourth axis
[AXIS_A]
MIN_LIMIT = 0.0
MAX_LIMIT = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 2.0
BACKLASH = 0.0
INPUT_SCALE = 100000
OUTPUT_SCALE = 3.0
OUTPUT_OFFSET = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 0.0
FERROR = 0.005
MIN_FERROR = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = -0.01
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -1
# PID tuning params
MAX_OUTPUT = 3.333333
DEADBAND = 0.000015
P = 100.0
I = 0.0
D = 0.0
MAX_ERROR_I = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
TUNE_EFFORT = 0.5
TUNE_CYCLES = 50
TUNE_TYPE = 1
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,183 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = COOLTOOL-BASIC540
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper.hal
HALFILE = standard_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 15
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -540.0
MAX_LIMIT = 540.0
MAX_VELOCITY = 20
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 20
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 22
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 133.33333
MIN_LIMIT = -540.0
MAX_LIMIT = 540.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -310.0
MAX_LIMIT = 310.0
MAX_VELOCITY = 20
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 20
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 22
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -133.33333
MIN_LIMIT = -310.0
MAX_LIMIT = 310.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -70.0
MAX_LIMIT = 70.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 16
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -133.33333
MIN_LIMIT = -70.0
MAX_LIMIT = 70.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,209 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = COOLTOOL-BASIC540-4axes
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper4.hal
HALFILE = S4_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
HOME = 0 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 15
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -540.0
MAX_LIMIT = 540.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 22
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 133.33333
MIN_LIMIT = -540.0
MAX_LIMIT = 540.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -310.0
MAX_LIMIT = 310.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 22
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -133.33333
MIN_LIMIT = -310.0
MAX_LIMIT = 310.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -70.0
MAX_LIMIT = 70.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 15
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 16
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -133.33333
MIN_LIMIT = -70.0
MAX_LIMIT = 70.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 10
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 80
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,3 @@
Configuration files for machines supplied by The Cool Tool company.
www.thecooltool.com

View File

@@ -0,0 +1,36 @@
# Step Four Dos Box pinout config file for 4-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
addf parport.0.read base-thread 1
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep parport.0.pin-02-out
net Xdir parport.0.pin-03-out
net Ystep parport.0.pin-04-out
net Ydir parport.0.pin-05-out
net Zstep parport.0.pin-08-out
net Zdir parport.0.pin-09-out
net Astep parport.0.pin-06-out
net Adir parport.0.pin-07-out
# create a signal for the estop loopback
net n0 iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net n1 iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net n2 iocontrol.0.tool-change iocontrol.0.tool-changed
# create a signal for "spindle on"
# commented out till we resolve this issue
# connect it to the iocontroller
net spindle_on spindle.0.on
# connect it to a physical pin
net spindle_on parport.0.pin-16-out

View File

@@ -0,0 +1,210 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-CNC-SET
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 10.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper4.hal
HALFILE = standard_pinout4.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z A
HOME = 0 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -8.8888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 1.000
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,262 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-DREH-G
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
LATHE = 1
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = uni-dreh-g_stepper.hal
HALFILE = uni-dreh-g_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Z C
HOME = 0 0 0 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 6
[AXIS_X]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -32.0
MAX_LIMIT = 32.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -800
MIN_LIMIT = -32.0
MAX_LIMIT = 32.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -8.88888888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Five axis
[AXIS_B]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -8.88888888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Six axis
[AXIS_C]
MIN_LIMIT = -1000000
MAX_LIMIT = 1000000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_5]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
INPUT_SCALE = -8.88888888888
MIN_LIMIT = -1000000
MAX_LIMIT = 1000000
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,184 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-DREH
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
LATHE = 1
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper.hal
HALFILE = standard_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -32.0
MAX_LIMIT = 32.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -32.0
MAX_LIMIT = 32.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,210 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-FRAES-4
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 10.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# TASK = minimilltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper4.hal
HALFILE = standard_pinout4.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
HOME = 0 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -8.8888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,210 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-FRAES-H3
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper.hal
HALFILE = standard_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -8.888888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 50.000
MIN_FERROR = 10.000
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,209 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UNI-FRAES-V3
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper4.hal
HALFILE = standard_pinout4.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -145.0
MAX_LIMIT = 145.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -50.0
MAX_LIMIT = 50.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -8.8888888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 50.000
MIN_FERROR = 10.000
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,209 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# 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 of this INI file
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = UniMillCNC
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# DEBUG = 0x00000003
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
DEBUG = 0
# Sections for display options ------------------------------------------------
[DISPLAY]
#DISPLAY = tklinuxcnc
DISPLAY = axis
#EDITOR = geany
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
# Path to help file
HELP_FILE = doc/help.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section -----------------------------------------------------
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python3
# Trajectory planner section --------------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = stepper.var
# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Base task period, in seconds - this is the fastest thread in the machine
BASE_PERIOD = 50000
# Servo task period, in seconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in seconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
# Name of task controller program, e.g., bridgeporttask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section --------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_stepper.hal
HALFILE = standard_pinout.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Section Filter
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
DEFAULT_LINEAR_ACCELERATION = 20.0
MAX_LINEAR_ACCELERATION = 20.0
# Axes sections ---------------------------------------------------------------
# First axis
[EMCIO]
# tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -230.0
MAX_LIMIT = 230.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.20
SCALE = -800
MIN_LIMIT = -230.0
MAX_LIMIT = 230.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Second axis
[AXIS_Y]
MIN_LIMIT = -127.0
MAX_LIMIT = 127.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.350
SCALE = -800
MIN_LIMIT = -127.0
MAX_LIMIT = 127.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Third axis
[AXIS_Z]
MIN_LIMIT = -159.0
MAX_LIMIT = 159.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 5
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 6
STEPGEN_MAXACCEL = 22
BACKLASH = 0.20
SCALE = -800
MIN_LIMIT = -159.0
MAX_LIMIT = 159.0
FERROR = 0.500
MIN_FERROR = 0.500
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# Four axis
[AXIS_A]
MIN_LIMIT = -10000
MAX_LIMIT = 10000
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 52
STEPGEN_MAXACCEL = 22
BACKLASH = 0.000
SCALE = -8.8888888888
MIN_LIMIT = -10000
MAX_LIMIT = 10000
FERROR = 50.000
MIN_FERROR = 10.000
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
# section for main IO controller parameters -----------------------------------

View File

@@ -0,0 +1,80 @@
loadrt [KINS]KINEMATICS
# core HAL config file for steppers
# first load the stepper module
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD
loadrt stepgen step_type=0,0,0,0
# hook its functions to realtime threads
addf stepgen.capture-position servo-thread
addf stepgen.update-freq servo-thread
addf stepgen.make-pulses base-thread
#add motion controller to the threads
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# connect position commands from motion module to step generator
net Xpos-cmd <= joint.0.motor-pos-cmd
net Xpos-cmd => stepgen.0.position-cmd
net Ypos-cmd <= joint.1.motor-pos-cmd
net Ypos-cmd => stepgen.1.position-cmd
net Zpos-cmd <= joint.2.motor-pos-cmd
net Zpos-cmd => stepgen.2.position-cmd
net Apos-cmd <= joint.3.motor-pos-cmd
net Apos-cmd => stepgen.3.position-cmd
# connect position feedback from step generators
# to motion module
net Xpos-fb <= stepgen.0.position-fb
net Xpos-fb => joint.0.motor-pos-fb
net Ypos-fb <= stepgen.1.position-fb
net Ypos-fb => joint.1.motor-pos-fb
net Zpos-fb <= stepgen.2.position-fb
net Zpos-fb => joint.2.motor-pos-fb
net Apos-fb <= stepgen.3.position-fb
net Apos-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen <= joint.0.amp-enable-out
net Xen => stepgen.0.enable
net Yen <= joint.1.amp-enable-out
net Yen => stepgen.1.enable
net Zen <= joint.2.amp-enable-out
net Zen => stepgen.2.enable
net Aen <= joint.3.amp-enable-out
net Aen => stepgen.3.enable
# connect signals to step pulse generator outputs
net Xstep stepgen.0.step
net Xdir stepgen.0.dir
net Ystep stepgen.1.step
net Ydir stepgen.1.dir
net Zstep stepgen.2.step
net Zdir stepgen.2.dir
net Astep stepgen.3.step
net Adir stepgen.3.dir
# set stepgen module scaling - get values from ini file
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.3.position-scale [JOINT_3]SCALE
# set stepgen module velocity limits - get values from ini file
setp stepgen.0.maxvel [JOINT_0]STEPGEN_MAXVEL
setp stepgen.1.maxvel [JOINT_1]STEPGEN_MAXVEL
setp stepgen.2.maxvel [JOINT_2]STEPGEN_MAXVEL
setp stepgen.3.maxvel [JOINT_3]STEPGEN_MAXVEL
# set stepgen module accel limits - get values from ini file
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
# load realtime portion of scope, just to have it handy
loadrt scope_rt

View File

@@ -0,0 +1,32 @@
# standard pinout config file for 4-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
addf parport.0.read base-thread 1
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep parport.0.pin-03-out
net Xdir parport.0.pin-02-out
net Ystep parport.0.pin-05-out
net Ydir parport.0.pin-04-out
net Zstep parport.0.pin-07-out
net Zdir parport.0.pin-06-out
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prepare-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
# create a signal for "spindle on"
# commented out till we resolve this issue
# connect it to the iocontroller
net spindle_on spindle.0.on
# connect it to a physical pin
net spindle_on parport.0.pin-01-out

View File

@@ -0,0 +1,33 @@
# standard pinout config file for 4-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
addf parport.0.read base-thread 1
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep parport.0.pin-03-out
net Xdir parport.0.pin-02-out
net Ystep parport.0.pin-05-out
net Ydir parport.0.pin-04-out
net Zstep parport.0.pin-07-out
net Zdir parport.0.pin-06-out
net Astep parport.0.pin-09-out
net Adir parport.0.pin-08-out
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prepare-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
# connect it to the iocontroller
net spindle_on spindle.0.on
# connect it to a physical pin
net spindle_on parport.0.pin-01-out

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,40 @@
# standard pinout config file for 6-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378 0x1420"
#
# next connect the parport functions to threads
addf parport.0.read base-thread 1
addf parport.0.write base-thread -1
addf parport.1.read base-thread 1
addf parport.1.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep parport.0.pin-03-out
net Xdir parport.0.pin-02-out
net Ystep parport.0.pin-05-out
net Ydir parport.0.pin-04-out
net Zstep parport.0.pin-07-out
net Zdir parport.0.pin-06-out
net Astep parport.0.pin-16-out
net Adir parport.0.pin-17-out
net Bstep parport.1.pin-05-out
net Bdir parport.1.pin-04-out
net Cstep parport.0.pin-09-out
net Cdir parport.0.pin-08-out
# create a signal for the 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
# create a signal for "spindle on"
# commented out till we resolve this issue
# connect it to the iocontroller
net spindle_on spindle.0.on
# connect it to a physical pin
net spindle_on parport.0.pin-01-out

View File

@@ -0,0 +1,104 @@
loadrt [KINS]KINEMATICS
# core HAL config file for steppers
# first load the stepper module
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD
loadrt stepgen step_type=0,0,0,0,0,0
# hook its functions to realtime threads
addf stepgen.capture-position servo-thread
addf stepgen.update-freq servo-thread
addf stepgen.make-pulses base-thread
#add motion controller to the threads
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# connect position commands from motion module to step generator
net Xpos-cmd <= joint.0.motor-pos-cmd
net Xpos-cmd => stepgen.0.position-cmd
net Ypos-cmd <= joint.1.motor-pos-cmd
net Ypos-cmd => stepgen.1.position-cmd
net Zpos-cmd <= joint.2.motor-pos-cmd
net Zpos-cmd => stepgen.2.position-cmd
net Apos-cmd <= joint.3.motor-pos-cmd
net Apos-cmd => stepgen.3.position-cmd
net Bpos-cmd <= joint.4.motor-pos-cmd
net Bpos-cmd => stepgen.4.position-cmd
net Cpos-cmd <= joint.5.motor-pos-cmd
net Cpos-cmd => stepgen.5.position-cmd
# connect position feedback from step generators
# to motion module
net Xpos-fb <= stepgen.0.position-fb
net Xpos-fb => joint.0.motor-pos-fb
net Ypos-fb <= stepgen.1.position-fb
net Ypos-fb => joint.1.motor-pos-fb
net Zpos-fb <= stepgen.2.position-fb
net Zpos-fb => joint.2.motor-pos-fb
net Apos-fb <= stepgen.3.position-fb
net Apos-fb => joint.3.motor-pos-fb
net Bpos-fb <= stepgen.4.position-fb
net Bpos-fb => joint.4.motor-pos-fb
net Cpos-fb <= stepgen.5.position-fb
net Cpos-fb => joint.5.motor-pos-fb
# connect enable signals for step generators
net Xen <= joint.0.amp-enable-out
net Xen => stepgen.0.enable
net Yen <= joint.1.amp-enable-out
net Yen => stepgen.1.enable
net Zen <= joint.2.amp-enable-out
net Zen => stepgen.2.enable
net Aen <= joint.3.amp-enable-out
net Aen => stepgen.3.enable
net Ben <= joint.4.amp-enable-out
net Ben => stepgen.4.enable
net Cen <= joint.5.amp-enable-out
net Cen => stepgen.5.enable
# connect signals to step pulse generator outputs
net Xstep stepgen.0.step
net Xdir stepgen.0.dir
net Ystep stepgen.1.step
net Ydir stepgen.1.dir
net Zstep stepgen.2.step
net Zdir stepgen.2.dir
net Astep stepgen.3.step
net Adir stepgen.3.dir
net Bstep stepgen.4.step
net Bdir stepgen.4.dir
net Cstep stepgen.5.step
net Cdir stepgen.5.dir
# set stepgen module scaling - get values from ini file
setp stepgen.0.position-scale [JOINT_0]INPUT_SCALE
setp stepgen.1.position-scale [JOINT_1]INPUT_SCALE
setp stepgen.2.position-scale [JOINT_2]INPUT_SCALE
setp stepgen.3.position-scale [JOINT_3]INPUT_SCALE
setp stepgen.4.position-scale [JOINT_4]INPUT_SCALE
setp stepgen.5.position-scale [JOINT_5]INPUT_SCALE
# set stepgen module velocity limits - get values from ini file
setp stepgen.0.maxvel [JOINT_0]STEPGEN_MAXVEL
setp stepgen.1.maxvel [JOINT_1]STEPGEN_MAXVEL
setp stepgen.2.maxvel [JOINT_2]STEPGEN_MAXVEL
setp stepgen.3.maxvel [JOINT_3]STEPGEN_MAXVEL
setp stepgen.4.maxvel [JOINT_4]STEPGEN_MAXVEL
setp stepgen.5.maxvel [JOINT_5]STEPGEN_MAXVEL
# set stepgen module accel limits - get values from ini file
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp stepgen.4.maxaccel [JOINT_4]STEPGEN_MAXACCEL
setp stepgen.5.maxaccel [JOINT_5]STEPGEN_MAXACCEL
# load realtime portion of scope, just to have it handy
loadrt scope_rt

1
configs/by_machine/nc_files Symbolic link
View File

@@ -0,0 +1 @@
../../nc_files

View File

@@ -0,0 +1,17 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<labelframe text="Gripper">
<vbox>
<scale>
<halpin>"gripper"</halpin>
<resolution>1</resolution>
<orient>HORIZONTAL</orient>
<initval>0</initval>
<min_>-200</min_>
<max_>200</max_>
</scale>
</vbox>
</labelframe>
</pyvcp>

View File

@@ -0,0 +1,3 @@
net gripper <= pyvcp.gripper-f
net gripper => scorbot-er-3.joint7.motor-pos-cmd

View File

@@ -0,0 +1,71 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<label><text>"These widgets indicate a HAL_BIT"</text></label>
<hbox>
<label><text>"LED:"</text></label>
<led>
<halpin>"led-sample"</halpin>
<size>20</size>
</led>
</hbox>
<label><text>"These widgets control a HAL_BIT"</text></label>
<vbox>
<hbox>
<label><text>"Button"</text></label>
<button>
<text>"Button:"</text>
<halpin>"button-sample"</halpin>
</button>
</hbox>
<hbox>
<label><text>"Checkbutton:"</text></label>
<checkbutton>
<halpin>"chbutton-sample"</halpin>
</checkbutton>
</hbox>
</vbox>
<label><text>"These widgets indicate a HAL_FLOAT"</text></label>
<vbox>
<hbox>
<label><text>"Bar:"</text></label>
<bar>
<halpin>"bar-sample"</halpin>
</bar>
</hbox>
<hbox>
<label><text>"Number:"</text></label>
<number>
<halpin>"number-sample"</halpin>
<format>"+004.4f"</format>
<font>('Helvetica',40)</font>
</number>
</hbox>
</vbox>
<label><text>"These widgets control a HAL_FLOAT"</text></label>
<vbox>
<hbox>
<label><text>"Scale:"</text></label>
<scale>
<orient>HORIZONTAL</orient>
<halpin>"scale-sample"</halpin>
</scale>
</hbox>
<hbox>
<label><text>"Spinbox:"</text></label>
<spinbox>
<font>('Helvetica',40)</font>
</spinbox>
</hbox>
</vbox>
<!-- this is a comment-->
</vbox>
</pyvcp>

View File

@@ -0,0 +1,113 @@
loadrt [KINS]KINEMATICS
#autoconverted scorbot-kins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt differential
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf differential.0 servo-thread
loadusr -W scorbot-er-3
#
# E-Stop
#
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
#
# Joint 0
#
net j0.cmd <= joint.0.motor-pos-cmd
net j0.cmd => scorbot-er-3.joint0.motor-pos-cmd
net j0.cmd => joint.0.motor-pos-fb
net j0.limit <= scorbot-er-3.joint0.limit-sw
net j0.limit => joint.0.home-sw-in
net j0.limit => joint.0.neg-lim-sw-in
net j0.limit => joint.0.pos-lim-sw-in
setp scorbot-er-3.joint0.scale [JOINT_0]SCALE
#
# Joint 1
#
net j1.cmd <= joint.1.motor-pos-cmd
net j1.cmd => scorbot-er-3.joint1.motor-pos-cmd
net j1.cmd => joint.1.motor-pos-fb
net j1.limit <= scorbot-er-3.joint1.limit-sw
net j1.limit => joint.1.home-sw-in
net j1.limit => joint.1.neg-lim-sw-in
net j1.limit => joint.1.pos-lim-sw-in
setp scorbot-er-3.joint1.scale [JOINT_1]SCALE
#
# Joint 2
#
net j2.cmd <= joint.2.motor-pos-cmd
net j2.cmd => scorbot-er-3.joint2.motor-pos-cmd
net j2.cmd => joint.2.motor-pos-fb
net j2.limit <= scorbot-er-3.joint2.limit-sw
net j2.limit => joint.2.home-sw-in
net j2.limit => joint.2.neg-lim-sw-in
net j2.limit => joint.2.pos-lim-sw-in
setp scorbot-er-3.joint2.scale [JOINT_2]SCALE
#
# Joint 3
# LinuxCNC commands "wrist pitch" on J3, this goes through the differential.
#
net wrist.pitch-cmd <= joint.3.motor-pos-cmd
net wrist.pitch-cmd => differential.0.pitch-cmd
net wrist.pitch-fb <= differential.0.pitch-fb
net wrist.pitch-fb => joint.3.motor-pos-fb
net j3.cmd <= differential.0.motor0-cmd
net j3.cmd => scorbot-er-3.joint3.motor-pos-cmd
net j3.cmd => differential.0.motor0-fb
net wrist-pitch.limit <= scorbot-er-3.joint3.limit-sw
net wrist-pitch.limit => joint.3.home-sw-in
setp scorbot-er-3.joint3.scale [JOINT_3]SCALE
#
# Joint 4
# LinuxCNC commands "wrist roll" on J4, this goes through the differential.
#
net wrist.roll-cmd <= joint.4.motor-pos-cmd
net wrist.roll-cmd => differential.0.roll-cmd
net wrist.roll-fb <= differential.0.roll-fb
net wrist.roll-fb => joint.4.motor-pos-fb
net j4.cmd <= differential.0.motor1-cmd
net j4.cmd => scorbot-er-3.joint4.motor-pos-cmd
net j4.cmd => differential.0.motor1-fb
net wrist-roll.limit <= scorbot-er-3.joint4.limit-sw
net wrist-roll.limit => joint.4.home-sw-in
setp scorbot-er-3.joint4.scale [JOINT_4]SCALE

View File

@@ -0,0 +1,370 @@
# This config file was created 2015-10-18 15:29:00.438682 by the update_ini script
# The original config files may be found in the /home/seb/linuxcnc-dev/configs/by_machine/scorbot-er-3/scorbot-er-3.old directory
[EMC]
# The version string for this INI file.
VERSION = 1.1
MACHINE = Scorbot-ER III
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7fffffff
DEBUG = 0
[DISPLAY]
DISPLAY = axis
CYCLE_TIME = 0.100
HELP_FILE = doc/help.txt
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 2.0
MAX_SPINDLE_OVERRIDE = 2.0
MAX_LINEAR_VELOCITY = 27
DEFAULT_LINEAR_VELOCITY = 27
MAX_ANGULAR_VELOCITY = 27
DEFAULT_ANGULAR_VELOCITY = 27
PROGRAM_PREFIX = ../../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
EDITOR = gvim
TOOL_EDITOR = gvim
INCREMENTS = 10 mm, 1 mm, 0.10 mm, 0.01 mm
PYVCP = gripper.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = sim.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALFILE = scorbot-er-3.hal
#HALFILE = ../../common/shuttlexpress.hal
#HALFILE = shuttlexpress-customization.hal
POSTGUI_HALFILE = pyvcp.hal
HALUI = halui
[HALUI]
#No Content
[TRAJ]
AXES = 5
COORDINATES = X Y Z A B
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
#HOME = 0 0 0 0 0
# mm/second
DEFAULT_VELOCITY = 675
MAX_VELOCITY = 675
# mm/second/second
DEFAULT_ACCELERATION = 5000
MAX_ACCELERATION = 5000
POSITION_FILE = position.txt
#
# The Scorbot-ER III User's Manual (6th Edition) Appendix E states that
# motors 1-5 (joints 0-4) use optical encoders with 6 slots/revolution.
# Experimentally, the Scorbot motor control box reports 6 counts per
# revolution.
#
# The arm motors (joint 0, 1, & 2) have gearboxes with a ratio of 127.7:1.
# The wrist motors (joints 3 & 4) have gearboxes with a ratio of 65.5:1.
#
# 6 counts/motor-rev * 127.7 motor-revs/driveshaft-rev = 766.2 counts/driveshaft-rev
#
# 6 counts/motor-rev * 65.5 motor-revs/driveshaft-rev = 393 counts/driveshaft-rev
#
# Each motor then has a different transmission to actuate the joint, but
# they're all 1:1 after the gearbox on the motor.
#
[EMCIO]
#TOOL_TABLE = sim.tbl
#TOOL_CHANGE_POSITION = 0 0 0
#TOOL_CHANGE_QUILL_UP = 1
[KINS]
KINEMATICS = scorbot-kins
#This is a best-guess at the number of joints, it should be checked
JOINTS = 5
[AXIS_X]
HOME = 0.000
MIN_LIMIT = -1000
MAX_LIMIT = 1000
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
[JOINT_0]
TYPE = ANGULAR
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
# Motor 0 turns a 24 tooth gear that rolls around a 120 tooth gear.
# 766.2 counts/driveshaft-rev * 1 driveshaft-rev/24 teeth = 31.925 counts/tooth
# 31.925 counts/tooth * 120 teeth/joint-rev = 3831.0 counts/joint-rev
# 3831.0 counts/joint-rev * 1 joint-rev/360 degrees = 10.6417 counts/degree
SCALE = 10.6417
MIN_LIMIT = -1000
MAX_LIMIT = 1000
FERROR = 0.100
MIN_FERROR = 0.010
HOME = 0.000
HOME_OFFSET = -0.100
HOME_SEARCH_VEL = -7.500
HOME_LATCH_VEL = 2.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_Y]
HOME = 130.000
MIN_LIMIT = -1000
MAX_LIMIT = 1000
MAX_VELOCITY = 500
MAX_ACCELERATION = 5000
[JOINT_1]
TYPE = ANGULAR
MAX_VELOCITY = 500
MAX_ACCELERATION = 5000
# Motor 1 turns an 18 tooth gear that rolls around a 72 tooth gear.
# 766.2 counts/driveshaft-rev * 1 driveshaft-rev/18 teeth = 42.567 counts/tooth
# 42.567 counts/tooth * 72 teeth/joint-rev = 3064.8 counts/joint-rev
# 3064.8 counts/joint-rev * 1 joint-rev/360 degrees = 8.513 counts/degree
SCALE = -8.513
MIN_LIMIT = -32
MAX_LIMIT = 127
FERROR = 0.100
MIN_FERROR = 0.010
HOME = 125.000
HOME_OFFSET = 127.900
HOME_SEARCH_VEL = 7.500
HOME_LATCH_VEL = -2.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Z]
HOME = 0.000
MIN_LIMIT = -1000
MAX_LIMIT = 1000
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
[JOINT_2]
TYPE = ANGULAR
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
# Motor 2 turns an 18 tooth gear that rolls around a 72 tooth gear.
# The 72 tooth gear turns a 19(?) tooth timing pulley connected to a 17 tooth timing pulley.
# 766.2 counts/driveshaft-rev * 1 driveshaft-rev/18 teeth = 42.567 counts/tooth
# 42.567 counts/tooth * 72 teeth/axle-rev = 3064.8 counts/axle-rev
# 3064.8 counts/axle-rev * 1 axle-rev/19 timing-teeth = 161.305 counts/timing-tooth
# 161.305 counts/timing-tooth * 17 timing-teeth/joint-rev = 2742.189 counts/joint-rev
# 2742.189 counts/joint-rev * 1 joint-rev/360 degrees = 7.617 counts/rev
SCALE = 7.6171929824561415
MIN_LIMIT = -1000
MAX_LIMIT = 1000
FERROR = 0.050
MIN_FERROR = 0.010
HOME = 0.000
HOME_OFFSET = -30.001
HOME_SEARCH_VEL = -7.500
HOME_LATCH_VEL = 2.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_A]
HOME = 20.0
MIN_LIMIT = -1000
MAX_LIMIT = 1000
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
[JOINT_3]
TYPE = ANGULAR
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
# Motor 3 turns a 12 tooth timing gear (gear #1) connected by a timing belt
# to a 23 tooth timing gear (gear #2). Gear #2 is connected by another
# belt to another 23 tooth timing gear (gear #3). Gear #3 is connected by
# another timing belt to another 23 tooth timing gear (gear #4).
# Gear #4 is connected to a differential drive in the wrist.
# The drive gear (the part of the diff rigidly connected to the timing gear)
# has 32 teeth. The driven gear also has 32 teeth.
#
# FIXME: Since this motor moves the hand in two degrees of freedom, i'm not
# sure how to think about the units etc here.
#
# At the motor:
# 393 counts/driveshaft-rev * 1 driveshaft-rev/12 teeth = 32.75 counts/timing-tooth
# Then at the end of the timing belt drive:
# 32.75 counts/timing-tooth * 32 diff-teeth/23 timing-teeth = 45.56521739130435 counts/diff-tooth
# 45.56521739130435 counts/diff-tooth * 32 diff-teeth/360 degrees = 4.05024154589372 counts/degree
# FIXME: i'm not sure it's ok to convert diff-teeth to degrees that way since it's a differential
SCALE = 4.05024154589372
MIN_LIMIT = -1000
MAX_LIMIT = 1000
FERROR = 0.050
MIN_FERROR = 0.010
HOME = -30.0
HOME_OFFSET = -56.0
HOME_SEARCH_VEL = -7.500
HOME_LATCH_VEL = 2.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_B]
HOME = 4.0
MIN_LIMIT = -1000
MAX_LIMIT = 1000
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
[JOINT_4]
TYPE = ANGULAR
MAX_VELOCITY = 675
MAX_ACCELERATION = 5000
# Motor 4, same as motor 3
SCALE = 4.05024154589372
MIN_LIMIT = -1000
MAX_LIMIT = 1000
FERROR = 0.050
MIN_FERROR = 0.010
HOME = 4.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -7.500
HOME_LATCH_VEL = 2.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
#[AXIS_5]
#TYPE = ANGULAR
#MAX_VELOCITY = 100
#MAX_ACCELERATION = 500
# joint 5
#SCALE = 5
#MIN_LIMIT = -8.0
#MAX_LIMIT = 0.0001
#FERROR = 0.050
#MIN_FERROR = 0.010
#HOME = 0.000
#HOME_OFFSET = 1.0
#HOME_SEARCH_VEL = 20.0
#HOME_LATCH_VEL = 20.0
#HOME_USE_INDEX = NO
#HOME_IGNORE_LIMITS = NO
#HOME_SEQUENCE = 0
#[AXIS_6]
#TYPE = ANGULAR
#MAX_VELOCITY = 100
#MAX_ACCELERATION = 500
# joint 6
#SCALE = 5
#MIN_LIMIT = -8.0
#MAX_LIMIT = 0.0001
#FERROR = 0.050
#MIN_FERROR = 0.010
#HOME = 0.000
#HOME_OFFSET = 1.0
#HOME_SEARCH_VEL = 20.0
#HOME_LATCH_VEL = 20.0
#HOME_USE_INDEX = NO
#HOME_IGNORE_LIMITS = NO
#HOME_SEQUENCE = 0
#[AXIS_7]
#TYPE = ANGULAR
#MAX_VELOCITY = 100
#MAX_ACCELERATION = 500
# joint 7
#SCALE = 5
#MIN_LIMIT = -8.0
#MAX_LIMIT = 0.0001
#FERROR = 0.050
#MIN_FERROR = 0.010
#HOME = 0.000
#HOME_OFFSET = 1.0
#HOME_SEARCH_VEL = 20.0
#HOME_LATCH_VEL = 20.0
#HOME_USE_INDEX = NO
#HOME_IGNORE_LIMITS = NO
#HOME_SEQUENCE = 0

View File

@@ -0,0 +1,20 @@
# for each click of the jog-wheel there's 1000 simulated counts coming out
# of the ilowpass below, so these numbers are 1000x smaller than the jog
# increment size they encode
setp tristate-float.sxp-jog-increment-0.in 0.0005
setp tristate-float.sxp-jog-increment-1.in 0.001
setp tristate-float.sxp-jog-increment-2.in 0.005
setp tristate-float.sxp-jog-increment-3.in 0.010
# each of the 8 tristate floats has a constant jog speed on it
# speeds are specified as "fraction of machine max speed"
setp tristate-float.sxp0.in 0
setp tristate-float.sxp1.in 25
setp tristate-float.sxp2.in 50
setp tristate-float.sxp3.in 100
setp tristate-float.sxp4.in 200
setp tristate-float.sxp5.in 400
setp tristate-float.sxp6.in 810
setp tristate-float.sxp7.in 1620

View File

@@ -0,0 +1,3 @@
Sherline Proucts
www.sherline.com

View File

@@ -0,0 +1,7 @@
This configuration step is intended for Sherline 3-axis stepper machines.
Sherline3Axis_inch.ini
inch units
Sherline3Axis_mm.ini
metric units

View File

@@ -0,0 +1,205 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-IN
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
#- Path to help file
HELP_FILE = tklinuxcnc.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = core_stepper.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z A B C
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.18
MAX_LINEAR_VELOCITY = .36
DEFAULT_LINEAR_ACCELERATION = 2.0
MAX_LINEAR_ACCELERATION = 2.0
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 2
STEPGEN_MAXACCEL = 2.2
BACKLASH = 0.000
SCALE = 16000
MIN_LIMIT = -10
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
STEPGEN_MAXACCEL = 2.20
BACKLASH = 0.000
SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 1
MIN_FERROR = .01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
STEPGEN_MAXACCEL = 2.20
BACKLASH = 0.000
SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,205 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-MM
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
#- Path to help file
HELP_FILE = tklinuxcnc.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = core_stepper.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z A B C
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 4.6
MAX_LINEAR_VELOCITY = 8
DEFAULT_LINEAR_ACCELERATION = 50
MAX_LINEAR_ACCELERATION = 50
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -400
MAX_LIMIT = 400.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = 800
MIN_LIMIT = -400
MAX_LIMIT = 400.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,77 @@
# standard pinout config file for 3-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
net Ystep => parport.0.pin-05-out
net Ydir => parport.0.pin-04-out
net Zstep => parport.0.pin-07-out
net Zdir => parport.0.pin-06-out
# create a signal for the 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
# connect "spindle on" motion controller pin to a physical pin
net spindle-on spindle.0.on => parport.0.pin-09-out
###
### You might use something like this to enable chopper drives when machine ON
### the Xen signal is defined in core_stepper.hal
###
# net Xen => parport.0.pin-01-out
###
### If you want active low for this pin, invert it like this:
###
# setp parport.0.pin-01-out-invert 1
###
### A sample home switch on the X axis (axis 0). make a signal,
### link the incoming parport pin to the signal, then link the signal
### to EMC's axis 0 home switch input pin
###
# net Xhome parport.0.pin-10-in => joint.0.home-sw-in
###
### Shared home switches all on one parallel port pin?
### that's ok, hook the same signal to all the axes, but be sure to
### set HOME_IS_SHARED and HOME_SEQUENCE in the ini file. See the
### user manual!
###
# net homeswitches <= parport.0.pin-10-in
# net homeswitches => joint.0.home-sw-in
# net homeswitches => joint.1.home-sw-in
# net homeswitches => joint.2.home-sw-in
###
### Sample separate limit switches on the X axis (axis 0)
###
# net X-neg-limit parport.0.pin-11-in => joint.0.neg-lim-sw-in
# net X-pos-limit parport.0.pin-12-in => joint.0.pos-lim-sw-in
###
### Just like the shared home switches example, you can wire together
### limit switches. Beware if you hit one, EMC will stop but can't tell
### you which switch/axis has faulted. Use caution when recovering from this.
###
# net Xlimits parport.0.pin-13-in => joint.0.neg-lim-sw-in joint.0.pos-lim-sw-in

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,7 @@
This configuration step is intended for Sherline 4-axis stepper machines.
Sherline4Axis_inch.ini
inch units
Sherline4Axis_mm.ini
metric units

View File

@@ -0,0 +1,243 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-XYZA-IN
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
#- Path to help file
HELP_FILE = doc/help.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.20
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
GEOMETRY = AXYZ
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
#- Name of task controller program, e.g., bridgeporttask
TASK = milltask
# TASK = minimilltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = stepper_xyza.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z A
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = .2
DEFAULT_ANGULAR_VELOCITY = 25
MAX_LINEAR_VELOCITY = 25
MAX_ANGULAR_VELOCITY = 25
DEFAULT_LINEAR_ACCELERATION = 2.0
MAX_LINEAR_ACCELERATION = 2.0
# for gui only
MAX_LINEAR_VELOCITY = .36
DEFAULT_LINEAR_VELOCITY = .2
MAX_ANGULAR_VELOCITY = 25
DEFAULT_ANGULAR_VELOCITY = 25
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 2
STEPGEN_MAXVEL = .4
STEPGEN_MAXACCEL = 2.2
BACKLASH = 0.000
INPUT_SCALE = 16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.0100
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
STEPGEN_MAXVEL = .4
STEPGEN_MAXACCEL = 2.2
BACKLASH = 0.000
INPUT_SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
STEPGEN_MAXVEL = .4
STEPGEN_MAXACCEL = 2.2
BACKLASH = 0.000
INPUT_SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 160.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 160.0
STEPGEN_MAXVEL = 26.0
STEPGEN_MAXACCEL = 196.0
BACKLASH = 0.000
INPUT_SCALE = 160
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,243 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-XYZA-IN
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
#- Path to help file
HELP_FILE = doc/help.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.20
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
GEOMETRY = AXYZ
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
#- Name of task controller program, e.g., bridgeporttask
TASK = milltask
# TASK = minimilltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = stepper_xyza.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z A
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 4.6
DEFAULT_ANGULAR_VELOCITY = 25
MAX_LINEAR_VELOCITY = 25
MAX_ANGULAR_VELOCITY = 25
DEFAULT_LINEAR_ACCELERATION = 50
MAX_LINEAR_ACCELERATION = 50
# for gui only
MAX_LINEAR_VELOCITY = 8
DEFAULT_LINEAR_VELOCITY = 4.6
MAX_ANGULAR_VELOCITY = 25
DEFAULT_ANGULAR_VELOCITY = 25
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 50
STEPGEN_MAXVEL = 10
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
INPUT_SCALE = 800
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
FERROR = 026.00
MIN_FERROR = 0.2600
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXVEL = 10
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
INPUT_SCALE = -800
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
FERROR = 026.00
MIN_FERROR = 0.260
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXVEL = 10
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
INPUT_SCALE = -800
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
FERROR = 026.00
MIN_FERROR = 0.260
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 160.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 160.0
STEPGEN_MAXVEL = 26.0
STEPGEN_MAXACCEL = 196.0
BACKLASH = 0.000
INPUT_SCALE = 160
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,43 @@
# standard pinout config file for 3-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
#net estop-out => parport.0.pin-01-out
net Xstep parport.0.pin-03-out
net Xdir parport.0.pin-02-out
net Ystep parport.0.pin-05-out
net Ydir parport.0.pin-04-out
net Zstep parport.0.pin-07-out
net Zdir parport.0.pin-06-out
net Astep parport.0.pin-09-out
net Adir parport.0.pin-08-out
# create a signal for the estop loopback
net estop-ext <= parport.0.pin-10-in
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
# create signals for tool loading loopback
#net ioctl-tool-prepare iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#net ioctl-tool-change iocontrol.0.tool-change iocontrol.0.tool-changed
# create a signal for "spindle on"
#newsig spindle_on bit
# commented out till we resolve this issue
# connect it to the iocontroller
#linksp spindle_on spindle.0.on
# connect it to a physical pin
#linksp spindle_on parport.0.pin-01-out

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,106 @@
# core HAL config file for steppers
# first load the core 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
# stepper module
loadrt stepgen step_type=0,0,0,0
# hook its functions to realtime threads
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
# connect position commands from motion module to step generator
net Xpos-cmd <= joint.0.motor-pos-cmd
net Xpos-cmd => stepgen.0.position-cmd
net Ypos-cmd <= joint.1.motor-pos-cmd
net Ypos-cmd => stepgen.1.position-cmd
net Zpos-cmd <= joint.2.motor-pos-cmd
net Zpos-cmd => stepgen.2.position-cmd
net Apos-cmd <= joint.3.motor-pos-cmd
net Apos-cmd => stepgen.3.position-cmd
# connect position feedback from step generators
# to motion module
net Xpos-fb <= stepgen.0.position-fb
net Xpos-fb => joint.0.motor-pos-fb
net Ypos-fb <= stepgen.1.position-fb
net Ypos-fb => joint.1.motor-pos-fb
net Zpos-fb <= stepgen.2.position-fb
net Zpos-fb => joint.2.motor-pos-fb
net Apos-fb <= stepgen.3.position-fb
net Apos-fb => joint.3.motor-pos-fb
# send the position commands thru differentiators to
# generate velocity and accel signals
# first 8 differentiators
loadrt ddt count=8
# link the differentiator functions into the code
addf ddt.0 servo-thread
addf ddt.1 servo-thread
addf ddt.2 servo-thread
addf ddt.3 servo-thread
addf ddt.4 servo-thread
addf ddt.5 servo-thread
addf ddt.6 servo-thread
addf ddt.7 servo-thread
# define the signals, and hook them up
net Xpos-cmd => ddt.0.in
net Xvel <= ddt.0.out
net Xvel => ddt.1.in
net Xacc <= ddt.1.out
net Ypos-cmd => ddt.2.in
net Yvel <= ddt.2.out
net Yvel => ddt.3.in
net Yacc <= ddt.3.out
net Zpos-cmd => ddt.4.in
net Zvel <= ddt.4.out
net Zvel => ddt.5.in
net Zacc <= ddt.5.out
net Apos-cmd => ddt.6.in
net Avel <= ddt.6.out
net Avel => ddt.7.in
net Aacc <= ddt.7.out
# connect enable signals for step generators
net Xen <= joint.0.amp-enable-out
net Xen => stepgen.0.enable
net Yen <= joint.1.amp-enable-out
net Yen => stepgen.1.enable
net Zen <= joint.2.amp-enable-out
net Zen => stepgen.2.enable
net Aen <= joint.3.amp-enable-out
net Aen => stepgen.3.enable
# connect signals to step pulse generator outputs
net Xstep stepgen.0.step
net Xdir stepgen.0.dir
net Ystep stepgen.1.step
net Ydir stepgen.1.dir
net Zstep stepgen.2.step
net Zdir stepgen.2.dir
net Astep stepgen.3.step
net Adir stepgen.3.dir
# set stepgen module scaling - get values from ini file
setp stepgen.0.position-scale [JOINT_0]INPUT_SCALE
setp stepgen.1.position-scale [JOINT_1]INPUT_SCALE
setp stepgen.2.position-scale [JOINT_2]INPUT_SCALE
setp stepgen.3.position-scale [JOINT_3]INPUT_SCALE
# set stepgen module velocity limits - get values from ini file
setp stepgen.0.maxvel [JOINT_0]STEPGEN_MAXVEL
setp stepgen.1.maxvel [JOINT_1]STEPGEN_MAXVEL
setp stepgen.2.maxvel [JOINT_2]STEPGEN_MAXVEL
setp stepgen.3.maxvel [JOINT_3]STEPGEN_MAXVEL
# set stepgen module accel limits - get values from ini file
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL

View File

@@ -0,0 +1,7 @@
This configuration step is intended for Sherline stepper lathes.
SherlineLathe_inch.in
inch units
SherlineLathe_mm.in
metric units

View File

@@ -0,0 +1,206 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-IN
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
LATHE = 1
#- Path to help file
HELP_FILE = tklinuxcnc.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = core_stepper.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z A B C
COORDINATES = X Z
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.18
MAX_LINEAR_VELOCITY = .36
DEFAULT_LINEAR_ACCELERATION = 2.0
MAX_LINEAR_ACCELERATION = 2.0
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 2
STEPGEN_MAXACCEL = 2.2
BACKLASH = 0.000
SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.5
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = .36
MAX_ACCELERATION = 2.0
STEPGEN_MAXACCEL = 2.20
BACKLASH = 0.000
SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 1
MIN_FERROR = .5
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = .36
MAX_ACCELERATION = 2
STEPGEN_MAXACCEL = 2.20
BACKLASH = 0.000
SCALE = -16000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 01.00
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,206 @@
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# Settings with a + at the front of the comment are likely needed to get
# changed by the user.
# Settings with a - at the front are highly unneeded to be changed
###############################################################################
# General section
###############################################################################
[EMC]
#- Version of this INI file
VERSION = 1.1
#+ Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-STEP-MM
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
###############################################################################
# Sections for display options
###############################################################################
[DISPLAY]
DISPLAY = axis
# DISPLAY = tklinuxcnc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.200
LATHE = 1
#- Path to help file
HELP_FILE = tklinuxcnc.txt
#- Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
#- Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
#+ Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
#- Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
#- Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
###############################################################################
# Task controller section
###############################################################################
[FILTER]
#No Content
[RS274NGC]
#- File containing interpreter variables
PARAMETER_FILE = stepper.var
###############################################################################
# Motion control section
###############################################################################
[EMCMOT]
#- Name of the motion controller to use (only one exists for nontrivkins)
EMCMOT = motmod
#- Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 50000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 1000000
###############################################################################
# Hardware Abstraction Layer section
###############################################################################
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
#- Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
###############################################################################
# Part program interpreter section
###############################################################################
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = core_stepper.hal
#HALFILE = xylotex_pinout.hal
HALFILE = standard_pinout.hal
#- list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
###############################################################################
# Trajectory planner section
###############################################################################
[HALUI]
#No Content
[TRAJ]
#+ machine specific settings
# COORDINATES = X Y Z A B C
COORDINATES = X Z
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 4.6
MAX_LINEAR_VELOCITY = 8
DEFAULT_LINEAR_ACCELERATION = 50
MAX_LINEAR_ACCELERATION = 50
###############################################################################
# Axes sections
###############################################################################
#+ First axis
[EMCIO]
#- tool table file
TOOL_TABLE = stepper.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -400
MAX_LIMIT = 400.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
# NOTE: the step generator module applies its own limits to
# acceleration and velocity. We have discovered that it needs
# to have a little "headroom" over the accel by the trajectory
# planner, otherwise it can fall slightly behind during accel
# and later overshoot as it catches up. In the long term we
# hope to come up with a clean fix for this problem. In the
# meantime, please set STEPGEN_MAXACCEL below to a few percent
# higher than the regular acceleration limit MAX_ACCELERATION
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -400
MAX_LIMIT = 400.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Second axis
[AXIS_Y]
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
#+ Third axis
[AXIS_Z]
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 8
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 60
BACKLASH = 0.000
SCALE = -800
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
FERROR = 26
MIN_FERROR = 0.26
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
###############################################################################
# section for main IO controller parameters
###############################################################################

View File

@@ -0,0 +1,77 @@
# standard pinout config file for 3-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
net Ystep => parport.0.pin-05-out
net Ydir => parport.0.pin-04-out
net Zstep => parport.0.pin-07-out
net Zdir => parport.0.pin-06-out
# create a signal for the 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
# connect "spindle on" motion controller pin to a physical pin
net spindle-on spindle.0.on => parport.0.pin-09-out
###
### You might use something like this to enable chopper drives when machine ON
### the Xen signal is defined in core_stepper.hal
###
# net Xen => parport.0.pin-01-out
###
### If you want active low for this pin, invert it like this:
###
# setp parport.0.pin-01-out-invert 1
###
### A sample home switch on the X axis (axis 0). make a signal,
### link the incoming parport pin to the signal, then link the signal
### to EMC's axis 0 home switch input pin
###
# net Xhome parport.0.pin-10-in => joint.0.home-sw-in
###
### Shared home switches all on one parallel port pin?
### that's ok, hook the same signal to all the axes, but be sure to
### set HOME_IS_SHARED and HOME_SEQUENCE in the ini file. See the
### user manual!
###
# net homeswitches <= parport.0.pin-10-in
# net homeswitches => joint.0.home-sw-in
# net homeswitches => joint.1.home-sw-in
# net homeswitches => joint.2.home-sw-in
###
### Sample separate limit switches on the X axis (axis 0)
###
# net X-neg-limit parport.0.pin-11-in => joint.0.neg-lim-sw-in
# net X-pos-limit parport.0.pin-12-in => joint.0.pos-lim-sw-in
###
### Just like the shared home switches example, you can wire together
### limit switches. Beware if you hit one, EMC will stop but can't tell
### you which switch/axis has faulted. Use caution when recovering from this.
###
# net Xlimits parport.0.pin-13-in => joint.0.neg-lim-sw-in joint.0.pos-lim-sw-in

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,271 @@
# EMC controller parameters for Parallel Port controlled Smithy 1034 Gecko Mill
[EMC]
MACHINE = Smithy 1034 Gecko Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 2.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 1240gecko.hal
EZTROL_HALFILE = eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 2.0
MAX_LINEAR_ACCELERATION = 1.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -14.7
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 2.2
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = 10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -14.7
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -7.7
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 2.2
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = -10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -7.7
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -9.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 1.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.4
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = -10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -9.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
STEPGEN_MAXVEL = 33.0
STEPGEN_MAXACCEL = 330.0
BACKLASH = 0.0000
SCALE = -500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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 = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,187 @@
# 5i20 config file for Smithy 1240 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4 enable_raw"
# 13312 = 0x3400 = Encoder Sample Rate Register
setp hm2_5i20.0.raw.write_address 13312
# sample rate is clock (33 MHz)/SRR+2 = 33MHz/10 = 3.3MHz
setp hm2_5i20.0.raw.write_data 8
# write data
setp hm2_5i20.0.raw.write_strobe 1
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 4000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 1250
setp hm2_5i20.0.stepgen.00.steplen 1250
setp hm2_5i20.0.stepgen.00.stepspace 1250
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 1250
setp hm2_5i20.0.stepgen.01.steplen 1250
setp hm2_5i20.0.stepgen.01.stepspace 1250
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 1250
setp hm2_5i20.0.stepgen.02.steplen 1250
setp hm2_5i20.0.stepgen.02.stepspace 1250
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 1250
setp hm2_5i20.0.stepgen.03.steplen 1250
setp hm2_5i20.0.stepgen.03.stepspace 1250
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
#net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
#net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
#net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
#net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.024.in_not => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.026.in_not => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in_not => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in_not => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.032.in_not => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.034.in_not => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV0 hm2_5i20.0.gpio.025.in_not
net DRV1 hm2_5i20.0.gpio.027.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.forward => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,285 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 1240 Mill
[EMC]
MACHINE = Smithy 1240 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
#MAX_LINEAR_VELOCITY = 7.0
MAX_LINEAR_VELOCITY = 5.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 150.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 1240.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 20.0
MAX_LINEAR_VELOCITY = 5.0
MAX_LINEAR_ACCELERATION = 7.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = 50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 9600 deg/min
SCALE = 2500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 2.0
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 4000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,187 @@
# 5i20 config file for 4 Axis Smithy 1240 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4 enable_raw"
# 13312 = 0x3400 = Encoder Sample Rate Register
setp hm2_5i20.0.raw.write_address 13312
# sample rate is clock (33 MHz)/SRR+2 = 33MHz/10 = 3.3MHz
setp hm2_5i20.0.raw.write_data 8
# write data
setp hm2_5i20.0.raw.write_strobe 1
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 4000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 1250
setp hm2_5i20.0.stepgen.00.steplen 1250
setp hm2_5i20.0.stepgen.00.stepspace 1250
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 1250
setp hm2_5i20.0.stepgen.01.steplen 1250
setp hm2_5i20.0.stepgen.01.stepspace 1250
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 1250
setp hm2_5i20.0.stepgen.02.steplen 1250
setp hm2_5i20.0.stepgen.02.stepspace 1250
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 1250
setp hm2_5i20.0.stepgen.03.steplen 1250
setp hm2_5i20.0.stepgen.03.stepspace 1250
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.024.in_not => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.026.in_not => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in_not => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in_not => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.032.in_not => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.034.in_not => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV0 hm2_5i20.0.gpio.025.in_not
net DRV1 hm2_5i20.0.gpio.027.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.forward => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,285 @@
# EMC controller parameters for Mesa 5i20 controlled 4 Axis Smithy 1240 Mill
[EMC]
MACHINE = 4 Axis Smithy 1240 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
#MAX_LINEAR_VELOCITY = 7.0
MAX_LINEAR_VELOCITY = 5.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 150.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 1240_4axis.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 20.0
MAX_LINEAR_VELOCITY = 5.0
MAX_LINEAR_ACCELERATION = 7.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = 50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
#MAX_VELOCITY = 7.0
#MAX_ACCELERATION = 10.0
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 7.5
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472 in/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 9600 deg/min
SCALE = 2500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 2.0
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 4000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,277 @@
# 5i20 config file for Smithy 1240 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/sssvst2_2_4_v31.bit num_encoders=1 num_pwmgens=0 num_stepgens=4 sserial_port_0=0xxxxxxx enable_raw"
#loadrt hm2_pci config="firmware=hm2/5i20/sssvst2_2_2_v35.bit num_encoders=1 num_pwmgens=0 num_stepgens=4 enable_raw"
# 13312 = 0x3400 = Encoder Sample Rate Register
setp hm2_5i20.0.raw.write_address 13312
# sample rate is clock (33 MHz)/SRR+2 = 33MHz/10 = 3.3MHz
setp hm2_5i20.0.raw.write_data 8
# write data
setp hm2_5i20.0.raw.write_strobe 1
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
setp charge-pump.enable TRUE
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 1.0
setp pid.0.deadband 0.01
# load and configure the spindle speed limiting, filtering, and comparison blocks
# Need this line so AXIS shows +/- buttons
net srpm spindle.0.speed-out
# Limit bounds and slew rate/second
loadrt limit2
setp limit2.0.min -100
setp limit2.0.max 100
setp limit2.0.maxv 50
# Stalled spindle detector
loadrt abs
loadrt comp count=2
setp comp.0.in0 1.0
setp comp.1.in0 0.0
loadrt and2 count=2
# Filter srps
loadrt lowpass
setp lowpass.0.gain 0.07
# Spindle at-speed detection
loadrt near
setp near.0.scale 1.1
setp near.0.difference 0.1
net srps spindle.0.speed-out-rps limit2.0.in near.0.in1
net scmd limit2.0.out pid.0.command
net fb hm2_5i20.0.encoder.00.velocity pid.0.feedback spindle.0.speed-in lowpass.0.in comp.1.in1
net sflt lowpass.0.out near.0.in2
net at-speed near.0.out spindle.0.at-speed
net scur-abs abs.0.out comp.0.in1
net scmd-ok comp.0.equal and2.0.in0
net sfb-ok comp.1.equal and2.0.in1
net stall and2.0.out
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
### q = encoder, h=hall sensors, i=index
loadrt bldc cfg=qh
setp bldc.0.rev 1
setp hm2_5i20.0.encoder.00.scale 2880
net Spos hm2_5i20.0.encoder.00.position spindle.0.revs
net Sidx hm2_5i20.0.encoder.00.index-enable spindle.0.index-enable
net pid-out pid.0.output bldc.0.value
net rawcount hm2_5i20.0.encoder.00.rawcounts
net rotor_angle hm2_5i20.0.8i20.0.0.angle bldc.0.rotor-angle
setp hm2_5i20.0.8i20.0.0.max_current 30.0
net current bldc.0.out hm2_5i20.0.8i20.0.0.current abs.0.in
### IF cfg==*q* uncomment these lines
setp bldc.0.initvalue 0.8
setp bldc.0.lead-angle 0
### 2.2kW Motor
setp bldc.0.poles 4
### 1kW Motor
#setp bldc.0.poles 8
setp bldc.0.scale -2880
net rawcount bldc.0.rawcounts
### IF cfg==*h* uncomment these lines
net spindle-on spindle.0.on pid.0.enable
net sa bldc.0.hall1 hm2_5i20.0.gpio.005.in
net sb bldc.0.hall2 hm2_5i20.0.gpio.007.in
net sc bldc.0.hall3 hm2_5i20.0.gpio.009.in
### 2.2kW Motor
setp bldc.0.pattern 17 # 17 or 44
### 1kW Motor
#setp bldc.0.pattern 34 # 15 or 34
### ELSE uncomment these lines
#net amp-enable bldc.0.init
#net init-done bldc.0.init-done
### IF cfg==*i* uncomment this line
#net Sidx bldc.0.index-enable
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 2000
setp hm2_5i20.0.stepgen.00.steplen 2000
setp hm2_5i20.0.stepgen.00.stepspace 2000
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 2000
setp hm2_5i20.0.stepgen.01.steplen 2000
setp hm2_5i20.0.stepgen.01.stepspace 2000
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 2000
setp hm2_5i20.0.stepgen.02.steplen 2000
setp hm2_5i20.0.stepgen.02.stepspace 2000
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 2000
setp hm2_5i20.0.stepgen.03.steplen 2000
setp hm2_5i20.0.stepgen.03.stepspace 2000
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd hm2_5i20.0.stepgen.02.position-cmd
#net Apos-cmd joint.3.motor-pos-cmd hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb joint.2.motor-pos-fb
#net Apos-fb hm2_5i20.0.stepgen.03.position-fb joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out hm2_5i20.0.stepgen.02.enable
#net Aen joint.3.amp-enable-out hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
setp joint.0.jog-vel-mode TRUE
setp joint.1.jog-vel-mode TRUE
setp joint.2.jog-vel-mode TRUE
#setp joint.3.jog-vel-mode TRUE
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in iocontrol.0.emc-enable-in
# Run Switch
loadrt debounce cfg=1
setp debounce.0.delay 1000
net key-on hm2_5i20.0.gpio.039.in_not debounce.0.0.in
net machine-on debounce.0.0.out hm2_5i20.0.sserial.port-0.run hm2_5i20.0.8i20.0.0.amp_enable halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.024.in_not joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.026.in_not joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in_not joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in_not joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.032.in_not joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.034.in_not joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax joint.0.home-sw-in
net Ymax joint.1.home-sw-in
net Zmax joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Stop on any spindle fault
loadrt or2
#net VFDOK hm2_5i20.0.gpio.031.in_not and2.1.in0
net VFDOK hm2_5i20.0.gpio.031.in_not or2.0.in0
#net AUTO halui.mode.is-auto and2.1.in1
net stall or2.0.in1
#net ABORT and2.1.out halui.abort
net ABORT or2.0.out halui.abort
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV0 hm2_5i20.0.gpio.025.in_not
net DRV1 hm2_5i20.0.gpio.027.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.038.in_not
# Output Bits
# Link Spindle Direction Signals to make AXIS Display Buttons
net FWD spindle.0.reverse
net REV spindle.0.forward
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# limit the spindle speed command
addf limit2.0 servo-thread
# do spindle pid calcs
addf pid.0.do-pid-calcs servo-thread
# filter encoder velocity
addf lowpass.0 servo-thread
# compare filtered encoder velocity to commanded
addf near.0 servo-thread
# detect a stalled spindle
addf abs.0 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf and2.0 servo-thread
# delay running the 8i20 smart serial channel
addf debounce.0 servo-thread
# detect a spindle fault
#addf and2.1 servo-thread
addf or2.0 servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# run bldc function
addf bldc.0 servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,302 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 1240 Mill
[EMC]
MACHINE = Smithy 1240 Combined Box Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
# @SCALE = 25600
#MAX_LINEAR_VELOCITY = 1.9
# @SCALE = 10000
MAX_LINEAR_VELOCITY = 4.2
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 85.0
PYVCP = 8i20.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 250000
SERVO_PERIOD = 250000
TRAJ_PERIOD = 250000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 1240combined.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
#HALFILE = axis_manualtoolchange.hal
POSTGUI_HALFILE = 8i20postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_LINEAR_VELOCITY = 4.2
MAX_LINEAR_ACCELERATION = 10.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = 130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = 50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = -130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = -130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 85.0
MAX_ACCELERATION = 450.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 85.0
MAX_ACCELERATION = 450.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 9600 deg/min
SCALE = 2500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 2.0
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 6000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,277 @@
# 5i20 config file for a 4 Axis Smithy 1240 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/sssvst2_2_4_v31.bit num_encoders=1 num_pwmgens=0 num_stepgens=4 sserial_port_0=0xxxxxxx enable_raw"
#loadrt hm2_pci config="firmware=hm2/5i20/sssvst2_2_2_v35.bit num_encoders=1 num_pwmgens=0 num_stepgens=4 enable_raw"
# 13312 = 0x3400 = Encoder Sample Rate Register
setp hm2_5i20.0.raw.write_address 13312
# sample rate is clock (33 MHz)/SRR+2 = 33MHz/10 = 3.3MHz
setp hm2_5i20.0.raw.write_data 8
# write data
setp hm2_5i20.0.raw.write_strobe 1
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
setp charge-pump.enable TRUE
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 1.0
setp pid.0.deadband 0.01
# load and configure the spindle speed limiting, filtering, and comparison blocks
# Need this line so AXIS shows +/- buttons
net srpm spindle.0.speed-out
# Limit bounds and slew rate/second
loadrt limit2
setp limit2.0.min -100
setp limit2.0.max 100
setp limit2.0.maxv 50
# Stalled spindle detector
loadrt abs
loadrt comp count=2
setp comp.0.in0 1.0
setp comp.1.in0 0.0
loadrt and2 count=2
# Filter srps
loadrt lowpass
setp lowpass.0.gain 0.07
# Spindle at-speed detection
loadrt near
setp near.0.scale 1.1
setp near.0.difference 0.1
net srps spindle.0.speed-out-rps limit2.0.in near.0.in1
net scmd limit2.0.out pid.0.command
net fb hm2_5i20.0.encoder.00.velocity pid.0.feedback spindle.0.speed-in lowpass.0.in comp.1.in1
net sflt lowpass.0.out near.0.in2
net at-speed near.0.out spindle.0.at-speed
net scur-abs abs.0.out comp.0.in1
net scmd-ok comp.0.equal and2.0.in0
net sfb-ok comp.1.equal and2.0.in1
net stall and2.0.out
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
### q = encoder, h=hall sensors, i=index
loadrt bldc cfg=qh
setp bldc.0.rev 1
setp hm2_5i20.0.encoder.00.scale 2880
net Spos hm2_5i20.0.encoder.00.position spindle.0.revs
net Sidx hm2_5i20.0.encoder.00.index-enable spindle.0.index-enable
net pid-out pid.0.output bldc.0.value
net rawcount hm2_5i20.0.encoder.00.rawcounts
net rotor_angle hm2_5i20.0.8i20.0.0.angle bldc.0.rotor-angle
setp hm2_5i20.0.8i20.0.0.max_current 30.0
net current bldc.0.out hm2_5i20.0.8i20.0.0.current abs.0.in
### IF cfg==*q* uncomment these lines
setp bldc.0.initvalue 0.8
setp bldc.0.lead-angle 0
### 2.2kW Motor
setp bldc.0.poles 4
### 1kW Motor
#setp bldc.0.poles 8
setp bldc.0.scale -2880
net rawcount bldc.0.rawcounts
### IF cfg==*h* uncomment these lines
net spindle-on spindle.0.on pid.0.enable
net sa bldc.0.hall1 hm2_5i20.0.gpio.005.in
net sb bldc.0.hall2 hm2_5i20.0.gpio.007.in
net sc bldc.0.hall3 hm2_5i20.0.gpio.009.in
### 2.2kW Motor
setp bldc.0.pattern 17 # 17 or 44
### 1kW Motor
#setp bldc.0.pattern 34 # 15 or 34
### ELSE uncomment these lines
#net amp-enable bldc.0.init
#net init-done bldc.0.init-done
### IF cfg==*i* uncomment this line
#net Sidx bldc.0.index-enable
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 2000
setp hm2_5i20.0.stepgen.00.steplen 2000
setp hm2_5i20.0.stepgen.00.stepspace 2000
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 2000
setp hm2_5i20.0.stepgen.01.steplen 2000
setp hm2_5i20.0.stepgen.01.stepspace 2000
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 2000
setp hm2_5i20.0.stepgen.02.steplen 2000
setp hm2_5i20.0.stepgen.02.stepspace 2000
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 2000
setp hm2_5i20.0.stepgen.03.steplen 2000
setp hm2_5i20.0.stepgen.03.stepspace 2000
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd hm2_5i20.0.stepgen.02.position-cmd
net Apos-cmd joint.3.motor-pos-cmd hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb joint.2.motor-pos-fb
net Apos-fb hm2_5i20.0.stepgen.03.position-fb joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out hm2_5i20.0.stepgen.02.enable
net Aen joint.3.amp-enable-out hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
setp joint.0.jog-vel-mode TRUE
setp joint.1.jog-vel-mode TRUE
setp joint.2.jog-vel-mode TRUE
setp joint.3.jog-vel-mode TRUE
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in iocontrol.0.emc-enable-in
# Run Switch
loadrt debounce cfg=1
setp debounce.0.delay 1000
net key-on hm2_5i20.0.gpio.039.in_not debounce.0.0.in
net machine-on debounce.0.0.out hm2_5i20.0.sserial.port-0.run hm2_5i20.0.8i20.0.0.amp_enable halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.024.in_not joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.026.in_not joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in_not joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in_not joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.032.in_not joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.034.in_not joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax joint.0.home-sw-in
net Ymax joint.1.home-sw-in
net Zmax joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Stop on any spindle fault
loadrt or2
#net VFDOK hm2_5i20.0.gpio.031.in_not and2.1.in0
net VFDOK hm2_5i20.0.gpio.031.in_not or2.0.in0
#net AUTO halui.mode.is-auto and2.1.in1
net stall or2.0.in1
#net ABORT and2.1.out halui.abort
net ABORT or2.0.out halui.abort
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV0 hm2_5i20.0.gpio.025.in_not
net DRV1 hm2_5i20.0.gpio.027.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.038.in_not
# Output Bits
# Link Spindle Direction Signals to make AXIS Display Buttons
net FWD spindle.0.reverse
net REV spindle.0.forward
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# limit the spindle speed command
addf limit2.0 servo-thread
# do spindle pid calcs
addf pid.0.do-pid-calcs servo-thread
# filter encoder velocity
addf lowpass.0 servo-thread
# compare filtered encoder velocity to commanded
addf near.0 servo-thread
# detect a stalled spindle
addf abs.0 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf and2.0 servo-thread
# delay running the 8i20 smart serial channel
addf debounce.0 servo-thread
# detect a spindle fault
#addf and2.1 servo-thread
addf or2.0 servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# run bldc function
addf bldc.0 servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,302 @@
# EMC controller parameters for Mesa 5i20 controlled 4 Axis Smithy 1240 Mill
[EMC]
MACHINE = 4 Axis Smithy 1240 Combined Box Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
# @SCALE = 25600
#MAX_LINEAR_VELOCITY = 1.9
# @SCALE = 10000
MAX_LINEAR_VELOCITY = 4.2
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 85.0
PYVCP = 8i20.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 250000
SERVO_PERIOD = 250000
TRAJ_PERIOD = 250000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 1240combined_4axis.hal
#HALFILE = naiky_4axis.hal
EZTROL_HALFILE = 5i20eztrol.hal
#HALFILE = axis_manualtoolchange.hal
POSTGUI_HALFILE = 8i20postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_LINEAR_VELOCITY = 4.2
MAX_LINEAR_ACCELERATION = 10.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = 130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = 50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = -130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 4.2
MAX_ACCELERATION = 10.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 25600
# Vel at 250k Steps/S = 115"/min
#SCALE = -130048
# Steps/Rev = 10000
# Vel at 250k Steps/S = 295"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.8
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 85.0
MAX_ACCELERATION = 450.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 85.0
MAX_ACCELERATION = 450.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 9600 deg/min
SCALE = 2500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 2.0
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 4000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,282 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 1240 Mill
[EMC]
MACHINE = Smithy 1240 Combined Box Mill (metric operation)
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = 1mm .5mm .1mm .05mm .01mm .005mm .001mm .0005mm
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 5.08
MAX_LINEAR_VELOCITY = 124.46
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 150.0
PYVCP = 8i20.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
RS274NGC_STARTUP_CODE = G21
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 250000
SERVO_PERIOD = 250000
TRAJ_PERIOD = 250000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 1240combined.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
#HALFILE = axis_manualtoolchange.hal
POSTGUI_HALFILE = 8i20postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 124.46
MAX_LINEAR_ACCELERATION = 254.0
DEFAULT_LINEAR_VELOCITY = 5.08
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 0
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -553.72
MAX_LIMIT = 5.08
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 10000
# Vel at 250k Steps/S = 7493mm/min
SCALE = 2000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -553.72
MAX_LIMIT = 5.08
FERROR = 6.35
MIN_FERROR = 2.54
HOME_OFFSET = 6.35
HOME_SEARCH_VEL = 12.7
HOME_LATCH_VEL = 1.27
HOME_FINAL_VEL = 12.7
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -299.72
MAX_LIMIT = 5.08
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 10000
# Vel at 250k Steps/S = 7493mm/min
SCALE = -2000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -299.72
MAX_LIMIT = 5.08
FERROR = 6.35
MIN_FERROR = 2.54
HOME_OFFSET = 6.35
HOME_SEARCH_VEL = 12.7
HOME_LATCH_VEL = 1.27
HOME_FINAL_VEL = 12.7
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -299.72
MAX_LIMIT = 5.08
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
# @SCALE = 25600
#MAX_VELOCITY = 1.9
# @SCALE = 10000
MAX_VELOCITY = 124.46
MAX_ACCELERATION = 254.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 10000
# Vel at 250k Steps/S = 7493mm/min
SCALE = -2000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -299.72
MAX_LIMIT = 5.08
FERROR = 6.35
MIN_FERROR = 2.54
HOME_OFFSET = 6.35
HOME_SEARCH_VEL = 12.7
HOME_LATCH_VEL = 1.27
HOME_FINAL_VEL = 12.7
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 150.0
MAX_ACCELERATION = 450.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 9600 deg/min
SCALE = 2500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 2.0
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
#HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 4000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,125 @@
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
loadrt hal_parport cfg=0x378
setp parport.0.reset-time 4000
loadrt stepgen step_type=0,0,0,0
loadrt charge_pump
loadrt match8 count=1
loadrt pwmgen output_type=1
setp pwmgen.0.pwm-freq 5.0
setp pwmgen.0.scale 4000
setp pwmgen.0.offset 0.0
setp pwmgen.0.min-dc 0.01
setp pwmgen.0.max-dc 0.99
setp pwmgen.0.dither-pwm true
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread
addf match8.0 servo-thread
net spindle-cmd spindle.0.speed-out pwmgen.0.value
net spindle-enable spindle.0.on pwmgen.0.enable
net coolant-flood parport.0.pin-01-out iocontrol.0.coolant-flood
net xdir parport.0.pin-02-out stepgen.0.dir
net xstep parport.0.pin-03-out stepgen.0.step
setp parport.0.pin-03-out-reset 1
net ydir parport.0.pin-04-out stepgen.1.dir
net ystep parport.0.pin-05-out stepgen.1.step
setp parport.0.pin-05-out-reset 1
net zdir parport.0.pin-06-out stepgen.2.dir
net zstep parport.0.pin-07-out stepgen.2.step
setp parport.0.pin-07-out-reset 1
net adir parport.0.pin-08-out stepgen.3.dir
net astep parport.0.pin-09-out stepgen.3.step
setp parport.0.pin-09-out-reset 1
#PMDX-110
# Need this line so AXIS shows the reverse button
net spindle-rev spindle.0.reverse
net spindle-fwd parport.0.pin-14-out spindle.0.forward
#--OR--
#PMDX-131
# Need this line so AXIS shows the forward button
#net spindle-fwd spindle.0.forward
#net spindle-rev parport.0.pin-14-out spindle.0.reverse
net spindle-pwm parport.0.pin-16-out pwmgen.0.pwm
net charge-pump parport.0.pin-17-out charge-pump.out
net estop-in parport.0.pin-10-in-not iocontrol.0.emc-enable-in
net estop-out charge-pump.enable halui.machine.is-on
#PMDX-110
#net run parport.0.pin-11-in-not halui.program.pause motion.feed-hold
#--OR--
#PMDX-131
net run parport.0.pin-11-in halui.program.pause motion.feed-hold
net all-home parport.0.pin-12-in-not
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 16000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb joint.0.motor-pos-fb
net xenable joint.0.amp-enable-out stepgen.0.enable
net all-home joint.0.home-sw-in
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 16000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb joint.1.motor-pos-fb
net yenable joint.1.amp-enable-out stepgen.1.enable
net all-home joint.1.home-sw-in
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 16000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb joint.2.motor-pos-fb
net zenable joint.2.amp-enable-out stepgen.2.enable
net all-home joint.2.home-sw-in
setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 16000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net apos-cmd joint.3.motor-pos-cmd stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb joint.3.motor-pos-fb
net aenable joint.3.amp-enable-out stepgen.3.enable
newsig false bit
sets false FALSE
net xhoming joint.0.homing match8.0.a0
net yhoming joint.1.homing match8.0.a1
net zhoming joint.2.homing match8.0.a2
net false match8.0.b0 match8.0.b1 match8.0.b2
net all-home match8.0.in
net limit match8.0.out joint.0.neg-lim-sw-in
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared

View File

@@ -0,0 +1,272 @@
# EMC controller parameters for Parallel Port controlled Smithy 1240 Gecko Mill
[EMC]
MACHINE = Smithy 1240 Gecko Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 2.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
PYVCP = gecko.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 1240gecko.hal
EZTROL_HALFILE = eztrol.hal
POSTGUI_HALFILE = gecko_postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 2.0
MAX_LINEAR_ACCELERATION = 1.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 2.2
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = 10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -21.8
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -10.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 2.2
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = -10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.8
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.3
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 1.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.4
STEPGEN_MAXACCEL = 1.7
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 1181"/min
SCALE = -10160
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.3
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
STEPGEN_MAXVEL = 33.0
STEPGEN_MAXACCEL = 330.0
BACKLASH = 0.0000
SCALE = -500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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 = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,77 @@
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
loadrt stepgen step_type=0,0,0
loadrt match8 count=1
# Used to filter out spurious limit switch signals
# THIS IS VERY BAD & SHOULD BE FIXED IN HARDWARE!!!
loadrt debounce cfg=1
setp debounce.0.delay 2
loadrt hal_parport cfg="0x378"
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf debounce.0 base-thread
addf parport.0.write base-thread
addf stepgen.capture-position servo-thread
addf match8.0 servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net Xpos-cmd joint.0.motor-pos-cmd stepgen.0.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd stepgen.1.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd stepgen.2.position-cmd
net Xpos-fb stepgen.0.position-fb joint.0.motor-pos-fb
net Ypos-fb stepgen.1.position-fb joint.1.motor-pos-fb
net Zpos-fb stepgen.2.position-fb joint.2.motor-pos-fb
net Xen <= joint.0.amp-enable-out stepgen.0.enable
net Yen <= joint.1.amp-enable-out stepgen.1.enable
net Zen <= joint.2.amp-enable-out stepgen.2.enable
net Xstep stepgen.0.step parport.0.pin-03-out
net Xdir stepgen.0.dir parport.0.pin-02-out
net Ystep stepgen.1.step parport.0.pin-05-out
net Ydir stepgen.1.dir parport.0.pin-04-out
net Zstep stepgen.2.step parport.0.pin-07-out
net Zdir stepgen.2.dir parport.0.pin-06-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.0.maxvel [JOINT_0]STEPGEN_MAXVEL
setp stepgen.1.maxvel [JOINT_1]STEPGEN_MAXVEL
setp stepgen.2.maxvel [JOINT_2]STEPGEN_MAXVEL
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
# three axis motion allows 6 other outputs on pins 8,9,1,14,16,17
# five additional input pins are available 10,11,12,13,15
setp parport.0.pin-01-out-invert true
net estop iocontrol.0.user-enable-out parport.0.pin-01-out iocontrol.0.emc-enable-in
setp parport.0.pin-14-out-invert true
net flood iocontrol.0.coolant-flood parport.0.pin-14-out
setp parport.0.pin-17-out-invert true
net forward spindle.0.forward parport.0.pin-16-out
net reverse spindle.0.reverse parport.0.pin-17-out
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
newsig false bit
sets false FALSE
net xhoming joint.0.homing match8.0.a0
net yhoming joint.1.homing match8.0.a1
net zhoming joint.2.homing match8.0.a2
net false match8.0.b0 match8.0.b1 match8.0.b2
net home-raw parport.0.pin-15-in-not debounce.0.0.in
net home-filtered debounce.0.0.out joint.0.home-sw-in joint.1.home-sw-in joint.2.home-sw-in match8.0.in
net limit match8.0.out joint.0.neg-lim-sw-in

View File

@@ -0,0 +1,270 @@
# EMC controller parameters for Parallel Port controlled Smithy 1240 Rutex Mill
[EMC]
MACHINE = Smithy 1240 Rutex Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 1240rutex.hal
EZTROL_HALFILE = eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 3.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -22.0
MAX_LIMIT = 0.25
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
STEPGEN_MAXVEL = 3.4
STEPGEN_MAXACCEL = 4.0
BACKLASH = 0.0000
SCALE = 2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -22.0
MAX_LIMIT = 0.25
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
STEPGEN_MAXVEL = 3.4
STEPGEN_MAXACCEL = 4.0
BACKLASH = 0.0000
SCALE = -2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 1.4
STEPGEN_MAXACCEL = 21.0
BACKLASH = 0.0000
SCALE = -2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXVEL = 11.0
STEPGEN_MAXACCEL = 31.0
BACKLASH = 0.0000
# Drive Ratio = 40:360 = 1:9
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 13500 deg/min
#SCALE = -222.22222222
# Drive Ratio = 72:360 = 1:5
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 7500 deg/min
#SCALE = -400.0
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 6000 deg/min
SCALE = -500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 50.0
MIN_FERROR = 10.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,86 @@
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
loadrt stepgen step_type=0,0,0,0
loadrt match8 count=1
# Used to filter out spurious limit switch signals
# THIS IS VERY BAD & SHOULD BE FIXED IN HARDWARE!!!
loadrt debounce cfg=1
setp debounce.0.delay 2
loadrt hal_parport cfg="0x378"
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf debounce.0 base-thread
addf parport.0.write base-thread
addf stepgen.capture-position servo-thread
addf match8.0 servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net Xpos-cmd joint.0.motor-pos-cmd stepgen.0.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd stepgen.1.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd stepgen.2.position-cmd
net Apos-cmd joint.3.motor-pos-cmd stepgen.3.position-cmd
net Xpos-fb stepgen.0.position-fb joint.0.motor-pos-fb
net Ypos-fb stepgen.1.position-fb joint.1.motor-pos-fb
net Zpos-fb stepgen.2.position-fb joint.2.motor-pos-fb
net Apos-fb stepgen.3.position-fb joint.3.motor-pos-fb
net Xen <= joint.0.amp-enable-out stepgen.0.enable
net Yen <= joint.1.amp-enable-out stepgen.1.enable
net Zen <= joint.2.amp-enable-out stepgen.2.enable
net Aen <= joint.3.amp-enable-out stepgen.3.enable
net Xstep stepgen.0.step parport.0.pin-03-out
net Xdir stepgen.0.dir parport.0.pin-02-out
net Ystep stepgen.1.step parport.0.pin-05-out
net Ydir stepgen.1.dir parport.0.pin-04-out
net Zstep stepgen.2.step parport.0.pin-07-out
net Zdir stepgen.2.dir parport.0.pin-06-out
net Astep stepgen.3.step parport.0.pin-09-out
net Adir stepgen.3.dir parport.0.pin-08-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.0.maxvel [JOINT_0]STEPGEN_MAXVEL
setp stepgen.1.maxvel [JOINT_1]STEPGEN_MAXVEL
setp stepgen.2.maxvel [JOINT_2]STEPGEN_MAXVEL
setp stepgen.3.maxvel [JOINT_3]STEPGEN_MAXVEL
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
# four axis motion allows 4 other outputs on pins 1,14,16,17
# five additional input pins are available 10,11,12,13,15
setp parport.0.pin-01-out-invert true
net estop iocontrol.0.user-enable-out parport.0.pin-01-out iocontrol.0.emc-enable-in
setp parport.0.pin-14-out-invert true
net flood iocontrol.0.coolant-flood parport.0.pin-14-out
setp parport.0.pin-17-out-invert true
net forward spindle.0.forward parport.0.pin-16-out
net reverse spindle.0.reverse parport.0.pin-17-out
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
newsig false bit
sets false FALSE
net xhoming joint.0.homing match8.0.a0
net yhoming joint.1.homing match8.0.a1
net zhoming joint.2.homing match8.0.a2
net ahoming joint.3.homing match8.0.a3
net false match8.0.b0 match8.0.b1 match8.0.b2 match8.0.b3
net home-raw parport.0.pin-15-in-not debounce.0.0.in
net home-filtered debounce.0.0.out joint.0.home-sw-in joint.1.home-sw-in joint.2.home-sw-in joint.3.home-sw-in match8.0.in
net limit match8.0.out joint.0.neg-lim-sw-in

View File

@@ -0,0 +1,270 @@
# EMC controller parameters for Parallel Port controlled Smithy 1240 Rutex Mill
[EMC]
MACHINE = 4 Axis Smithy 1240 Rutex Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 1240rutex_4axis.hal
EZTROL_HALFILE = eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 3.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -22.0
MAX_LIMIT = 0.25
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
STEPGEN_MAXVEL = 3.4
STEPGEN_MAXACCEL = 4.0
BACKLASH = 0.0000
SCALE = 2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -22.0
MAX_LIMIT = 0.25
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 3.0
STEPGEN_MAXVEL = 3.4
STEPGEN_MAXACCEL = 4.0
BACKLASH = 0.0000
SCALE = -2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 1.4
STEPGEN_MAXACCEL = 21.0
BACKLASH = 0.0000
SCALE = -2033.2
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.1
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXVEL = 11.0
STEPGEN_MAXACCEL = 31.0
BACKLASH = 0.0000
# Drive Ratio = 40:360 = 1:9
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 13500 deg/min
#SCALE = -222.22222222
# Drive Ratio = 72:360 = 1:5
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 7500 deg/min
#SCALE = -400.0
# Drive Ratio = 90:360 = 1:4
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 50k Steps/S = 6000 deg/min
SCALE = -500.0
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 50.0
MIN_FERROR = 10.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,181 @@
# 5i20 config file for Smithy 1315 Lathe
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=2 num_pwmgens=1 num_stepgens=2 enable_raw"
# 13312 = 0x3400 = Encoder Sample Rate Register
setp hm2_5i20.0.raw.write_address 13312
# sample rate is clock (33 MHz)/SRR+2 = 33MHz/10 = 3.3MHz
setp hm2_5i20.0.raw.write_data 8
# write data
setp hm2_5i20.0.raw.write_strobe 1
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# classicladder for machine logic
# (load the realtime portion)
loadrt classicladder_rt
# invoke the user part of CL to silently load the program
loadusr -w classicladder --nogui 924.clp
# load charge pump
loadrt charge_pump
setp charge-pump.enable TRUE
#configure the spindle encoder
#encoder scale was 4800 on Pete's machine
setp hm2_5i20.0.encoder.00.scale -4096
net Spos hm2_5i20.0.encoder.00.position spindle.0.revs
net Svel hm2_5i20.0.encoder.00.velocity spindle.0.speed-in
net Sidx hm2_5i20.0.encoder.00.index-enable spindle.0.index-enable
#configure the spindle speed PWM generator
net Scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 3000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 2000
setp hm2_5i20.0.stepgen.00.steplen 2000
setp hm2_5i20.0.stepgen.00.stepspace 2000
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 2000
setp hm2_5i20.0.stepgen.01.steplen 2000
setp hm2_5i20.0.stepgen.01.stepspace 2000
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_2]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd hm2_5i20.0.stepgen.00.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd hm2_5i20.0.stepgen.01.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb joint.0.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.01.position-fb joint.2.motor-pos-fb
# connect enable signals for amplifiers and step generators
setp hm2_5i20.0.gpio.018.is_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
setp hm2_5i20.0.gpio.019.is_output TRUE
setp hm2_5i20.0.gpio.019.invert_output TRUE
net Xen joint.0.amp-enable-out hm2_5i20.0.gpio.018.out hm2_5i20.0.stepgen.00.enable
net Zen joint.2.amp-enable-out hm2_5i20.0.gpio.019.out hm2_5i20.0.stepgen.01.enable
# enable velocity mode jogging
setp joint.0.jog-vel-mode TRUE
setp joint.2.jog-vel-mode TRUE
# enable the PWM generator
setp hm2_5i20.0.pwmgen.00.enable TRUE
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in iocontrol.0.emc-enable-in
# Run Switch
loadrt debounce cfg=1
setp debounce.0.delay 1000
net key-on hm2_5i20.0.gpio.039.in_not debounce.0.0.in
net machine-on debounce.0.0.out halui.machine.on
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
#connect limit/home switches
#Brown Wire - Was Zhome, now Xpos
net Xpos_lim hm2_5i20.0.gpio.024.in joint.0.pos-lim-sw-in joint.0.home-sw-in
#Brown/White Wire - Was Xhome, now Xneg
net Xneg_lim hm2_5i20.0.gpio.026.in joint.0.neg-lim-sw-in
#Green Wire - Was XZpos, now Zpos
net Zpos_lim hm2_5i20.0.gpio.028.in joint.2.pos-lim-sw-in joint.2.home-sw-in
#Green/White Wire - Was XZneg, now Zneg
net Zneg_lim hm2_5i20.0.gpio.030.in joint.2.neg-lim-sw-in
#Tool Post Control Inputs
net PrepNo iocontrol.0.tool-prep-number classicladder.0.s32in-00
net TC iocontrol.0.tool-change classicladder.0.in-00
net T1 hm2_5i20.0.gpio.032.in classicladder.0.in-01
net T2 hm2_5i20.0.gpio.034.in classicladder.0.in-02
net T3 hm2_5i20.0.gpio.036.in classicladder.0.in-03
net T4 hm2_5i20.0.gpio.038.in classicladder.0.in-04
net TP iocontrol.0.tool-prepare classicladder.0.in-05
#Door Sensor
net SS hm2_5i20.0.gpio.029.in
#Output Bits
#AIN
#setp hm2_5i20.0.gpio.041.is_output TRUE
#setp hm2_5i20.0.gpio.041.invert_output TRUE
#KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.forward hm2_5i20.0.gpio.040.out
#KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.reverse hm2_5i20.0.gpio.042.out
#Tool Post Control Outputs
net TD classicladder.0.out-00 iocontrol.0.tool-changed
net TQ classicladder.0.out-03 iocontrol.0.tool-prepared
#KA3
setp hm2_5i20.0.gpio.044.is_output TRUE
setp hm2_5i20.0.gpio.044.invert_output TRUE
net KA3 hm2_5i20.0.gpio.044.out classicladder.0.out-01
#KA4
setp hm2_5i20.0.gpio.046.is_output TRUE
setp hm2_5i20.0.gpio.046.invert_output TRUE
net KA4 hm2_5i20.0.gpio.046.out classicladder.0.out-02
#Spindle Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
setp hm2_5i20.0.gpio.041.out TRUE
#Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# debounce the keyswitch
addf debounce.0 servo-thread
# refresh classicladder
addf classicladder.0.refresh servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,158 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 6130 Lathe
[EMC]
MACHINE = Smithy 1315 Lathe
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
DISPLAY = axis
#DISPLAY = tklinuxcnc
# Path to help file for tklinuxcnc
HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
LATHE = 1
TKPKG = Ngcgui 1.0
NGCGUI_FONT = Helvetica -12 normal
NGCGUI_PREAMBLE = lathe_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = id.ngc
NGCGUI_SUBFILE = od.ngc
NGCGUI_SUBFILE = taper-od.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 1.5
DEFAULT_ANGULAR_VELOCITY = 0.1
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
PYVCP = 1315.xml
[FILTER]
#No Content
[RS274NGC]
PARAMETER_FILE = emc.var
RS274NGC_STARTUP_CODE = G18 G54
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/lathe:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 250000
SERVO_PERIOD = 250000
TRAJ_PERIOD = 250000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 1315.hal
#HALFILE = naiky.hal
POSTGUI_HALFILE = 1315postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Z
HOME = 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 1.5
MAX_LINEAR_ACCELERATION = 5.0
[EMCIO]
TOOL_TABLE = lathe.tbl
TOOL_CHANGE_POSITION = 0 0 0
TOOL_CHANGE_WITH_SPINDLE_ON = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -5.75
MAX_LIMIT = 0.15
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 5.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 5.0
STEPGEN_MAXACCEL = 0
STEPGEN_MAXVEL = 0
BACKLASH = 0.0005
# Leadscrew Pitch = 5mm
# Drive Ratio = 21:35
# Steps/Rev = 10000
# Vel at 200k Steps/S = 2.4 in/min
SCALE = 84666.666666667
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.75
MAX_LIMIT = 0.15
FERROR = 0.250
MIN_FERROR = 0.1
HOME_OFFSET = 0.20
HOME_SEARCH_VEL = 1.0
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_Z]
MIN_LIMIT = -7.8
MAX_LIMIT = 0.15
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 5.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 5.0
STEPGEN_MAXACCEL = 0
STEPGEN_MAXVEL = 0
BACKLASH = 0.0010
# Leadscrew Pitch = 5mm
# Drive Ratio = 21:35
# Steps/Rev = 10000
# Vel at 200k Steps/S = 2.4 in/min
SCALE = 84666.666666667
OUTPUT_SCALE = 1.000
#MIN_LIMIT = -10.1
MIN_LIMIT = -7.8
MAX_LIMIT = 0.15
FERROR = 0.250
MIN_FERROR = 0.1
HOME_OFFSET = 0.20
HOME_SEARCH_VEL = 1.0
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1

View File

@@ -0,0 +1,21 @@
<pyvcp>
<label>
<text>"Commanded:"</text>
</label>
<number>
<halpin>"commanded-spindle-speed"</halpin>
<font>("Helvetica",12)</font>
<format>"6d"</format>
<width>6</width>
</number>
<label>
<text>"Actual:"</text>
</label>
<number>
<halpin>"actual-spindle-speed"</halpin>
<font>("Helvetica",12)</font>
<format>"6d"</format>
<width>6</width>
</number>
</pyvcp>

View File

@@ -0,0 +1,8 @@
loadrt scale count=1
net Svel scale.0.in
setp scale.0.gain 60
net Scmd pyvcp.commanded-spindle-speed
net Sact pyvcp.actual-spindle-speed scale.0.out
addf scale.0 servo-thread

View File

@@ -0,0 +1,121 @@
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
loadrt hal_parport cfg=0x378
setp parport.0.reset-time 4000
loadrt stepgen step_type=0,0,0,0
loadrt charge_pump
loadrt match8 count=1
loadrt pwmgen output_type=1
setp pwmgen.0.pwm-freq 5.0
#5000 RPM spindles (early production)
setp pwmgen.0.scale 5000
#7000 RPM spindles (late production)
#setp pwmgen.0.scale 7000
setp pwmgen.0.offset 0.0
setp pwmgen.0.min-dc 0.01
setp pwmgen.0.max-dc 0.99
setp pwmgen.0.dither-pwm true
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread
addf match8.0 servo-thread
net spindle-cmd motion.spindle-speed-out pwmgen.0.value
net spindle-enable motion.spindle-on pwmgen.0.enable
net coolant-flood parport.0.pin-01-out iocontrol.0.coolant-flood
net xdir parport.0.pin-02-out stepgen.0.dir
net xstep parport.0.pin-03-out stepgen.0.step
setp parport.0.pin-03-out-reset 1
net ydir parport.0.pin-04-out stepgen.1.dir
net ystep parport.0.pin-05-out stepgen.1.step
setp parport.0.pin-05-out-reset 1
net zdir parport.0.pin-06-out stepgen.2.dir
net zstep parport.0.pin-07-out stepgen.2.step
setp parport.0.pin-07-out-reset 1
net adir parport.0.pin-08-out stepgen.3.dir
net astep parport.0.pin-09-out stepgen.3.step
setp parport.0.pin-09-out-reset 1
#PMDX-110
net spindle-dir parport.0.pin-14-out motion.spindle-reverse
#PMDX-131
#net spindle-dir parport.0.pin-14-out motion.spindle-forward
net spindle-pwm parport.0.pin-16-out pwmgen.0.pwm
net charge-pump parport.0.pin-17-out charge-pump.out
net estop-in parport.0.pin-10-in-not iocontrol.0.emc-enable-in
net estop-out charge-pump.enable halui.machine.is-on
#PMDX-110
net run parport.0.pin-11-in-not halui.program.pause motion.feed-hold
#PMDX-131
#net run parport.0.pin-11-in halui.program.pause motion.feed-hold
#normally closed switches (late production)
net all-home parport.0.pin-12-in
#normally open switches (early production)
#net all-home parport.0.pin-12-in-not
setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 16000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out stepgen.0.enable
net all-home axis.0.home-sw-in
setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 16000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb axis.1.motor-pos-fb
net yenable axis.1.amp-enable-out stepgen.1.enable
net all-home axis.1.home-sw-in
setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 16000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb axis.2.motor-pos-fb
net zenable axis.2.amp-enable-out stepgen.2.enable
net all-home axis.2.home-sw-in
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 16000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb axis.3.motor-pos-fb
net aenable axis.3.amp-enable-out stepgen.3.enable
newsig false bit
sets false FALSE
net xhoming axis.0.homing match8.0.a0
net yhoming axis.1.homing match8.0.a1
net zhoming axis.2.homing match8.0.a2
net false match8.0.b0 match8.0.b1 match8.0.b2
net all-home match8.0.in
net limit match8.0.out axis.0.neg-lim-sw-in
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared

View File

@@ -0,0 +1,274 @@
# EMC controller parameters for Parallel Port controlled Smithy 622 Gecko Mill
[EMC]
MACHINE = Smithy 622 Gecko Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 1.5
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 622gecko.hal
EZTROL_HALFILE = eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 1.5
MAX_LINEAR_ACCELERATION = 1.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.6
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = -12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.0
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -4.1
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.6
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = 12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -4.1
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -6.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 0.8
MAX_ACCELERATION = 1.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 0.8
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.3
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = 12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -6.8
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
STEPGEN_MAXVEL = 32.0
STEPGEN_MAXACCEL = 310.0
BACKLASH = 0.0000
SCALE = -400
OUTPUT_SCALE = 1.000
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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 = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
#4000 RPM spindles (early production)
#MAX_SPINDLE_RPM = 4000
#5000 RPM spindles (late production)
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,24 @@
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
net tool-change eztrol.tool-change iocontrol.0.tool-change
net tool-changed eztrol.tool-changed iocontrol.0.tool-changed
net tool-prep-number eztrol.tool-prep-number iocontrol.0.tool-prep-number
net Xmax eztrol.x-positive-limit
net Xmin eztrol.x-negative-limit
net Ymax eztrol.y-positive-limit
net Ymin eztrol.y-negative-limit
net Zmax eztrol.z-positive-limit
net Zmin eztrol.z-negative-limit
loadrt mux2
unlinkp motion.spindle-speed-out
unlinkp hm2_5i20.0.pwmgen.00.value
net spd-mux mux2.0.out hm2_5i20.0.pwmgen.00.value eztrol.spindle-rpm-reading
net spd-motion motion.spindle-speed-out mux2.0.in0
net spd-eztrol eztrol.spindle-rpm-control mux2.0.in1
net speed-select halui.mode.is-manual mux2.0.sel
addf mux2.0 servo-thread
#eztrol.estop
#eztrol.in-manual-mode
#eztrol.limit-override
#eztrol.spindle-max-rpm

View File

@@ -0,0 +1,179 @@
# 5i20 config file for Smithy 622 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 5000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 2500
setp hm2_5i20.0.stepgen.00.dirhold 2500
setp hm2_5i20.0.stepgen.00.steplen 2500
setp hm2_5i20.0.stepgen.00.stepspace 2500
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 2500
setp hm2_5i20.0.stepgen.01.dirhold 2500
setp hm2_5i20.0.stepgen.01.steplen 2500
setp hm2_5i20.0.stepgen.01.stepspace 2500
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 2500
setp hm2_5i20.0.stepgen.02.dirhold 2500
setp hm2_5i20.0.stepgen.02.steplen 2500
setp hm2_5i20.0.stepgen.02.stepspace 2500
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 2500
setp hm2_5i20.0.stepgen.03.dirhold 2500
setp hm2_5i20.0.stepgen.03.steplen 2500
setp hm2_5i20.0.stepgen.03.stepspace 2500
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
#net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
#net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
#net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
#net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.032.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.034.in => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.024.in => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.026.in => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV1 hm2_5i20.0.gpio.025.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.027.in_not
net DRV4 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,279 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 622 Mill
[EMC]
MACHINE = Smithy 622 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 622.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = -63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = -63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 4800 deg/min
SCALE = -1111.11111111111111111111111111
# If [TRAJ]ANGULAR_UNITS = grad
#SCALE = -1000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 36.0
HOME_LATCH_VEL = 3.6
HOME_FINAL_VEL = 36.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,179 @@
# 5i20 config file for 4 Axis Smithy 622 Mill
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 5000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 2500
setp hm2_5i20.0.stepgen.00.dirhold 2500
setp hm2_5i20.0.stepgen.00.steplen 2500
setp hm2_5i20.0.stepgen.00.stepspace 2500
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 2500
setp hm2_5i20.0.stepgen.01.dirhold 2500
setp hm2_5i20.0.stepgen.01.steplen 2500
setp hm2_5i20.0.stepgen.01.stepspace 2500
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 2500
setp hm2_5i20.0.stepgen.02.dirhold 2500
setp hm2_5i20.0.stepgen.02.steplen 2500
setp hm2_5i20.0.stepgen.02.stepspace 2500
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 2500
setp hm2_5i20.0.stepgen.03.dirhold 2500
setp hm2_5i20.0.stepgen.03.steplen 2500
setp hm2_5i20.0.stepgen.03.stepspace 2500
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.032.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.034.in => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.024.in => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.026.in => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV1 hm2_5i20.0.gpio.025.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.027.in_not
net DRV4 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,279 @@
# EMC controller parameters for Mesa 5i20 controlled 4 axis Smithy 622 Mill
[EMC]
MACHINE = 4 Axis Smithy 622 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 622_4axis.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = -63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 2.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 180"/min
SCALE = -63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 4800 deg/min
SCALE = -1111.11111111111111111111111111
# If [TRAJ]ANGULAR_UNITS = grad
#SCALE = -1000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 36.0
HOME_LATCH_VEL = 3.6
HOME_FINAL_VEL = 36.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,121 @@
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
loadrt hal_parport cfg=0x378
setp parport.0.reset-time 4000
loadrt stepgen step_type=0,0,0,0
loadrt charge_pump
loadrt match8 count=1
loadrt pwmgen output_type=1
setp pwmgen.0.pwm-freq 5.0
#4000 RPM spindles (early production)
setp pwmgen.0.scale 4000
#5000 RPM spindles (late production)
#setp pwmgen.0.scale 5000
setp pwmgen.0.offset 0.0
setp pwmgen.0.min-dc 0.01
setp pwmgen.0.max-dc 0.99
setp pwmgen.0.dither-pwm true
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread
addf match8.0 servo-thread
net spindle-cmd spindle.0.speed-out pwmgen.0.value
net spindle-enable spindle.0.on pwmgen.0.enable
net coolant-flood parport.0.pin-01-out iocontrol.0.coolant-flood
net xdir parport.0.pin-02-out stepgen.0.dir
net xstep parport.0.pin-03-out stepgen.0.step
setp parport.0.pin-03-out-reset 1
net ydir parport.0.pin-04-out stepgen.1.dir
net ystep parport.0.pin-05-out stepgen.1.step
setp parport.0.pin-05-out-reset 1
net zdir parport.0.pin-06-out stepgen.2.dir
net zstep parport.0.pin-07-out stepgen.2.step
setp parport.0.pin-07-out-reset 1
net adir parport.0.pin-08-out stepgen.3.dir
net astep parport.0.pin-09-out stepgen.3.step
setp parport.0.pin-09-out-reset 1
#PMDX-110
net spindle-dir parport.0.pin-14-out spindle.0.reverse
#PMDX-131
#net spindle-dir parport.0.pin-14-out spindle.0.forward
net spindle-pwm parport.0.pin-16-out pwmgen.0.pwm
net charge-pump parport.0.pin-17-out charge-pump.out
net estop-in parport.0.pin-10-in-not iocontrol.0.emc-enable-in
net estop-out charge-pump.enable halui.machine.is-on
#PMDX-110
net run parport.0.pin-11-in-not halui.program.pause motion.feed-hold
#PMDX-131
#net run parport.0.pin-11-in halui.program.pause motion.feed-hold
#normally closed switches (late production)
net all-home parport.0.pin-12-in
#normally open switches (early production)
#net all-home parport.0.pin-12-in-not
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 16000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb joint.0.motor-pos-fb
net xenable joint.0.amp-enable-out stepgen.0.enable
net all-home joint.0.home-sw-in
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 16000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb joint.1.motor-pos-fb
net yenable joint.1.amp-enable-out stepgen.1.enable
net all-home joint.1.home-sw-in
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 16000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb joint.2.motor-pos-fb
net zenable joint.2.amp-enable-out stepgen.2.enable
net all-home joint.2.home-sw-in
setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 16000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net apos-cmd joint.3.motor-pos-cmd stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb joint.3.motor-pos-fb
net aenable joint.3.amp-enable-out stepgen.3.enable
newsig false bit
sets false FALSE
net xhoming joint.0.homing match8.0.a0
net yhoming joint.1.homing match8.0.a1
net zhoming joint.2.homing match8.0.a2
net false match8.0.b0 match8.0.b1 match8.0.b2
net all-home match8.0.in
net limit match8.0.out joint.0.neg-lim-sw-in
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared

View File

@@ -0,0 +1,274 @@
# EMC controller parameters for Parallel Port controlled Smithy 622 Gecko Mill
[EMC]
MACHINE = Smithy 622 Gecko Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 1.5
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 622gecko.hal
EZTROL_HALFILE = eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 1.5
MAX_LINEAR_ACCELERATION = 1.5
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -10.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.6
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = -12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.8
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -5.05
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.5
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.6
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = 12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.05
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -9.8
MAX_LIMIT = 0.2
MAX_VELOCITY = 0.8
MAX_ACCELERATION = 1.5
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 0.8
MAX_ACCELERATION = 1.5
STEPGEN_MAXVEL = 1.3
STEPGEN_MAXACCEL = 1.6
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 10uSteps = 2000
# Vel at 200k Steps/S = 944"/min
SCALE = 12700
OUTPUT_SCALE = 1.000
MIN_LIMIT = -9.8
MAX_LIMIT = 0.2
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = -0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 300.0
STEPGEN_MAXVEL = 32.0
STEPGEN_MAXACCEL = 310.0
BACKLASH = 0.0000
SCALE = -500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
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 = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
#4000 RPM spindles (early production)
#MAX_SPINDLE_RPM = 4000
#5000 RPM spindles (late production)
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,180 @@
# 5i20 config file for Smithy 622 Mill with Leadshine Drives
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 5000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 1250
setp hm2_5i20.0.stepgen.00.steplen 1250
setp hm2_5i20.0.stepgen.00.stepspace 1250
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 1250
setp hm2_5i20.0.stepgen.01.steplen 1250
setp hm2_5i20.0.stepgen.01.stepspace 1250
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 1250
setp hm2_5i20.0.stepgen.02.steplen 1250
setp hm2_5i20.0.stepgen.02.stepspace 1250
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 1250
setp hm2_5i20.0.stepgen.03.steplen 1250
setp hm2_5i20.0.stepgen.03.stepspace 1250
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
#net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
#net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
#net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
#net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.032.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.034.in => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.024.in_not => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.026.in_not => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV1 hm2_5i20.0.gpio.025.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.027.in_not
net DRV4 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,280 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 622 Mill with Leadshine Axis Drives
[EMC]
MACHINE = Smithy 622 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 150.0
PYVCP = keyence.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 622keyence.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 622eztrol-leadshine.hal
#HALFILE = axis_manualtoolchange.hal
POSTGUI_HALFILE = keyence_postgui.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -0.73
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -0.73
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -8.25
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -8.25
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 120.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 1:4
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 200k Steps/S = 4800 deg/min
SCALE = -1111.11111111111111111111111111
# If [TRAJ]ANGULAR_UNITS = grad
#SCALE = -1000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 36.0
HOME_LATCH_VEL = 3.6
HOME_FINAL_VEL = 36.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,186 @@
# 5i20 config file for Smithy 622 Mill with Leadshine Drives
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 5000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 1250
setp hm2_5i20.0.stepgen.00.steplen 1250
setp hm2_5i20.0.stepgen.00.stepspace 1250
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 1250
setp hm2_5i20.0.stepgen.01.steplen 1250
setp hm2_5i20.0.stepgen.01.stepspace 1250
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 1250
setp hm2_5i20.0.stepgen.02.steplen 1250
setp hm2_5i20.0.stepgen.02.stepspace 1250
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 1250
setp hm2_5i20.0.stepgen.03.steplen 1250
setp hm2_5i20.0.stepgen.03.stepspace 1250
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
#net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
#net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
#net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
#net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.032.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.034.in => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in => joint.1.neg-lim-sw-in
# The earliest production units had normally open switches
# on the Z axis which were deemed too difficult to change
# to normally closed operation due to their remote location.
#net Zmax hm2_5i20.0.gpio.024.in_not => joint.2.pos-lim-sw-in
#net Zmin hm2_5i20.0.gpio.026.in_not => joint.2.neg-lim-sw-in
# Later production units came correctly wired with normally
# closed switched on all three axes.
net Zmax hm2_5i20.0.gpio.024.in => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.026.in => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV1 hm2_5i20.0.gpio.025.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.027.in_not
net DRV4 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,279 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 622 Mill with Leadshine Axis Drives
[EMC]
MACHINE = Smithy 622 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 300.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 622leadshine.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 40:360 = 1:9
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 21600 deg/min
SCALE = -1111.11111111111111111111111111
# If [TRAJ]ANGULAR_UNITS = grad
#SCALE = -1000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 36.0
HOME_LATCH_VEL = 3.6
HOME_FINAL_VEL = 36.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,179 @@
# 5i20 config file for 4 Axis Smithy 622 Mill with Leadshine Drives
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=1 num_pwmgens=1 num_stepgens=4"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# load charge pump
loadrt charge_pump
# These loopbacks are usually disconnected by a postgui halfile
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle speed
net scmd spindle.0.speed-out hm2_5i20.0.pwmgen.00.value
setp hm2_5i20.0.pwmgen.00.scale 5000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
setp hm2_5i20.0.gpio.016.invert_output TRUE
setp hm2_5i20.0.gpio.018.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 5000
setp hm2_5i20.0.stepgen.00.dirhold 1250
setp hm2_5i20.0.stepgen.00.steplen 1250
setp hm2_5i20.0.stepgen.00.stepspace 1250
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 5000
setp hm2_5i20.0.stepgen.01.dirhold 1250
setp hm2_5i20.0.stepgen.01.steplen 1250
setp hm2_5i20.0.stepgen.01.stepspace 1250
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.02.dirsetup 5000
setp hm2_5i20.0.stepgen.02.dirhold 1250
setp hm2_5i20.0.stepgen.02.steplen 1250
setp hm2_5i20.0.stepgen.02.stepspace 1250
setp hm2_5i20.0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.03.dirsetup 5000
setp hm2_5i20.0.stepgen.03.dirhold 1250
setp hm2_5i20.0.stepgen.03.steplen 1250
setp hm2_5i20.0.stepgen.03.stepspace 1250
setp hm2_5i20.0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_5i20.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Ypos-cmd joint.1.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.02.position-cmd
net Apos-cmd joint.3.motor-pos-cmd => hm2_5i20.0.stepgen.03.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Ypos-fb hm2_5i20.0.stepgen.01.position-fb => joint.1.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.02.position-fb => joint.2.motor-pos-fb
net Apos-fb hm2_5i20.0.stepgen.03.position-fb => joint.3.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Yen joint.1.amp-enable-out => hm2_5i20.0.stepgen.01.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.02.enable
net Aen joint.3.amp-enable-out => hm2_5i20.0.stepgen.03.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.1.jog-vel-mode
net Enable joint.2.jog-vel-mode
net Enable joint.3.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.032.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.034.in => joint.0.neg-lim-sw-in
net Ymax hm2_5i20.0.gpio.028.in => joint.1.pos-lim-sw-in
net Ymin hm2_5i20.0.gpio.030.in => joint.1.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.024.in_not => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.026.in_not => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Ymax => joint.1.home-sw-in
net Zmax => joint.2.home-sw-in
# Spindle Contactor Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
# Door Closed - Energizes spindle contactor
net CLOSED hm2_5i20.0.gpio.029.in_not hm2_5i20.0.gpio.041.out
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
# Axis Drive Status Signals
# True when YAKO stepper drive is on a full step position
# True when a Leadshine stepper drive is in the READY state
net DRV1 hm2_5i20.0.gpio.025.in_not
net DRV2 hm2_5i20.0.gpio.036.in_not
net DRV3 hm2_5i20.0.gpio.027.in_not
net DRV4 hm2_5i20.0.gpio.038.in_not
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,279 @@
# EMC controller parameters for Mesa 5i20 controlled 4 axis Smithy 622 Mill with Leadshine Axis Drives
[EMC]
MACHINE = 4 Axis Smithy 622 Mill
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
#DISPLAY = eztrol
# CYCLE_TIME is used by eztrol
CYCLE_TIME = .1
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
TKPKG = Ngcgui 1.0
TKPKG = Ngcguittt 1.0
# note: ngcgui_app.tcl must precede ngcgui_ttt.tcl
NGCGUI_FONT = Helvetica -12 normal
TTT = truetype-tracer
TTT_PREAMBLE = in_std.ngc
NGCGUI_PREAMBLE = in_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = hole_circle.ngc
NGCGUI_SUBFILE = helix.ngc
NGCGUI_SUBFILE = helix_rtheta.ngc
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = simp.ngc
NGCGUI_SUBFILE = xyz.ngc
NGCGUI_SUBFILE = iquad.ngc
NGCGUI_SUBFILE = oquad.ngc
NGCGUI_SUBFILE = db25.ngc
NGCGUI_SUBFILE = ihex.ngc
NGCGUI_SUBFILE = ohex.ngc
NGCGUI_SUBFILE = gosper.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.0
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 300.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 622leadshine_4axis.hal
#HALFILE = naiky.hal
EZTROL_HALFILE = 5i20eztrol.hal
HALFILE = axis_manualtoolchange.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.0
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = mill.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 4
[AXIS_X]
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -11.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
[AXIS_Y]
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 472"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -5.3
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
[AXIS_Z]
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 5mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 377"/min
SCALE = 63500
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_A]
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
[JOINT_3]
TYPE = ANGULAR
HOME = 0.000
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Drive Ratio = 40:360 = 1:9
# Steps/Rev = 200 * 50uSteps = 10000
# Vel at 400k Steps/S = 21600 deg/min
SCALE = -1111.11111111111111111111111111
# If [TRAJ]ANGULAR_UNITS = grad
#SCALE = -1000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -360000.0
MAX_LIMIT = 360000.0
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 36.0
HOME_LATCH_VEL = 3.6
HOME_FINAL_VEL = 36.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 3
[EZTROL]
QTEMC_PLUGIN = /usr/share/eztrol/lib/libqtemc-2.4.6.so
QTEMCHAL_PLUGIN = /usr/share/eztrol/lib/libqtemchal-2.4.6.so
EZTROLGUI = /usr/share/eztrol/eztrolgui/libguimill2.so
MAX_SPINDLE_RPM = 5000
DIR_PLUGIN = /usr/share/eztrol/eztrolplugins
PLUGIN = libeztrol_wizard_plugin.so
PLUGIN = libeztrol_webwizard_plugin.so
# disabling settings gcode editor will benefit systems with small memory size
ENABLE_SETTINGS_EDITOR = true
# disable OpenGL 3D Preview
ENABLE_3D_PREVIEW = true
# set to Full Screen TRUE/FALSE
FULLSCREEN = false
# Settings Tab GCode Editor Syntax Highlight
# color guide - http://www.w3.org/TR/SVG/types.html#ColorKeywords
AXIS_COLOR = magenta
LINENUMBER_COLOR = rosybrown
GM_COLOR = blue
STFDRLPQH_COLOR = red
O_COLOR = blue
RESERVEDWORDS_COLOR = darkviolet
VARIABLE_COLOR = olive
COMMENT_COLOR = seagreen
GUI_STYLESHEET = eztrolstyle1.qss
[EZTROLWIZARDS]
WIZARD_DIRECTORY = /usr/share/eztrol/eztrolwizards
SAVE_DIRECTORY = ../../nc_files
[EZTROLWEBWIZARD]
URL = http://www.mattshaver.com/ecmacam/ecmacam.htm

View File

@@ -0,0 +1,195 @@
<pyvcp>
<hbox>
<label>
<text>"Commanded Velocity:"</text>
</label>
<number>
<halpin>"command"</halpin>
<format>"+4.0f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"Feedback Velocity:"</text>
</label>
<number>
<halpin>"vel"</halpin>
<format>"+4.0f"</format>
</number>
</hbox>
<hbox>
<led>
<halpin>"enabled"</halpin>
</led>
<label>
<text>"Machine On"</text>
</label>
</hbox>
<hbox>
<led>
<halpin>"done"</halpin>
</led>
<label>
<text>"Init Done"</text>
</label>
</hbox>
<hbox>
<label>
<text>"PID Out/BLDC In:"</text>
</label>
<number>
<halpin>"val"</halpin>
<format>"+4.2f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"Encoder Count:"</text>
</label>
<s32>
<halpin>"count"</halpin>
<format>"6d"</format>
</s32>
</hbox>
<hbox>
<label>
<text>"Rotor Angle:"</text>
</label>
<number>
<halpin>"rotor_angle"</halpin>
<format>"+4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"Phase Angle:"</text>
</label>
<number>
<halpin>"phase_angle"</halpin>
<format>"+4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"Current:"</text>
</label>
<number>
<halpin>"current"</halpin>
<format>"+4.4f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"A"</text>
</label>
<led>
<halpin>"a"</halpin>
</led>
<label>
<text>"B"</text>
</label>
<led>
<halpin>"b"</halpin>
</led>
<label>
<text>"C"</text>
</label>
<led>
<halpin>"c"</halpin>
</led>
<label>
<text>"Index Enable"</text>
</label>
<led>
<halpin>"ie_led"</halpin>
</led>
</hbox>
<hbox>
<label>
<text>"8i20 Comms:"</text>
</label>
<u32>
<halpin>"comms"</halpin>
<format>"8x"</format>
</u32>
</hbox>
<hbox>
<label>
<text>"8i20 Fault:"</text>
</label>
<u32>
<halpin>"fault"</halpin>
<format>"8x"</format>
</u32>
</hbox>
<hbox>
<label>
<text>"8i20 Status:"</text>
</label>
<u32>
<halpin>"status"</halpin>
<format>"8x"</format>
</u32>
</hbox>
<hbox>
<label>
<text>"8i20 Temp:"</text>
</label>
<number>
<halpin>"temp"</halpin>
<format>"+2.0f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"8i20 Volts:"</text>
</label>
<number>
<halpin>"voltage"</halpin>
<format>"+3.2f"</format>
</number>
</hbox>
<hbox>
<label>
<text>"SS Fault Count:"</text>
</label>
<u32>
<halpin>"faults"</halpin>
<format>"6d"</format>
</u32>
</hbox>
<hbox>
<label>
<text>"SS Port0 State:"</text>
</label>
<u32>
<halpin>"port_state"</halpin>
<format>"8x"</format>
</u32>
</hbox>
<hbox>
<label>
<text>"Hall Error"</text>
</label>
<led>
<halpin>"hall-error"</halpin>
</led>
</hbox>
<hbox>
<label>
<text>"Spindle At Speed"</text>
</label>
<led>
<halpin>"at-speed"</halpin>
</led>
</hbox>
<hbox>
<label>
<text>"Spindle Stalled"</text>
</label>
<led>
<halpin>"stall"</halpin>
</led>
</hbox>
</pyvcp>

View File

@@ -0,0 +1,32 @@
net srpm pyvcp.command
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 60
net fb scale.0.in
net svel pyvcp.vel scale.0.out
net machine-on pyvcp.enabled
net init-done pyvcp.done
net pid-out pyvcp.val
net count hm2_5i20.0.encoder.00.count pyvcp.count
net rotor_angle pyvcp.rotor_angle
net phase_angle bldc.0.phase-angle pyvcp.phase_angle
net current pyvcp.current
net sa pyvcp.a
net sb pyvcp.b
net sc pyvcp.c
net Sidx pyvcp.ie_led
# 8i20 Pins:
net comms hm2_5i20.0.8i20.0.0.comms pyvcp.comms
net fault hm2_5i20.0.8i20.0.0.fault pyvcp.fault
net status hm2_5i20.0.8i20.0.0.status pyvcp.status
net temp hm2_5i20.0.8i20.0.0.temp pyvcp.temp
net voltage hm2_5i20.0.8i20.0.0.voltage pyvcp.voltage
# SSerial Pins:
net fault-count hm2_5i20.0.sserial.port-0.fault-count pyvcp.faults
net port_state hm2_5i20.0.sserial.port-0.port_state pyvcp.port_state
net herr bldc.0.hall-error pyvcp.hall-error
net at-speed pyvcp.at-speed
net stall pyvcp.stall

View File

@@ -0,0 +1,309 @@
_FILES_CLASSICLADDER
_FILE-monostables.csv
1,1
1,0
1,0
1,0
1,0
1,0
1,0
1,0
1,0
1,0
_/FILE-monostables.csv
_FILE-general.txt
PERIODIC_REFRESH=1
SIZE_NBR_RUNGS=100
SIZE_NBR_BITS=20
SIZE_NBR_WORDS=20
SIZE_NBR_TIMERS=10
SIZE_NBR_MONOSTABLES=10
SIZE_NBR_COUNTERS=10
SIZE_NBR_TIMERS_IEC=10
SIZE_NBR_PHYS_INPUTS=15
SIZE_NBR_PHYS_OUTPUTS=15
SIZE_NBR_ARITHM_EXPR=100
SIZE_NBR_SECTIONS=10
SIZE_NBR_SYMBOLS=160
_/FILE-general.txt
_FILE-rung_1.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=3
#NEXTRUNG=-1
9-0-0/0 , 1-0-50/0 , 9-0-0/0 , 2-0-0/0 , 9-0-0/0 , 2-0-0/3 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-60/1
1-0-50/0 , 9-0-0/0 , 1-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-60/0
9-0-0/0 , 4-0-60/1 , 9-0-0/0 , 9-1-0/0 , 99-0-0/0 , 11-0-60/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-60/2
1-0-50/0 , 9-0-0/0 , 1-0-0/3 , 0-1-0/0 , 99-0-0/0 , 99-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
9-0-0/0 , 4-0-60/2 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 52-0-60/0
9-0-0/0 , 3-0-50/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 53-0-60/0
_/FILE-rung_1.csv
_FILE-sections.csv
#VER=1.0
#NAME000=Prog1
000,0,-1,2,1,0
_/FILE-sections.csv
_FILE-modbusioconf.csv
#VER=1.0
_/FILE-modbusioconf.csv
_FILE-arithmetic_expressions.csv
#VER=2.0
0000,(@270/0@-1)&3=@200/1@
0001,@270/0@=0
0004,@200/1@=1
0005,@200/1@=0
0006,@200/1@=2
0007,@200/1@=3
_/FILE-arithmetic_expressions.csv
_FILE-com_params.txt
MODBUS_MASTER_SERIAL_PORT=
MODBUS_MASTER_SERIAL_SPEED=9600
MODBUS_MASTER_SERIAL_DATABITS=8
MODBUS_MASTER_SERIAL_STOPBITS=1
MODBUS_MASTER_SERIAL_PARITY=0
MODBUS_ELEMENT_OFFSET=0
MODBUS_MASTER_SERIAL_USE_RTS_TO_SEND=0
MODBUS_MASTER_TIME_INTER_FRAME=100
MODBUS_MASTER_TIME_OUT_RECEIPT=500
MODBUS_MASTER_TIME_AFTER_TRANSMIT=0
MODBUS_DEBUG_LEVEL=0
MODBUS_MAP_COIL_READ=0
MODBUS_MAP_COIL_WRITE=0
MODBUS_MAP_INPUT=0
MODBUS_MAP_HOLDING=0
MODBUS_MAP_REGISTER_READ=0
MODBUS_MAP_REGISTER_WRITE=0
_/FILE-com_params.txt
_FILE-counters.csv
0
0
0
0
0
0
0
0
0
0
_/FILE-counters.csv
_FILE-timers.csv
1,0
1,0
1,0
1,0
1,0
1,0
1,0
1,0
1,0
1,0
_/FILE-timers.csv
_FILE-sequential.csv
#VER=1.0
_/FILE-sequential.csv
_FILE-ioconf.csv
#VER=1.0
_/FILE-ioconf.csv
_FILE-rung_3.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=2
#NEXTRUNG=1
9-0-0/0 , 1-0-50/1 , 1-0-50/2 , 1-0-50/3 , 1-0-50/4 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-0/2
9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 20-0-0/1 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-0/3
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
1-0-50/5 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-60/3
_/FILE-rung_3.csv
_FILE-timers_iec.csv
1,15,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
_/FILE-timers_iec.csv
_FILE-symbols.csv
#VER=1.0
%Q1,TPFWD,
%Q2,TPREV,
%Q0,TCACK,
%B0,TPINPOS,
%I0,TCREQ,
%I1,T1,
%I2,T2,
%I3,T3,
%I4,T4,
%IW0,PREPNO,
%W1,TPOS,
%B1,TPUP,
%B2,TPROT,
%B3,T0,
%I5,TP,
%I6,%I6,
%I7,%I7,
%I8,%I8,
%I9,%I9,
%I10,%I10,
%I11,%I11,
%I12,%I12,
%I13,%I13,
%I14,%I14,
%Q3,TQ,
%Q4,%Q4,
%Q5,%Q5,
%Q6,%Q6,
%Q7,%Q7,
%Q8,%Q8,
%Q9,%Q9,
%Q10,%Q10,
%Q11,%Q11,
%Q12,%Q12,
%Q13,%Q13,
%Q14,%Q14,
%B4,%B4,
%B5,%B5,
%B6,%B6,
%B7,%B7,
%B8,%B8,
%B9,%B9,
%B10,%B10,
%B11,%B11,
%B12,%B12,
%B13,%B13,
%B14,%B14,
%B15,%B15,
%B16,%B16,
%B17,%B17,
%B18,%B18,
%B19,%B19,
%W0,%W0,
%W2,%W2,
%W3,%W3,
%W4,%W4,
%W5,%W5,
%W6,%W6,
%W7,%W7,
%W8,%W8,
%W9,%W9,
%W10,%W10,
%W11,%W11,
%W12,%W12,
%W13,%W13,
%W14,%W14,
%W15,%W15,
%W16,%W16,
%W17,%W17,
%W18,%W18,
%W19,%W19,
%IW1,%IW1,
%IW2,%IW2,
%IW3,%IW3,
%IW4,%IW4,
%IW5,%IW5,
%IW6,%IW6,
%IW7,%IW7,
%IW8,%IW8,
%IW9,%IW9,
%QW0,%QW0,
%QW1,%QW1,
%QW2,%QW2,
%QW3,%QW3,
%QW4,%QW4,
%QW5,%QW5,
%QW6,%QW6,
%QW7,%QW7,
%QW8,%QW8,
%QW9,%QW9,
%IF0,%IF0,
%IF1,%IF1,
%IF2,%IF2,
%IF3,%IF3,
%IF4,%IF4,
%IF5,%IF5,
%IF6,%IF6,
%IF7,%IF7,
%IF8,%IF8,
%IF9,%IF9,
%QF0,%QF0,
%QF1,%QF1,
%QF2,%QF2,
%QF3,%QF3,
%QF4,%QF4,
%QF5,%QF5,
%QF6,%QF6,
%QF7,%QF7,
%QF8,%QF8,
%QF9,%QF9,
%T0,%T0,Old Timer
%T1,%T1,Old Timer
%T2,%T2,Old Timer
%T3,%T3,Old Timer
%T4,%T4,Old Timer
%T5,%T5,Old Timer
%T6,%T6,Old Timer
%T7,%T7,Old Timer
%T8,%T8,Old Timer
%T9,%T9,Old Timer
%TM0,%TM0,New Timer
%TM1,%TM1,New Timer
%TM2,%TM2,New Timer
%TM3,%TM3,New Timer
%TM4,%TM4,New Timer
%TM5,%TM5,New Timer
%TM6,%TM6,New Timer
%TM7,%TM7,New Timer
%TM8,%TM8,New Timer
%TM9,%TM9,New Timer
%M0,%M0,One-shot
%M1,%M1,One-shot
%M2,%M2,One-shot
%M3,%M3,One-shot
%M4,%M4,One-shot
%M5,%M5,One-shot
%M6,%M6,One-shot
%M7,%M7,One-shot
%M8,%M8,One-shot
%M9,%M9,One-shot
%C0,%C0,Counter
%C1,%C1,Counter
%C2,%C2,Counter
%C3,%C3,Counter
%C4,%C4,Counter
%C5,%C5,Counter
%C6,%C6,Counter
%C7,%C7,Counter
%C8,%C8,Counter
%C9,%C9,Counter
%E0,%E0,Error Flag Bit
%E1,%E1,Error Flag Bit
%E2,%E2,Error Flag Bit
%E3,%E3,Error Flag Bit
%E4,%E4,Error Flag Bit
%E5,%E5,Error Flag Bit
%E6,%E6,Error Flag Bit
%E7,%E7,Error Flag Bit
%E8,%E8,Error Flag Bit
%E9,%E9,Error Flag Bit
_/FILE-symbols.csv
_FILE-rung_2.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=-1
#NEXTRUNG=3
9-0-0/0 , 2-0-50/1 , 1-0-50/2 , 1-0-50/3 , 1-0-50/4 , 2-0-0/3 , 9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 60-0-0/5
9-0-0/0 , 2-0-50/2 , 1-0-50/1 , 1-0-50/3 , 1-0-50/4 , 2-0-0/3 , 9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 60-0-0/4
9-0-0/0 , 2-0-50/3 , 1-0-50/1 , 1-0-50/2 , 1-0-50/4 , 2-0-0/3 , 9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 60-0-0/6
9-0-0/0 , 2-0-50/4 , 1-0-50/1 , 1-0-50/2 , 1-0-50/3 , 2-0-0/3 , 9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 60-0-0/7
9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 20-0-0/0 , 9-0-0/0 , 2-0-0/2 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 50-0-0/0
9-0-0/0 , 9-0-50/0 , 1-0-0/3 , 9-0-0/0 , 0-1-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-60/1
_/FILE-rung_2.csv
_/FILES_CLASSICLADDER

View File

@@ -0,0 +1,185 @@
# 5i20 config file for Smithy 924 Lathe
# load the hostmot2 driver, this doesn't do anything by itself,
# it just waits for low-level drivers to register boards
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
# load the low-level driver for the board
# this will load the board's firmware and register it with the hostmot2
# driver loaded above, and it'll show up in HAL
loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=3 num_pwmgens=1 num_stepgens=2"
# set up the watchdog
#setp hm2_5i20.0.watchdog.timeout_ns 10000000
# load kinematics
loadrt [KINS]KINEMATICS
# load 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 traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[KINS]JOINTS
# classicladder for machine logic
# (load the realtime portion)
loadrt classicladder_rt
# invoke the user part of CL to silently load the program
loadusr -w classicladder --nogui 924.clp
# load charge pump
loadrt charge_pump
# load the spindle speed lowpass filter
loadrt lowpass
#the Enable signal is used to permanently enable things
newsig Enable bit
sets Enable TRUE
#configure the spindle encoder
setp hm2_5i20.0.encoder.00.scale 4096
net Spos hm2_5i20.0.encoder.00.position spindle.0.revs
net Svel hm2_5i20.0.encoder.00.velocity spindle.0.speed-in
net Sidx hm2_5i20.0.encoder.00.index-enable => spindle.0.index-enable
#configure the spindle speed lowpass filter & PWM generator
net Scmd spindle.0.speed-out => lowpass.0.in
net Sflt lowpass.0.out => hm2_5i20.0.pwmgen.00.value
#early production machines
setp lowpass.0.gain 0.0001
#later production machines
#setp lowpass.0.gain 1.0
setp hm2_5i20.0.pwmgen.00.scale 3000
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.pwm_frequency 100
# invert the step pulse polarity
setp hm2_5i20.0.gpio.000.invert_output TRUE
setp hm2_5i20.0.gpio.002.invert_output TRUE
# configure the stepgen parameters
setp hm2_5i20.0.stepgen.00.dirsetup 2500
setp hm2_5i20.0.stepgen.00.dirhold 2500
setp hm2_5i20.0.stepgen.00.steplen 2500
setp hm2_5i20.0.stepgen.00.stepspace 2500
setp hm2_5i20.0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_5i20.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
setp hm2_5i20.0.stepgen.01.dirsetup 2500
setp hm2_5i20.0.stepgen.01.dirhold 2500
setp hm2_5i20.0.stepgen.01.steplen 2500
setp hm2_5i20.0.stepgen.01.stepspace 2500
setp hm2_5i20.0.stepgen.01.position-scale [JOINT_2]SCALE
setp hm2_5i20.0.stepgen.01.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i20.0.stepgen.01.maxvel [JOINT_2]STEPGEN_MAXVEL
# connect position commands from motion module to step generator
net Xpos-cmd joint.0.motor-pos-cmd => hm2_5i20.0.stepgen.00.position-cmd
net Zpos-cmd joint.2.motor-pos-cmd => hm2_5i20.0.stepgen.01.position-cmd
# connect position feedback from step generators to motion module
net Xpos-fb hm2_5i20.0.stepgen.00.position-fb => joint.0.motor-pos-fb
net Zpos-fb hm2_5i20.0.stepgen.01.position-fb => joint.2.motor-pos-fb
# connect enable signals for step generators
net Xen joint.0.amp-enable-out => hm2_5i20.0.stepgen.00.enable
net Zen joint.2.amp-enable-out => hm2_5i20.0.stepgen.01.enable
# enable velocity mode jogging
net Enable joint.0.jog-vel-mode
net Enable joint.2.jog-vel-mode
# enable the PWM generator
net Enable => hm2_5i20.0.pwmgen.00.enable
# enable the charge pump
net Enable => charge-pump.enable
# connect the charge pump signal to an output
setp hm2_5i20.0.gpio.022.is_output TRUE
net chargepump hm2_5i20.0.gpio.022.out => charge-pump.out
# Safety Relay Monitoring Contacts
net estop-enable hm2_5i20.0.gpio.037.in => iocontrol.0.emc-enable-in
# Run Switch
net machine-on hm2_5i20.0.gpio.039.in_not => halui.machine.on
#connect limit switches to limit inputs
net Xmax hm2_5i20.0.gpio.024.in => joint.0.pos-lim-sw-in
net Xmin hm2_5i20.0.gpio.026.in => joint.0.neg-lim-sw-in
net Zmax hm2_5i20.0.gpio.028.in => joint.2.pos-lim-sw-in
net Zmin hm2_5i20.0.gpio.030.in => joint.2.neg-lim-sw-in
#connect positive limit signals to home inputs
net Xmax => joint.0.home-sw-in
net Zmax => joint.2.home-sw-in
# Main Contactors - True when both contactors are energized
net ACOK hm2_5i20.0.gpio.035.in_not
# VFD Fault Relay - True when VFD is not faulted
#net VFDOK hm2_5i20.0.gpio.031.in_not
# A Axis Home - On Sieg machines there is no VFD fault signal,
# it is used for the A axis home sensor on 4 axis machines
#net VFDOK hm2_5i20.0.gpio.031.in_not
#net AHOME hm2_5i20.0.gpio.031.in joint.3.home-sw-in
# Spindle Contactor - False when spindle contactor is energized
net SOFF hm2_5i20.0.gpio.033.in halui.program.pause motion.feed-hold
#Tool Post Control Inputs
net PrepNo iocontrol.0.tool-prep-number => classicladder.0.s32in-00
net TC iocontrol.0.tool-change => classicladder.0.in-00
net T1 hm2_5i20.0.gpio.032.in => classicladder.0.in-01
net T2 hm2_5i20.0.gpio.034.in => classicladder.0.in-02
net T3 hm2_5i20.0.gpio.036.in => classicladder.0.in-03
net T4 hm2_5i20.0.gpio.038.in => classicladder.0.in-04
net TP iocontrol.0.tool-prepare => classicladder.0.in-05
#Door Sensor
net SS hm2_5i20.0.gpio.029.in
# Output Bits
# KA1
setp hm2_5i20.0.gpio.040.is_output TRUE
setp hm2_5i20.0.gpio.040.invert_output TRUE
net KA1 spindle.0.reverse => hm2_5i20.0.gpio.040.out
# KA2
setp hm2_5i20.0.gpio.042.is_output TRUE
setp hm2_5i20.0.gpio.042.invert_output TRUE
net KA2 spindle.0.on => hm2_5i20.0.gpio.042.out
#Tool Post Control Outputs
net TD classicladder.0.out-00 => iocontrol.0.tool-changed
net TQ classicladder.0.out-03 => iocontrol.0.tool-prepared
#KA3
setp hm2_5i20.0.gpio.044.is_output TRUE
setp hm2_5i20.0.gpio.044.invert_output TRUE
net KA3 hm2_5i20.0.gpio.044.out => classicladder.0.out-01
#KA4
setp hm2_5i20.0.gpio.046.is_output TRUE
setp hm2_5i20.0.gpio.046.invert_output TRUE
net KA4 hm2_5i20.0.gpio.046.out => classicladder.0.out-02
#Spindle Enable
setp hm2_5i20.0.gpio.041.is_output TRUE
setp hm2_5i20.0.gpio.041.invert_output TRUE
net Enable => hm2_5i20.0.gpio.041.out
# Flood Coolant
setp hm2_5i20.0.gpio.043.is_output TRUE
setp hm2_5i20.0.gpio.043.invert_output TRUE
net M8 hm2_5i20.0.gpio.043.out => iocontrol.0.coolant-flood
# Mist Coolant
setp hm2_5i20.0.gpio.045.is_output TRUE
setp hm2_5i20.0.gpio.045.invert_output TRUE
net M7 hm2_5i20.0.gpio.045.out => iocontrol.0.coolant-mist
# hook the functions to threads
# read inputs
addf hm2_5i20.0.read servo-thread
# handle motion commands
addf motion-command-handler servo-thread
# run the motion controller
addf motion-controller servo-thread
# refresh classicladder
addf classicladder.0.refresh servo-thread
# run the spindle speed lowpass filter
addf lowpass.0 servo-thread
# write outputs
addf hm2_5i20.0.write servo-thread
# toggle the charge pump
addf charge-pump servo-thread

View File

@@ -0,0 +1,163 @@
# EMC controller parameters for Mesa 5i20 controlled Smithy 924 Lathe
[EMC]
MACHINE = Smithy 924 Lathe
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF
[DISPLAY]
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
LATHE = 1
TKPKG = Ngcgui 1.0
NGCGUI_FONT = Helvetica -12 normal
NGCGUI_PREAMBLE = lathe_std.ngc
NGCGUI_POSTAMBLE = bye.ngc
NGCGUI_SUBFILE = backlash.ngc
NGCGUI_SUBFILE = id.ngc
NGCGUI_SUBFILE = od.ngc
NGCGUI_SUBFILE = taper-od.ngc
NGCGUI_SUBFILE = ""
#NGCGUI_SUBFILE = "" use when imageframe is specified if
# opening other files is required
# images will be put in a toplevel window
NGCGUI_OPTIONS =
#NGCGUI_OPTIONS = opt1 opt2 ...
# opt items:
# nonew -- disallow making a new tab page
# noremove -- disallow removing any tab page
# noauto -- no autosend (makeFile, then manually send)
# noiframe -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = geany
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.75
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60.0
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/lathe:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH = ../../nc_files/ngcgui_lib/mfiles
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.001
[HAL]
HALUI = halui
HALFILE = 924.hal
#HALFILE = naiky.hal
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.93
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2
[EMCIO]
TOOL_TABLE = lathe.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
#TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.875
MAX_ACCELERATION = 20.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.875
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 2:1
# Steps/Rev = 200 * 40uSteps = 8000
# Vel at 200k Steps/S = 118"/min
SCALE = -101600
OUTPUT_SCALE = 1.000
MIN_LIMIT = -3.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_Z]
MIN_LIMIT = -16.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.75
MAX_ACCELERATION = 20.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.75
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 40uSteps = 8000
# Vel at 200k Steps/S = 236"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -16.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1

View File

@@ -0,0 +1,18 @@
net Xmax eztrol.x-positive-limit
net Xmin eztrol.x-negative-limit
net Zmax eztrol.z-positive-limit
net Zmin eztrol.z-negative-limit
loadrt mux2
unlinkp motion.spindle-speed-out
unlinkp lowpass.0.in
net spd-mux mux2.0.out lowpass.0.in
net encodervelocity hm2_5i20.0.encoder.00.velocity eztrol.spindle-rps-reading
net spd-motion motion.spindle-speed-out mux2.0.in0
net spd-eztrol eztrol.spindle-rpm-control mux2.0.in1
net speed-select halui.mode.is-manual mux2.0.sel
addf mux2.0 servo-thread
#eztrol.estop
#eztrol.in-manual-mode
#eztrol.limit-override
#eztrol.spindle-max-rpm

View File

@@ -0,0 +1,39 @@
Smithy
www.smithy.com
These configurations are for the following Smithy machines:
1240 - Mill equipped with Leadshine axis drives, VFD and 1.5kW AC induction type spindle motor, and controlled by signals from a Mesa 5i20 FPGA card.
1240_4axis - Mill equipped with Leadshine axis drives, VFD and 1.5kW AC induction type spindle motor, rotary 4th axis, and controlled by signals from a Mesa 5i20 FPGA card.
1240combined - Mill equipped with Leadshine three phase axis drives, Mesa 8i20 BLDC spindle motor drive and 6000RPM spindle motor, and controlled by signals from a Mesa 5i20 FPGA card.
1240combined_4axis - Mill equipped with Leadshine three phase axis drives, Mesa 8i20 BLDC spindle motor drive and 6000RPM spindle motor, rotary 4th axis (two phase), and controlled by signals from a Mesa 5i20 FPGA card.
1240combined_mm - Metric version of 1240combined.
1034gecko/1240gecko - Mill equipped with Gecko G201 axis drives, VFD and 1.5kW AC induction type spindle motor, and controlled by signals from a PC parallel port.
1240rutex - Mill equipped with Rutex DC brush servo axis drives, 1.5kW AC induction type spindle motor with forward and reverse, and controlled by signals from a PC parallel port.
1240rutex_4axis - Mill equipped with Rutex DC brush servo axis drives, 1.5kW AC induction type spindle motor with forward and reverse, rotary 4th axis, and controlled by signals from a PC parallel port.
516gecko - Mill equipped with Gecko G201 axis drives, Sieg variable speed brushless DC spindle, and controlled by signals from a PC parallel port.
622 - Mill equipped with YAKO Automation axis drives, Sieg variable speed brushless DC spindle, and controlled by signals from a Mesa 5i20 FPGA card.
622_4axis - Mill equipped with YAKO Automation axis drives, Sieg variable speed brushless DC spindle, rotary 4th axis, and controlled by signals from a Mesa 5i20 FPGA card.
622gecko - Mill equipped with Gecko G201 axis drives, Sieg variable speed brushless DC spindle, and controlled by signals from a PC parallel port.
622keyence - Mill equipped with Leadshine MD2278 axis drives, Sieg variable speed brushless DC spindle, Keyence digital contact sensor, chip vacuum and controlled by signals from a Mesa 5i20 FPGA card.
622leadshine - Mill equipped with Leadshine MD2278 axis drives, Sieg variable speed brushless DC spindle, and controlled by signals from a Mesa 5i20 FPGA card.
924 - Lathe equipped with YAKO Automation axis drives, Sieg variable speed brushless DC spindle, programmable power tool post, and controlled by signals from a Mesa 5i20 FPGA card.
6130 - Lathe equipped with Leadshine three phase axis drives, VFD and AC induction type spindle motor, programmable power tool post, and controlled by signals from a Mesa 5i20 FPGA card.

View File

@@ -0,0 +1,24 @@
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
net tool-change eztrol.tool-change iocontrol.0.tool-change
net tool-changed eztrol.tool-changed iocontrol.0.tool-changed
net tool-prep-number eztrol.tool-prep-number iocontrol.0.tool-prep-number
net Xmax eztrol.x-positive-limit
net Xmin eztrol.x-negative-limit
net Ymax eztrol.y-positive-limit
net Ymin eztrol.y-negative-limit
net Zmax eztrol.z-positive-limit
net Zmin eztrol.z-negative-limit
loadrt mux2
unlinkp motion.spindle-speed-out
unlinkp pwmgen.0.value
net spd-mux mux2.0.out pwmgen.0.value eztrol.spindle-rpm-reading
net spd-motion motion.spindle-speed-out mux2.0.in0
net spd-eztrol eztrol.spindle-rpm-control mux2.0.in1
net speed-select halui.mode.is-manual mux2.0.sel
addf mux2.0 servo-thread
#eztrol.estop
#eztrol.in-manual-mode
#eztrol.limit-override
#eztrol.spindle-max-rpm

View File

@@ -0,0 +1,12 @@
<pyvcp>
<label>
<text>"RPM:"</text>
</label>
<number>
<halpin>"rpm"</halpin>
<font>("Helvetica",12)</font>
<format>"4d"</format>
<width>4</width>
</number>
</pyvcp>

View File

@@ -0,0 +1,14 @@
loadusr -W hal_manualtoolchange
# in case they were linked already
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
net tool-change hal_manualtoolchange.change iocontrol.0.tool-change
net tool-changed hal_manualtoolchange.changed iocontrol.0.tool-changed
net tool-prep-number hal_manualtoolchange.number iocontrol.0.tool-prep-number
net spindle-cmd pyvcp.rpm

View File

@@ -0,0 +1,43 @@
<pyvcp>
<label>
<text>"Sensor Position:"</text>
</label>
<number>
<halpin>"keyence_position"</halpin>
<font>("Helvetica",12)</font>
<format>"1.4f"</format>
<width>6</width>
</number>
<button>
<halpin>"keyence_reset"</halpin>
<text>"SET SENSOR = 0.0"</text>
</button>
<scale>
<font>("Helvetica",12)</font>
<width>"50"</width>
<halpin>"adjustment"</halpin>
<resolution>.0001</resolution>
<orient>VERTICAL</orient>
<min_>.025</min_>
<max_>-.025</max_>
</scale>
<label>
<text>"Center Electrode Height:"</text>
</label>
<number>
<halpin>"center_height"</halpin>
<font>("Helvetica",12)</font>
<format>"1.4f"</format>
<width>6</width>
</number>
<label>
<text>"Center Electrode to Post Height:"</text>
</label>
<number>
<halpin>"gap"</halpin>
<font>("Helvetica",12)</font>
<format>"1.4f"</format>
<width>6</width>
</number>
</pyvcp>

View File

@@ -0,0 +1,29 @@
loadusr -W hal_manualtoolchange
# in case they were linked already
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
net tool-change hal_manualtoolchange.change iocontrol.0.tool-change
net tool-changed hal_manualtoolchange.changed iocontrol.0.tool-changed
net tool-prep-number hal_manualtoolchange.number iocontrol.0.tool-prep-number
#configure the encoder input for the Keyence sensor
setp hm2_5i20.0.encoder.00.scale 25641.025641026
#connect the encoder position to an analog input of the motion controller for the Keyence sensor
net keyence_position hm2_5i20.0.encoder.00.position motion.analog-in-00
#connect pyvcp signals for the keyence sensor interface
net keyence_position pyvcp.keyence_position
#connect the encoder reset signal to a [yvcp button for the Keyence sensor
net keyence_reset hm2_5i20.0.encoder.00.reset pyvcp.keyence_reset
#connect the pyvcp scale wigit to an analog input of the motion controller
net adjustment pyvcp.adjustment-f motion.analog-in-01
#connect the pyvcp scale wigit to an analog input of the motion controller
net center_height pyvcp.center_height motion.analog-out-00
net gap pyvcp.gap motion.analog-out-01

View File

@@ -0,0 +1,4 @@
T1 P1 Z+0.100000 D0.100000 I+60.000000 J+120.000000 Q1 ;
T2 P2 D0.100000 I+60.000000 J+120.000000 Q2 ;
T3 P3 D0.100000 I+5.000000 J+85.000000 Q3 ;
T4 P4 D0.100000 I+5.000000 J+85.000000 Q4 ;

View File

@@ -0,0 +1,4 @@
T1 P1 D0.125000 Z+0.511000 ;1/8 end mill
T2 P2 D0.062500 Z+0.100000 ;1/16 end mill
T3 P3 D0.201000 Z+1.273000 ;#7 tap drill
T99999 P99999 Z+0.100000 ;big tool number

View File

@@ -0,0 +1,44 @@
# Jog Pendant
loadrt encoder num_chan=1
loadrt mux8 count=1
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread
addf mux8.0 servo-thread
# "times 4 mode" one count per full quadrature cycle, instead of the usual one count per edge.
# mpg jog wheels often have a full quadrature cycle per "click". 0 for off and 1 for on.
setp encoder.0.x4-mode 1
# X1
net scale1 mux8.0.sel0 hm2_5i20.0.gpio.048.in_not
setp mux8.0.in1 0.0001
# X10
net scale2 mux8.0.sel1 hm2_5i20.0.gpio.050.in_not
setp mux8.0.in2 0.001
# X100
net scale3 mux8.0.sel2 hm2_5i20.0.gpio.052.in_not
setp mux8.0.in4 0.01
net pend-scale axis.0.jog-scale mux8.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
#net pend-scale axis.3.jog-scale
net mpg-a encoder.0.phase-A hm2_5i20.0.gpio.051.in_not
net mpg-b encoder.0.phase-B hm2_5i20.0.gpio.049.in_not
net mpg-x axis.0.jog-enable hm2_5i20.0.gpio.054.in_not
net mpg-y axis.1.jog-enable hm2_5i20.0.gpio.056.in_not
net mpg-z axis.2.jog-enable hm2_5i20.0.gpio.058.in_not
#net mpg-4 axis.3.jog-enable hm2_5i20.0.gpio.060.in_not
#net mpg-off hm2_5i20.0.gpio.062.in_not
setp hm2_5i20.0.gpio.064.is_output TRUE
setp hm2_5i20.0.gpio.064.invert_output TRUE
net mpg-led hm2_5i20.0.gpio.064.out hm2_5i20.0.gpio.062.in
net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
#net pend-counts axis.3.jog-counts

View File

@@ -0,0 +1,87 @@
<pyvcp>
<hbox>
<label>
<text>"COUNT:"</text>
</label>
<number>
<halpin>"count"</halpin>
<format>"6d"</format>
<width>6</width>
</number>
<button>
<halpin>"reset"</halpin>
<text>"RESET"</text>
</button>
<checkbutton>
<halpin>"led"</halpin>
<text>"LED"</text>
</checkbutton>
</hbox>
<hbox>
<label>
<text>"A"</text>
</label>
<led>
<halpin>"a"</halpin>
</led>
<label>
<text>"B"</text>
</label>
<led>
<halpin>"b"</halpin>
</led>
</hbox>
<hbox>
<label>
<text>"X1"</text>
</label>
<led>
<halpin>"x1"</halpin>
</led>
<label>
<text>"X10"</text>
</label>
<led>
<halpin>"x10"</halpin>
</led>
<label>
<text>"X100"</text>
</label>
<led>
<halpin>"x100"</halpin>
</led>
</hbox>
<hbox>
<label>
<text>"OFF"</text>
</label>
<led>
<halpin>"off"</halpin>
</led>
<label>
<text>"X"</text>
</label>
<led>
<halpin>"x"</halpin>
</led>
<label>
<text>"Y"</text>
</label>
<led>
<halpin>"y"</halpin>
</led>
<label>
<text>"Z"</text>
</label>
<led>
<halpin>"z"</halpin>
</led>
<label>
<text>"4"</text>
</label>
<led>
<halpin>"4"</halpin>
</led>
</hbox>
</pyvcp>

Some files were not shown because too many files have changed in this diff Show More