7i92_master/7i92.iniold 0000644 0001750 0001750 00000014773 13452027712 016260 0 ustar skunkworks skunkworks # This config file was created 2019-03-27 11:56:31.776416 by the update_ini script
# The original config files may be found in the /home/skunkworks/linuxcnc/configs/7i92_master/7i92.old directory
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
PYVCP = greenmachine.xml
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = 30
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nanoseconds
SERVO_PERIOD = 2000000
[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
[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 = hm2-pidstepper.hal
POSTGUI_HALFILE = postgui.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# this value based on fastest single axis
MAX_LINEAR_VELOCITY = 3.333
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
#This is a best-guess at the number of joints, it should be checked
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 30
[JOINT_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 30
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 60
#BACKLASH = 0.0048
BACKLASH = 0.000
# scale is 2000 steps/rev * 5 revs/inch
SCALE = 10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .002
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = .00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = .0005
[AXIS_Y]
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0022
BACKLASH = 0.000
SCALE = -10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .002
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_Z]
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
BACKLASH = 0.000
SCALE = -20000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .002
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=2 num_stepgens=3"
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 1
MAX_ERROR = 0
SCALE = 0
MINLIM = 0
MAXLIM = 0
7i92_master/tool.tbl 0000644 0001750 0001750 00000000027 13444565554 016045 0 ustar skunkworks skunkworks T1 P1 ;Added 20190320
7i92_master/greenmachine.xml 0000644 0001750 0001750 00000001770 13453723215 017530 0 ustar skunkworks skunkworks
"spindle-speed"
"rpm"
300
-10000
10000
2000
100
("Helvetica",8)
"spindle-current"
"Watts"
300
-1000
1000
200
10
"AdaptiveFeed"
("Helvetica",100)
700
700
0
1
"grey"
"red"
"MaxPower"
0
800
750
1
"2.3f"
("Arial",30)
7i92_master/7i92.ini.bak 0000644 0001750 0001750 00000013543 13200666276 016314 0 ustar skunkworks skunkworks
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=0 num_stepgens=3"
[EMC]
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = 30
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
# 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
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
[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 = hm2-pidstepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[TRAJ]
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.001
[AXIS_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0048
BACKLASH = 0.000
# scale is 2000 steps/rev * 5 revs/inch
SCALE = 10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = 5
MIN_FERROR = 5
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 100
I = 0
D = 0
FF0 = 0
FF1 = 1.2
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0
[AXIS_1]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0022
BACKLASH = 0.000
SCALE = -10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .0002
MIN_FERROR = .0001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
BACKLASH = 0.000
SCALE = -20000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .0002
MIN_FERROR = .0001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 50
I = 200
D = .2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 50
SCALE = 6000
MINLIM = 0
MAXLIM = 6000
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
7i92_master/autosave.halscope 0000644 0001750 0001750 00000000772 13470324271 017727 0 ustar skunkworks skunkworks THREAD servo-thread
MAXCHAN 4
HMULT 1
HZOOM 3
HPOS 5.520305e-01
CHAN 5
PIN motion-command-handler.time
VSCALE 12
VPOS 0.500000
VOFF 0.000000e+00
CHOFF
CHAN 6
PIN motion-controller.time
VSCALE 12
VPOS 0.500000
VOFF 0.000000e+00
CHOFF
CHAN 1
PIN motion.current-vel
VSCALE 0
VPOS 0.500000
VOFF 0.000000e+00
CHAN 2
SIG spincurr
VSCALE 0
VPOS 0.500000
VOFF 0.000000e+00
CHAN 3
PIN pid.3.error
VSCALE 6
VPOS 0.500000
VOFF 0.000000e+00
CHAN 4
SIG adaptive
VSCALE 0
VPOS 0.500000
VOFF 0.000000e+00
TMODE 0
RMODE 2
7i92_master/7i92.old/tool.tbl 0000644 0001750 0001750 00000000027 13446770616 017313 0 ustar skunkworks skunkworks T1 P1 ;Added 20190320
7i92_master/7i92.old/7i92.ini.bak 0000644 0001750 0001750 00000013543 13446770616 017571 0 ustar skunkworks skunkworks
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=0 num_stepgens=3"
[EMC]
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = 30
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
# 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
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
[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 = hm2-pidstepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[TRAJ]
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.001
[AXIS_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0048
BACKLASH = 0.000
# scale is 2000 steps/rev * 5 revs/inch
SCALE = 10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = 5
MIN_FERROR = 5
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 100
I = 0
D = 0
FF0 = 0
FF1 = 1.2
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0
[AXIS_1]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0022
BACKLASH = 0.000
SCALE = -10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .0002
MIN_FERROR = .0001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
BACKLASH = 0.000
SCALE = -20000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .0002
MIN_FERROR = .0001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 50
I = 200
D = .2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 50
SCALE = 6000
MINLIM = 0
MAXLIM = 6000
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
7i92_master/7i92.old/autosave.halscope 0000644 0001750 0001750 00000000771 13446770616 021210 0 ustar skunkworks skunkworks THREAD servo-thread
MAXCHAN 4
HMULT 1
HZOOM 2
HPOS 3.536122e-01
CHAN 5
PIN motion-command-handler.time
VSCALE 12
VPOS 0.500000
VOFF 0.000000e+00
CHOFF
CHAN 6
PIN motion-controller.time
VSCALE 12
VPOS 0.500000
VOFF 0.000000e+00
CHOFF
CHAN 2
PIN ddt.1.out
VSCALE 5
VPOS 0.900000
VOFF 0.000000e+00
CHAN 3
PIN limit3.0.out
VSCALE -6
VPOS 0.402469
VOFF 0.000000e+00
CHAN 4
PIN pid.3.error
VSCALE -4
VPOS 0.110070
VOFF 0.000000e+00
CHAN 1
PIN ddt.0.out
VSCALE -3
VPOS 0.567568
VOFF 0.000000e+00
TMODE 0
RMODE 0
7i92_master/7i92.old/hm2-pidstepper.hal 0000644 0001750 0001750 00000017746 13446770616 021204 0 ustar skunkworks skunkworks # #######################################
#
# HAL file for HostMot2 with 3 steppers
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2
#
# See also:
#
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt trivkins
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# standard components
loadrt pid num_chan=4
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -50
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
#setp hm2_7i92.0.gpio.004.invert_output true
#setp hm2_7i92.0.gpio.008.invert_output true
#setp hm2_7i92.0.gpio.010.invert_output true
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.0.maxerror [AXIS_0]MAX_ERROR
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net emcmot.02.vel-cmd axis.2.joint-vel-cmd => pid.2.command-deriv
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb axis.2.motor-pos-fb pid.2.feedback
net motor.02.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [AXIS_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [AXIS_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [AXIS_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [AXIS_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1
# set PID loop gains from inifile
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT
setp pid.2.maxerror [AXIS_2]MAX_ERROR
# Spindle control
# set PID loop gains from inifile
setp pid.3.Pgain [SPINDLE_9]P
setp pid.3.Igain [SPINDLE_9]I
setp pid.3.Dgain [SPINDLE_9]D
setp pid.3.bias [SPINDLE_9]BIAS
setp pid.3.FF0 [SPINDLE_9]FF0
setp pid.3.FF1 [SPINDLE_9]FF1
setp pid.3.FF2 [SPINDLE_9]FF2
setp pid.3.deadband [SPINDLE_9]DEADBAND
setp pid.3.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.3.maxerror [SPINDLE_9]MAX_ERROR
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-scalemax [SPINDLE_9]SCALE
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-minlim [SPINDLE_9]MINLIM
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-maxlim [SPINDLE_9]MAXLIM
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# 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
7i92_master/7i92.old/hm2-stepper.var.bak 0000644 0001750 0001750 00000003203 13446770616 021246 0 ustar skunkworks skunkworks 5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.000000
5222 0.000000
5223 -0.100000
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000
7i92_master/7i92.old/hm2-pidstepper.old 0000644 0001750 0001750 00000025201 13446770616 021177 0 ustar skunkworks skunkworks # #######################################
#
# HAL file for HostMot2 with 3 steppers
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2
#
# See also:
#
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt trivkins
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# standard components
loadrt pid num_chan=4
# hostmot2 driver
loadrt hostmot2
loadrt offset
loadrt limit3
loadrt scale count=2
loadrt siggen
loadrt sum2
loadrt mux2
loadrt lut5
loadrt mux4
loadrt ddt count=2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1
setp hm2_7i92.0.packet-read-timeout 70
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf offset.0.update-feedback servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf scale.1 servo-thread
addf sum2.0 servo-thread
addf pid.3.do-pid-calcs servo-thread
addf scale.0 servo-thread
addf lut5.0 servo-thread
addf mux2.0 servo-thread
addf mux4.0 servo-thread
addf limit3.0 servo-thread
addf ddt.0 servo-thread
addf ddt.1 servo-thread
addf offset.0.update-output servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf siggen.0.update servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
#addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
# Hacks to enable the DPLL sampling of the stepgen position:
# setp hm2_[HOSTMOT2](BOARD).0.raw.write_address 0x2A00
# Enable and select timer channel 1:
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_data 0x00009000
# Disable:
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_data 0x00000000
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_strobe true
# latch 50 usec beforw nominal read time:
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -50
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
setp hm2_7i92.0.gpio.004.invert_output true
setp hm2_7i92.0.gpio.008.invert_output true
setp hm2_7i92.0.gpio.010.invert_output true
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
#net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
# net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
#net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
#
net emcmot.00.pos-cmd axis.0.motor-pos-cmd offset.0.in
net emcmot.00.pos-cmd-offset offset.0.out pid.0.command
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb pid.0.feedback offset.0.fb-in
net motor.00.pos-fb-offset axis.0.motor-pos-fb offset.0.fb-out
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.0.maxerror [AXIS_0]MAX_ERROR
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net emcmot.02.vel-cmd axis.2.joint-vel-cmd => pid.2.command-deriv
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb axis.2.motor-pos-fb pid.2.feedback
net motor.02.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [AXIS_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [AXIS_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [AXIS_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [AXIS_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1
# set PID loop gains from inifile
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT
setp pid.2.maxerror [AXIS_2]MAX_ERROR
# Spindle control
# set PID loop gains from inifile
setp pid.3.Pgain [SPINDLE_9]P
setp pid.3.Igain [SPINDLE_9]I
setp pid.3.Dgain [SPINDLE_9]D
setp pid.3.bias [SPINDLE_9]BIAS
setp pid.3.FF0 [SPINDLE_9]FF0
setp pid.3.FF1 [SPINDLE_9]FF1
setp pid.3.FF2 [SPINDLE_9]FF2
setp pid.3.deadband [SPINDLE_9]DEADBAND
setp pid.3.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.3.maxerror [SPINDLE_9]MAX_ERROR
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-scalemax [SPINDLE_9]SCALE
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-minlim [SPINDLE_9]MINLIM
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-maxlim [SPINDLE_9]MAXLIM
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# 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
setp limit3.0.maxv 2
setp limit3.0.maxa 30
#setp limit3.0.nobackoff 1
net limitout limit3.0.out offset.0.offset
#net scaledvoltsdist limit3.0.in scale.0.out
setp scale.0.gain .004
net pidcommand pid.3.output scale.0.in
#net emcmot.00.enable pid.3.enable
setp siggen.0.offset 0
setp siggen.0.amplitude 5
net sigsignal siggen.0.sine sum2.0.in0
net foscale scale.1.out sum2.0.in1
net emcmot.00.pos-cmd-offset scale.1.in
#net motor.00.pos-fb scale.1.in
setp scale.1.gain 250
setp scale.1.offset 110
net fooffset sum2.0.out pid.3.feedback
setp pid.3.command 110
#setting up sample hold using mux
net limitout mux2.0.in1
net samphold mux2.0.in0 mux2.0.out
#logic for mux sample and hold
setp lut5.0.function 0xb
net PIDTHC lut5.0.in-1
net enable lut5.0.in-0
net sampenable lut5.0.out mux2.0.sel
setp mux4.0.in0 0
setp mux4.0.in1 0
net samphold mux4.0.in2
net scaledvoltsdist mux4.0.in3 scale.0.out
net mux4out limit3.0.in mux4.0.out
net enable mux4.0.sel0
net PIDTHC mux4.0.sel1
net enable pid.3.enable
net limitout ddt.0.in
net accddt ddt.0.out ddt.1.in
7i92_master/7i92.old/7i92.ini 0000644 0001750 0001750 00000013551 13446770616 017034 0 ustar skunkworks skunkworks
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=0 num_stepgens=3"
[EMC]
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = 30
# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
# 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
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 2000000
[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 = hm2-pidstepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[TRAJ]
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.001
[AXIS_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 30
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 60
#BACKLASH = 0.0048
BACKLASH = 0.000
# scale is 2000 steps/rev * 5 revs/inch
SCALE = 10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = .00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = .0005
[AXIS_1]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
#BACKLASH = 0.0022
BACKLASH = 0.000
SCALE = -10000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 1.833
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 2.2
STEPGEN_MAX_ACC = 30
BACKLASH = 0.000
SCALE = -20000
MIN_LIMIT = -30.0
MAX_LIMIT = 30.0
FERROR = .005
MIN_FERROR = .001
#HOME = 0.000
#HOME_OFFSET = 0.10
#HOME_SEARCH_VEL = 0.10
#HOME_LATCH_VEL = -0.01
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 250
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0
SCALE = 0
MINLIM = 0
MAXLIM = 0
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
7i92_master/7i92.old/hm2-stepper.var 0000644 0001750 0001750 00000003203 13446770616 020512 0 ustar skunkworks skunkworks 5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.000000
5222 0.000000
5223 -0.100000
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000
7i92_master/postgui.hal 0000644 0001750 0001750 00000003514 13521361572 016537 0 ustar skunkworks skunkworks net spindlescaled scale.0.out pyvcp.spindle-speed
#pos_fb is wattage...
net spincurr hm2_7i92.0.stbl.0.0.pos_fb lowpass.0.in
net spincurrfilt pyvcp.spindle-current lowpass.0.out
net adaptive motion.adaptive-feed pyvcp.AdaptiveFeed
net setcommand pid.3.command pyvcp.MaxPower
setp mux4.0.in0 0.0025
setp mux4.0.in1 0.00025
setp mux4.0.in2 0.000025
#encoder
setp hm2_7i92.0.encoder.00.scale -400
setp axis.x.jog-vel-mode 1
setp axis.y.jog-vel-mode 1
setp axis.z.jog-vel-mode 1
net pending-counts axis.x.jog-counts hm2_7i92.0.encoder.00.count
net pending-counts axis.y.jog-counts
net pending-counts axis.z.jog-counts
net axisjogscale axis.x.jog-scale mux4.0.out
net axisjogscale axis.y.jog-scale
net axisjogscale axis.z.jog-scale
net scale1 hm2_7i92.0.gpio.021.in mux4.0.sel0
net scale2 hm2_7i92.0.gpio.029.in mux4.0.sel1
net overrideselect mux8.0.out conv-float-s32.0.in
net overrideselect32 select8.0.sel conv-float-s32.0.out
net select1 hm2_7i92.0.gpio.019.in mux8.0.sel0
net select2 hm2_7i92.0.gpio.020.in mux8.0.sel1
net select3 hm2_7i92.0.gpio.022.in mux8.0.sel2
setp mux8.0.in0 0
setp mux8.0.in1 1
setp mux8.0.in2 2
setp mux8.0.in3 3
setp mux8.0.in4 4
setp mux8.0.in5 5
setp mux8.0.in6 6
setp mux8.0.in7 7
net jogxen axis.x.jog-enable select8.0.out7
net jogyen axis.y.jog-enable select8.0.out4
net jogzen axis.z.jog-enable select8.0.out5
#feedrateoverride
net feedrateoen halui.feed-override.count-enable select8.0.out2
net pending-counts halui.feed-override.counts
setp halui.feed-override.scale .005
#Maximum velocity
net maxvelen halui.max-velocity.count-enable select8.0.out0
net pending-counts halui.max-velocity.counts
setp halui.max-velocity.scale .005
#Spindle override
net spindleoen halui.spindle.0.override.count-enable select8.0.out1
net pending-counts halui.spindle.0.override.counts
setp halui.spindle.0.override.scale .005 7i92_master/hm2-pidstepper.hal 0000644 0001750 0001750 00000022656 13522405015 017710 0 ustar skunkworks skunkworks # #######################################
#
# HAL file for HostMot2 with 3 steppers
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2
#
# See also:
#
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt [KINS]KINEMATICS
#autoconverted trivkins
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# standard components
loadrt pid num_chan=4
loadrt scale count=2
loadrt lowpass
loadrt mux4
loadrt mux8
loadrt select8
loadrt conv_float_s32
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
addf scale.0 servo-thread
addf scale.1 servo-thread
addf lowpass.0 servo-thread
addf mux4.0 servo-thread
addf mux8.0 servo-thread
addf select8.0 servo-thread
addf conv-float-s32.0 servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -100
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
#setp hm2_7i92.0.gpio.004.invert_output true
#setp hm2_7i92.0.gpio.008.invert_output true
#setp hm2_7i92.0.gpio.010.invert_output true
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= joint.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd joint.0.vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb joint.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
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
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.0.maxerror [JOINT_0]MAX_ERROR
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= joint.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd joint.1.vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb joint.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
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
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.1.maxerror [JOINT_1]MAX_ERROR
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= joint.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.02.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net emcmot.02.vel-cmd joint.2.vel-cmd => pid.2.command-deriv
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb joint.2.motor-pos-fb pid.2.feedback
net motor.02.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1
# set PID loop gains from inifile
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
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.2.maxerror [JOINT_2]MAX_ERROR
# Spindle control
# set PID loop gains from inifile
setp pid.3.Pgain [SPINDLE_9]P
setp pid.3.Igain [SPINDLE_9]I
setp pid.3.Dgain [SPINDLE_9]D
setp pid.3.bias [SPINDLE_9]BIAS
setp pid.3.FF0 [SPINDLE_9]FF0
setp pid.3.FF1 [SPINDLE_9]FF1
setp pid.3.FF2 [SPINDLE_9]FF2
setp pid.3.deadband [SPINDLE_9]DEADBAND
setp pid.3.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.3.maxerror [SPINDLE_9]MAX_ERROR
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-scalemax [SPINDLE_9]SCALE
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-minlim [SPINDLE_9]MINLIM
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-maxlim [SPINDLE_9]MAXLIM
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# create a signal for the estop loopback
# net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
net estop hm2_7i92.0.gpio.003.in_not iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
net xhome joint.0.home-sw-in hm2_7i92.0.gpio.016.in
net yhome joint.1.home-sw-in hm2_7i92.0.gpio.014.in
net zhome joint.2.home-sw-in hm2_7i92.0.gpio.015.in
net emcmot.00.enable pid.3.enable
setp lowpass.0.gain .01
setp scale.0.gain 60
net spindleraw hm2_7i92.0.encoder.02.velocity scale.0.in
net adaptive pid.3.output
net spincurrfilt pid.3.feedback
#setp scale.1.gain .65
setp scale.1.gain 1.53846153846
net spindcmd spindle.0.speed-out-rps scale.1.in
net spindscl hm2_7i92.0.stbl.0.0.vel_cmd scale.1.out
setp hm2_7i92.0.encoder.02.scale 144
net spinindex hm2_7i92.0.encoder.02.index-enable spindle.0.index-enable
net spinpos hm2_7i92.0.encoder.02.position spindle.0.revs
setp hm2_7i92.0.gpio.007.is_output true
net probe hm2_7i92.0.gpio.013.in motion.probe-input
net probe hm2_7i92.0.gpio.007.out
net spindleen spindle.0.on hm2_7i92.0.stbl.0.0.enable
7i92_master/7i92.ini.expanded 0000644 0001750 0001750 00000015365 13522405132 017340 0 ustar skunkworks skunkworks #*** /home/skunkworks/linuxcnc/configs/7i92_master/7i92.ini.expanded
#*** Created: Tue Aug 6 18:16:42 CDT 2019
#*** Autogenerated file with expanded #INCLUDEs
# This config file was created 2019-03-02 19:26:59.506437 by the update_ini script
# The original config files may be found in the /home/skunkworks/linuxcnc/configs/7i92old/7i92.old directory
# handle_includes(): <5> CANNOT READ layout2.inc
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
PYVCP = greenmachine.xml
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
[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
[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 = hm2-pidstepper.hal
POSTGUI_HALFILE = postgui.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
HALUI = halui
[HALUI]
#No Content
[TRAJ]
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 7.0
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
#This is a best-guess at the number of joints, it should be checked
JOINTS = 3
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 10
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 40
#BACKLASH = 0.0000
BACKLASH = 0.0028
# scale is 2000 steps/rev * 5 revs/inch
SCALE = -10160
MIN_LIMIT = 0
MAX_LIMIT = 10
FERROR = .010
MIN_FERROR = .003
HOME = 0.000
HOME_OFFSET = 0.60
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = 0.1
#HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 1
DIRHOLD = 1
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 7.4
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 40
#BACKLASH = 0.0000
BACKLASH = 0.0027
SCALE = 10160
MIN_LIMIT = 0
MAX_LIMIT = 7.4
FERROR = .010
MIN_FERROR = .003
HOME = 0.000
HOME_OFFSET = 0.10
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = 0.1
#HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_Z]
MIN_LIMIT = -11.7
MAX_LIMIT = 0
MAX_VELOCITY = 3
MAX_ACCELERATION = 15
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 3
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 30
BACKLASH = 0.002
SCALE = -10160
MIN_LIMIT = -11.7
MAX_LIMIT = 0
FERROR = .010
MIN_FERROR = .003
HOME = 0
HOME_OFFSET = -0.07
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.1
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=3 num_stepgens=3"
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 1
MAX_ERROR = 0
SCALE = 0
MINLIM = 0
MAXLIM = 0
7i92_master/hm2-stepper.var.bak 0000644 0001750 0001750 00000003203 13522405133 017757 0 ustar skunkworks skunkworks 5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.277250
5222 1.364500
5223 -7.230490
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000
7i92_master/hm2-pidstepper.old 0000644 0001750 0001750 00000025201 13445477514 017730 0 ustar skunkworks skunkworks # #######################################
#
# HAL file for HostMot2 with 3 steppers
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2
#
# See also:
#
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt trivkins
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# standard components
loadrt pid num_chan=4
# hostmot2 driver
loadrt hostmot2
loadrt offset
loadrt limit3
loadrt scale count=2
loadrt siggen
loadrt sum2
loadrt mux2
loadrt lut5
loadrt mux4
loadrt ddt count=2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1
setp hm2_7i92.0.packet-read-timeout 70
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf offset.0.update-feedback servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf scale.1 servo-thread
addf sum2.0 servo-thread
addf pid.3.do-pid-calcs servo-thread
addf scale.0 servo-thread
addf lut5.0 servo-thread
addf mux2.0 servo-thread
addf mux4.0 servo-thread
addf limit3.0 servo-thread
addf ddt.0 servo-thread
addf ddt.1 servo-thread
addf offset.0.update-output servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf siggen.0.update servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
#addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
# Hacks to enable the DPLL sampling of the stepgen position:
# setp hm2_[HOSTMOT2](BOARD).0.raw.write_address 0x2A00
# Enable and select timer channel 1:
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_data 0x00009000
# Disable:
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_data 0x00000000
#setp hm2_[HOSTMOT2](BOARD).0.raw.write_strobe true
# latch 50 usec beforw nominal read time:
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -50
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
setp hm2_7i92.0.gpio.004.invert_output true
setp hm2_7i92.0.gpio.008.invert_output true
setp hm2_7i92.0.gpio.010.invert_output true
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
#net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
# net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
#net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
#
net emcmot.00.pos-cmd axis.0.motor-pos-cmd offset.0.in
net emcmot.00.pos-cmd-offset offset.0.out pid.0.command
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb pid.0.feedback offset.0.fb-in
net motor.00.pos-fb-offset axis.0.motor-pos-fb offset.0.fb-out
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.0.maxerror [AXIS_0]MAX_ERROR
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net emcmot.02.vel-cmd axis.2.joint-vel-cmd => pid.2.command-deriv
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb axis.2.motor-pos-fb pid.2.feedback
net motor.02.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [AXIS_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [AXIS_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [AXIS_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [AXIS_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1
# set PID loop gains from inifile
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT
setp pid.2.maxerror [AXIS_2]MAX_ERROR
# Spindle control
# set PID loop gains from inifile
setp pid.3.Pgain [SPINDLE_9]P
setp pid.3.Igain [SPINDLE_9]I
setp pid.3.Dgain [SPINDLE_9]D
setp pid.3.bias [SPINDLE_9]BIAS
setp pid.3.FF0 [SPINDLE_9]FF0
setp pid.3.FF1 [SPINDLE_9]FF1
setp pid.3.FF2 [SPINDLE_9]FF2
setp pid.3.deadband [SPINDLE_9]DEADBAND
setp pid.3.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.3.maxerror [SPINDLE_9]MAX_ERROR
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-scalemax [SPINDLE_9]SCALE
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-minlim [SPINDLE_9]MINLIM
#setp hm2_[HOSTMOT2](BOARD).0.7i76.0.0.spinout-maxlim [SPINDLE_9]MAXLIM
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# 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
setp limit3.0.maxv 2
setp limit3.0.maxa 30
#setp limit3.0.nobackoff 1
net limitout limit3.0.out offset.0.offset
#net scaledvoltsdist limit3.0.in scale.0.out
setp scale.0.gain .004
net pidcommand pid.3.output scale.0.in
#net emcmot.00.enable pid.3.enable
setp siggen.0.offset 0
setp siggen.0.amplitude 5
net sigsignal siggen.0.sine sum2.0.in0
net foscale scale.1.out sum2.0.in1
net emcmot.00.pos-cmd-offset scale.1.in
#net motor.00.pos-fb scale.1.in
setp scale.1.gain 250
setp scale.1.offset 110
net fooffset sum2.0.out pid.3.feedback
setp pid.3.command 110
#setting up sample hold using mux
net limitout mux2.0.in1
net samphold mux2.0.in0 mux2.0.out
#logic for mux sample and hold
setp lut5.0.function 0xb
net PIDTHC lut5.0.in-1
net enable lut5.0.in-0
net sampenable lut5.0.out mux2.0.sel
setp mux4.0.in0 0
setp mux4.0.in1 0
net samphold mux4.0.in2
net scaledvoltsdist mux4.0.in3 scale.0.out
net mux4out limit3.0.in mux4.0.out
net enable mux4.0.sel0
net PIDTHC mux4.0.sel1
net enable pid.3.enable
net limitout ddt.0.in
net accddt ddt.0.out ddt.1.in
7i92_master/7i92.ini 0000644 0001750 0001750 00000014732 13521370175 015555 0 ustar skunkworks skunkworks # This config file was created 2019-03-02 19:26:59.506437 by the update_ini script
# The original config files may be found in the /home/skunkworks/linuxcnc/configs/7i92old/7i92.old directory
#INCLUDE layout2.inc
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
[DISPLAY]
# Name of display program, e.g., tkemc
#DISPLAY = tkemc
DISPLAY = axis
PYVCP = greenmachine.xml
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.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 = emc2.gif
INTRO_TIME = 5
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2-stepper.var
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
[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
[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 = hm2-pidstepper.hal
POSTGUI_HALFILE = postgui.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
HALUI = halui
[HALUI]
#No Content
[TRAJ]
AXES = 3
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 7.0
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
#This is a best-guess at the number of joints, it should be checked
JOINTS = 3
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 10
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing for this example is a relaxed 5 us steplen + 5 us stepspace
# That gives 10 us step period = 100 KHz max step freq
#
#
# Scale is 2000 steps/rev * 5 revs/inch = 10000 steps/inch
#
# This gives a maxvel of 100000/10000 = 10 ips
#
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 40
#BACKLASH = 0.0000
BACKLASH = 0.0028
# scale is 2000 steps/rev * 5 revs/inch
SCALE = -10160
MIN_LIMIT = 0
MAX_LIMIT = 10
FERROR = .010
MIN_FERROR = .003
HOME = 0.000
HOME_OFFSET = 0.60
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = 0.1
#HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 1
DIRHOLD = 1
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 7.4
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 3.333
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 40
#BACKLASH = 0.0000
BACKLASH = 0.0027
SCALE = 10160
MIN_LIMIT = 0
MAX_LIMIT = 7.4
FERROR = .010
MIN_FERROR = .003
HOME = 0.000
HOME_OFFSET = 0.10
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = 0.1
#HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[AXIS_Z]
MIN_LIMIT = -11.7
MAX_LIMIT = 0
MAX_VELOCITY = 3
MAX_ACCELERATION = 15
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 3
MAX_ACCELERATION = 15
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 0
STEPGEN_MAX_ACC = 30
BACKLASH = 0.002
SCALE = -10160
MIN_LIMIT = -11.7
MAX_LIMIT = 0
FERROR = .010
MIN_FERROR = .003
HOME = 0
HOME_OFFSET = -0.07
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.1
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
# PID tuning params
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00011
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0005
[HOSTMOT2]
#DRIVER=hm2_eth board_ip="192.168.1.121"
DRIVER=hm2_eth board_ip="10.10.10.10"
BOARD=7i92
CONFIG="num_encoders=3 num_stepgens=3"
[SPINDLE_9]
# PID tuning params
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 1
MAX_ERROR = 0
SCALE = 0
MINLIM = 0
MAXLIM = 0
7i92_master/hm2-stepper.var 0000644 0001750 0001750 00000003203 13522412470 017225 0 ustar skunkworks skunkworks 5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.277250
5222 1.364500
5223 -7.230490
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000