Browse Source

JT's 7i96 tool

xhcb04
ton, LinuxCNCMESA 4 years ago
parent
commit
5c1afc7bb7
  1. 2
      custom.hal
  2. 8
      io.hal
  3. 179
      mesa_2019.hal
  4. 270
      mesa_2019.ini
  5. 0
      mesa_2019.var
  6. 3
      postgui.hal
  7. 2
      tool.tbl

2
custom.hal

@ -0,0 +1,2 @@
# Place any HAL commands in this file that you want to run before the GUI.
# This file will not be written over by the configuration tool.

8
io.hal

@ -0,0 +1,8 @@
# This file was created with the 7i96 Wizard on Apr 14 2019 12:26:53
# If you make changes to this file your screwed
net home-joint-0 joint.0.home-sw-in <= hm2_7i96.0.gpio.000.in
net home-joint-1 joint.1.home-sw-in <= hm2_7i96.0.gpio.001.in
net home-joint-2 joint.2.home-sw-in <= hm2_7i96.0.gpio.002.in
net home-joint-3 joint.3.home-sw-in <= hm2_7i96.0.gpio.003.in
net probe-input motion.probe-input <= hm2_7i96.0.gpio.009.in

179
mesa_2019.hal

@ -0,0 +1,179 @@
# This file was created with the 7i96 Wizard on Apr 14 2019 12:26:53
# If you make changes to this file DO NOT run the configuration tool again!
# This file will be replaced with a new file if you do!
# kinematics
loadrt [KINS]KINEMATICS
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# standard components
loadrt pid num_chan=4
# hostmot2 driver
loadrt hostmot2
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](IPADDRESS) config="num_encoders=[HOSTMOT2](ENCODERS)num_stepgens=[HOSTMOT2](STEPGENS)"sserial_port_0=[HOSTMOT2](SSERIAL_PORT)
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
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -100
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
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
# Joint 0
# axis enable chain
newsig emcmot.0.enable bit
sets emcmot.0.enable FALSE
net emcmot.0.enable <= joint.0.amp-enable-out
net emcmot.0.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.0.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.0.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb joint.0.motor-pos-fb pid.0.feedback
net motor.0.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
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
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
# Joint 1
# axis enable chain
newsig emcmot.1.enable bit
sets emcmot.1.enable FALSE
net emcmot.1.enable <= joint.1.amp-enable-out
net emcmot.1.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.1.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.1.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb joint.1.motor-pos-fb pid.1.feedback
net motor.1.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
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
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
# Joint 2
# axis enable chain
newsig emcmot.2.enable bit
sets emcmot.2.enable FALSE
net emcmot.2.enable <= joint.2.amp-enable-out
net emcmot.2.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.2.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net motor.2.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb joint.2.motor-pos-fb pid.2.feedback
net motor.2.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
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
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
# Joint 3
# axis enable chain
newsig emcmot.3.enable bit
sets emcmot.3.enable FALSE
net emcmot.3.enable <= joint.3.amp-enable-out
net emcmot.3.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable pid.3.enable
# position command and feedback
net emcmot.3.pos-cmd joint.3.motor-pos-cmd => pid.3.command
net motor.3.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb joint.3.motor-pos-fb pid.3.feedback
net motor.3.command pid.3.output hm2_[HOSTMOT2](BOARD).0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 1
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
setp pid.3.deadband [JOINT_3]DEADBAND
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
setp pid.3.maxerror [JOINT_3]MAX_ERROR
# Spindle
setp hm2_7i96.0.pwmgen.00.output-type 0
setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
# 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

270
mesa_2019.ini

@ -0,0 +1,270 @@
# This file was created with the 7i96 Wizard on Apr 14 2019 12:26:53
# Changes to most things are ok and will be read by the wizard
[EMC]
VERSION = 1.1
MACHINE = mesa_2019
DEBUG = 0x00000000
[HOSTMOT2]
DRIVER = hm2_eth
IPADDRESS = "10.10.10.10"
BOARD = 7i96
STEPGENS = 4
ENCODERS = 1
SSERIAL_PORT = 1
[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = MACHINE
POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 1.2
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
[KINS]
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
JOINTS = 4
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = mesa_2019.var
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[TRAJ]
COORDINATES = XYYZ
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 45
[HAL]
HALFILE = mesa_2019.hal
HALFILE = io.hal
HALFILE = custom.hal
HALFILE = postgui.hal
HALUI = halui
[HALUI]
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 540
MAX_VELOCITY = 120
MAX_ACCELERATION = 140
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 540
MAX_VELOCITY = 30
MAX_ACCELERATION = 30
[AXIS_Z]
MIN_LIMIT = 0
MAX_LIMIT = 77
MAX_VELOCITY = 30
MAX_ACCELERATION = 35
[JOINT_0]
AXIS = X
MIN_LIMIT = 0
MAX_LIMIT = 540
MAX_VELOCITY = 120
MAX_ACCELERATION = 140
TYPE = LINEAR
SCALE = 200
STEPGEN_MAX_VEL = 144.0
STEPGEN_MAX_ACC = 168.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 5000
DIRHOLD = 5000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 540
HOME_OFFSET = 540
HOME_SEARCH_VEL = 50
HOME_LATCH_VEL = 20
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
HOME_IGNORE_LIMITS = False
[JOINT_1]
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 540
MAX_VELOCITY = 30
MAX_ACCELERATION = 30
TYPE = LINEAR
SCALE = 55
STEPGEN_MAX_VEL = 36.0
STEPGEN_MAX_ACC = 36.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 111
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 5
HOME_SEQUENCE = -2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_2]
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 540
MAX_VELOCITY = 30
MAX_ACCELERATION = 30
TYPE = LINEAR
SCALE = 55
STEPGEN_MAX_VEL = 36.0
STEPGEN_MAX_ACC = 36.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 111
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 5
HOME_SEQUENCE = -2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_3]
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 77
MAX_VELOCITY = 30
MAX_ACCELERATION = 35
TYPE = LINEAR
SCALE = 200
STEPGEN_MAX_VEL = 36.0
STEPGEN_MAX_ACC = 42.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 100000
DIRHOLD = 100000
STEPLEN = 22000
STEPSPACE = 22000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 20
HOME_OFFSET = 20
HOME_SEARCH_VEL = 20
HOME_LATCH_VEL = 5
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[SPINDLE]
SPINDLE_TYPE = openLoop
SCALE =
PWM_FREQUENCY = 20000
MAX_RPM = 24000
MIN_RPM = 1000
DEADBAND = 0
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
MAX_ERROR = 0
[INPUTS]
# DO NOT change the input text
INPUT_0 = Home
INPUT_JOINT_0 = 0
INPUT_1 = Home
INPUT_JOINT_1 = 1
INPUT_2 = Home
INPUT_JOINT_2 = 2
INPUT_3 = Home
INPUT_JOINT_3 = 3
INPUT_4 = None
INPUT_JOINT_4 = False
INPUT_5 = None
INPUT_JOINT_5 = False
INPUT_6 = None
INPUT_JOINT_6 = False
INPUT_7 = None
INPUT_JOINT_7 = False
INPUT_8 = None
INPUT_JOINT_8 = False
INPUT_9 = Probe
INPUT_JOINT_9 = False
INPUT_10 = E-Stop In
INPUT_JOINT_10 = False
[OUTPUTS]
# DO NOT change the output text
OUTPUT_0 = None
OUTPUT_1 = None
OUTPUT_2 = None
OUTPUT_3 = None
OUTPUT_4 = None
[OPTIONS]
MANUAL_TOOL_CHANGE = True
HALUI = True
PYVCP = False
GLADEVCP = False
LADDER = False

0
x → mesa_2019.var

3
postgui.hal

@ -0,0 +1,3 @@
# Place any HAL commands in this file that you want to run AFTER the GUI finishes loading.
# GUI HAL pins are not visible until after the GUI loads.
# This file will not be written over by the configuration tool.

2
tool.tbl

@ -0,0 +1,2 @@
;
T1 P1
Loading…
Cancel
Save