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

View File

@@ -0,0 +1,3 @@
Mesa Electronics
www.mesanet.com

View File

@@ -0,0 +1 @@
*.mbccb

View File

@@ -0,0 +1,202 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper+Modbus+BLDC
# 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., 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
[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]
# 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-stepper-eth-modbus.hal
HALFILE = brushless-dc-motor-driver.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=10.10.10.10
BOARD=7i96s
CONFIG=""
[MODBUS]
PORTS="hm2_7i96s.0.pktuart.0"
MBCCBS="brushless-dc-motor-driver.mbccb"

View File

@@ -0,0 +1,202 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper+Modbus
# 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., 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
[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]
# 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-stepper-eth-modbus.hal
HALFILE = brushless-dc-motor-driver.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=10.10.10.10
BOARD=7i96s
CONFIG=""
[MODBUS]
PORTS="hm2_7i96s.0.pktuart.0"
MBCCBS="bldc_and_wavebox.mbccb"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Stepper+Modbus+Wavebox
# 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., 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
[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]
# 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-stepper-eth-modbus.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=10.10.10.10
BOARD=7i96s
CONFIG=""
[MODBUS]
PORTS="hm2_7i96s.0.pktuart.0"
MBCCBS="waveshare-modbus-rtu-relay-d.mbccb"

View File

@@ -0,0 +1,31 @@
Hostmot2 Modbus using Mesa cards and PktUART
These examples are based on the hm2-stepper 3-axis config. Please configure the IP address in the ini file.
Getting started
---------------
You first need to flash your Mesa card with a bit-file that supports one or more PktUART interfaces. The PktUART version should be version 3 or later. Version 2 is supported, but there are known bugs in version 2 and several features are missing.
You should be able to see the PktUART interfaces listed when you have flashed the PktUART bitfile.
Wiring
------
Most Modbus systems are RS-485 2-wire configuration. On your Mesa card connector, you must to connect RX- to TX- (Modbus wire 'A') and RX+ to TX+ (Modbus wire 'B'). Depending your configuration, you may need to add a termination resistor (120 Ohm) if your Mesa card does not supply that option.
Practical examples
------------------
There are several examples in here to get you going with the hm2_modbus driver. The examples are based on the 7i96s Ethernet board, but should be easily ported to other boards.
Running the examples requires you to compile the MBCCS (Modbus Command Control Source) files into binary MBCCB (Modbus Command Control Binary) files using the mesambccc utility. See the manual page mesambccc(1) for details.
Example compile:
$ mesambccc -o out.mbccb in.mbccs
Add the -v flag for verbose information about settings and pins.
Writing MBCCS files
-------------------
The file format is described in the mesambccc utility's manual page mesambccc(1).

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
See setup comments in:
- brushless-dc-motor-driver.mbccs
- waveshare-modbus-rtu-relay-d.mbccs
-->
<mesamodbus baudrate="57600" parity="E" stopbits="1" interval="50000" suspend="true">
<devices> <!-- Devices on the same bus -->
<device address="0x01" name="bldc"><description>BLDC Control board AQMD2403BLS-M</description></device>
<device address="0x02" name="wavebox"><description>A Waveshare "Modbus RTU Relay (D)" box</description></device>
<device address="0x55" name="dummy" />
</devices>
<initlist> <!-- Initialization sequences -->
<!-- Default baudrate for bldc board at boot -->
<command baudrate="9600" />
<!-- Flush the bus so that the receiver is in a known state. -->
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
<!-- Set the board to the stored higher baudrate. -->
<command device="bldc" function="W_REGISTER" address="0x009d" timesout="true"><data value="1" /></command>
<!-- Restore our real baudrate -->
<command baudrate="57600" />
<!-- Again flush the bus so that the receiver is in a known state at the new baudrate. -->
<!-- This will also bring the wavebox in a known state -->
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
</initlist>
<commands> <!-- Command function sequences and HAL pin assignments -->
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="S32" scale="1">
<pin name="rtpwm"/>
<pin name="rtcurrent"/>
<pin name="comfreq" modbustype="S_AB"/>
<pin skip="1" />
<pin name="rtpos" modbustype="S_ABCD" scale="0"/>
</command>
<!-- Gives us the following pins:
- hm2_modbus.0.bldc.rtpwm (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, u64)
- hm2_modbus.0.bldc.rtpwm.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, float)
- hm2_modbus.0.bldc.rtcurrent (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, u64)
- hm2_modbus.0.bldc.rtcurrent.scale (in, float) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, float)
- hm2_modbus.0.bldc.comfreq (out, s32) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, s64)
- hm2_modbus.0.bldc.comfreq.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, float)
- hm2_modbus.0.bldc.rtpos (out, s32) (range [-2147483648..+2147483647])
The start will be suspended (see top). The .scale pins will be set in
the hal-file. Offset pins are automatically initialized to zero.
Afterwards, the hal-file will enable communication.
-->
<command device="wavebox" function="R_INPUTS" address="0x0000" count="8" name="switch" />
<!-- Gives us the following pins:
- Eight switch inputs on the box are HAL output pins
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BIT)
* ...
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BIT)
-->
<!--
Note: We write at the /end/ of the list because writing only occurs if a
pin changes. Doing it last in the list makes the previous commands more
timing stable because they are "seen" first every time when the timer
runs.
Assuming that the interval is longer than the time it takes for the
commands to be handled.
-->
<command device="wavebox" function="W_COILS" address="0x0000" count="8" name="relay" />
<!-- Gives us the following pins:
- Eight relay outputs on the box are HAL input pins
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BIT)
* ...
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BIT)
-->
</commands>
</mesamodbus>

View File

@@ -0,0 +1,13 @@
#
# HAL file for brushless-dc-motor-driver.mbccs
#
# ######################################################
# Modbus pin scaling setup
# ######################################################
setp hm2_modbus.0.bldc.rtpwm.scale 0.1
setp hm2_modbus.0.bldc.rtcurrent.scale 0.01
setp hm2_modbus.0.bldc.comfreq.scale 0.1
# And come out of suspend with the right scaling factors in place
setp hm2_modbus.0.suspend false

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Control board: AQMD2403BLS-M
The Brushless DC motor controller as been configured to run at
8E1@57600. The snag is that this board will not start at that speed on
power up. It starts at 8E1@9600 with a risk of the first packet to be
discarded.
The board has manually been set to 57600 baud by writing the two
registers with values:
- 0x0000 to register 0x0090
- 0xe100 to register 0x0091
using the W_REGISTERS(16) function. This data is stored in non-volatile
memory of the board, but it is first loaded when writing 0x0001 to
register 0x009d, and that must be done at every boot.
The initialization will downgrade to 9600 baud (board's default) and
then send the config change. That will immediately change baudrate and
the communication is flushed using a dummy transaction.
-->
<mesamodbus baudrate="57600" parity="E" stopbits="1" interval="50000" suspend="true">
<devices> <!-- Devices on the same bus -->
<device address="0x01" name="bldc" />
<device address="0x55" name="dummy" />
</devices>
<initlist> <!-- Initialization sequences -->
<!-- Default baudrate for bldc board at boot -->
<command baudrate="9600" />
<!-- Flush the bus so that the receiver is in a known state. -->
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
<!-- Set the board to the stored higher baudrate. -->
<command device="bldc" function="W_REGISTER" address="0x009d" timesout="true"><data value="1" /></command>
<!-- Restore our real baudrate -->
<command baudrate="57600" />
<!-- Again flush the bus so that the receiver is in a known state at the new baudrate. -->
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
</initlist>
<commands> <!-- Command function sequences and HAL pin assignments -->
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="S32" scale="1">
<pin name="rtpwm"/>
<pin name="rtcurrent"/>
<pin name="comfreq" modbustype="S_AB"/>
<pin skip="1" />
<pin name="rtpos" modbustype="S_ABCD" scale="0"/>
</command>
<!-- Gives us the following pins:
- hm2_modbus.0.bldc.rtpwm (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, u64)
- hm2_modbus.0.bldc.rtpwm.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, float)
- hm2_modbus.0.bldc.rtcurrent (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, u64)
- hm2_modbus.0.bldc.rtcurrent.scale (in, float) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, float)
- hm2_modbus.0.bldc.comfreq (out, s32) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, s64)
- hm2_modbus.0.bldc.comfreq.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, float)
- hm2_modbus.0.bldc.rtpos (out, s32) (range [-2147483648..+2147483647])
The start will be suspended (see top). The .scale pins will be set in
the hal-file. Offset pins are automatically initialized to zero.
Afterwards, the hal-file will enable communication.
-->
</commands>
</mesamodbus>

View File

@@ -0,0 +1,177 @@
# #######################################
#
# HAL file for HostMot2+Modbus with 3 steppers
#
# Based on the other examples in this directory.
#
# ########################################
#
# See also:
# hostmot2(9)
# hm2_modbus(9)
# mesambccc(1)
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# hostmot2 driver
loadrt hostmot2
# debug_modules=5
# load low-level driver
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](BOARD_IP) config=[HOSTMOT2](CONFIG)
# load the Modbus driver
loadrt hm2_modbus ports=[MODBUS](PORTS) mbccbs=[MODBUS](MBCCBS)
# load estop latch component
loadrt estop_latch
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf hm2_modbus.0.process servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# revel in the free time here from not having to run PID
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
addf estop-latch.0 servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# 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
# position command and feedback
net emcmot.00.pos-cmd <= joint.0.motor-pos-cmd
net emcmot.00.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net motor.00.pos-fb => joint.0.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.01.pos-cmd <= joint.1.motor-pos-cmd
net emcmot.01.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
net motor.01.pos-fb => joint.1.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.02.pos-cmd <= joint.2.motor-pos-cmd
net emcmot.02.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
net motor.02.pos-fb => joint.2.motor-pos-fb
# 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
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# A basic estop loop that only includes the hostmot watchdog.
net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset
net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in
net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-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

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<mesamodbus baudrate="38400" parity="E" interval="100000">
<devices>
<device name="rs485io" address="0x11" />
</devices>
<initlist>
</initlist>
<commands>
<command device="rs485io" address="0x1000" function="R_REGISTERS" modbustype="U_ABCD" haltype="HAL_U32" name="potu" count="2" />
<command device="rs485io" address="0x2000" function="R_REGISTERS" modbustype="S_ABCD" haltype="HAL_S32" name="pots" count="2" />
<command device="rs485io" address="0x3000" function="R_REGISTERS" modbustype="F_ABCD" haltype="HAL_FLOAT" name="potf" count="2" />
<command device="rs485io" address="0x4000" function="R_REGISTERS" modbustype="F_HGFEDCBA" haltype="HAL_FLOAT" name="potd" count="1" />
<command device="rs485io" address="0x0000" function="R_INPUTS" name="button" count="4" />
<command device="rs485io" address="0x0000" function="W_COILS" name="led" count="6" />
</commands>
</mesamodbus>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The Waveshare "Modbus RTU Relay (D)" has been pre-configured manually to
answer to Modbus Device ID 0x02.
You must write 0x0002 to register address 0x4000 with the W_REGISTER(6)
function for setting Modbus device ID 0x02.
Factory default seems to be input/relay linkage mode. To separate the
inputs and outputs you need to write the value 0x0000 to addresses
0x1000, 0x1001, 0x1002...0x1007 by using the W_REGISTERS(16) function or
individually using the W_REGISTER(6) function.
Note on setting baudrate on this device:
Setting 57600 works. However, faster does not seem to work stably,
especially when parity is enabled. Also take note that the parity even
has the value 0x01. The documentation specifies two tables with
contradicting information.
The 8E1@57600 setting was achieved by writing value 0x0104 to register
address 0x2000 using the W_REGISTER(6) function.
See also: https://www.waveshare.com/wiki/Modbus_RTU_Relay_(D)
-->
<mesamodbus baudrate="57600" parity="E" stopbits="1" interval="50000">
<devices> <!-- Devices on the same bus -->
<device address="0x02" name="wavebox"><description>A Waveshare "Modbus RTU Relay (D)" box</description></device>
<device address="0x55" name="dummy"><description>Dummy device, not actual on the bus</description></device>
</devices>
<initlist> <!-- Initialization sequences -->
<!--
The Waveshare "Modbus RTU Relay (D)" (wavebox) has the nasty habit of
not answering the very first packet it receives after power-up. It is
probably something in the firmware that causes the very first character
to be received with an error after boot.
We simply send a packet to a dummy device and mark it that no answer
will be received. The wavebox will automatically ignore it and will
enter a known responsive state.
-->
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
</initlist>
<commands> <!-- Command function sequences and HAL pin assignments -->
<command device="wavebox" function="R_INPUTS" address="0x0000" count="8" name="switch" />
<!-- Gives us the following pins:
- Eight switch inputs on the box are HAL output pins
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BIT)
* ...
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BIT)
-->
<!--
Note: We write at the /end/ of the list because writing only occurs if a
pin changes. Doing it last in the list makes the previous command more
timing stable because it is "seen" first every time when the timer runs.
Assuming that the interval is longer than the time it takes for the
commands to be handled.
-->
<command device="wavebox" function="W_COILS" address="0x0000" count="8" name="relay" />
<!-- Gives us the following pins:
- Eight relay outputs on the box are HAL input pins
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BIT)
* ...
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BIT)
-->
</commands>
</mesamodbus>

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=3x20
CONFIG="firmware=hm2/3x20-1/SV24.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=4i65
CONFIG="firmware=hm2/4i65/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=4i68
CONFIG="firmware=hm2/4i68/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i20
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i22
CONFIG="firmware=hm2/5i22-1.5/SVST8_8.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i22
CONFIG="firmware=hm2/5i22-1/SVST8_8.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i23
CONFIG="firmware=hm2/5i23/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_7i43
BOARD=7i43
CONFIG="firmware=hm2/7i43-4/SVST4_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_7i43
BOARD=7i43
CONFIG="firmware=hm2/7i43-2/SVST4_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,201 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_7i90
BOARD=7i90
CONFIG=""

View File

@@ -0,0 +1,202 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo-eth.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=192.168.1.121
BOARD=7i93
CONFIG="num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,202 @@
[EMC]
# The version string for this INI file.
VERSION = 1.1
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo
# 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., 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
[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]
# File containing interpreter variables
PARAMETER_FILE = hm2-servo.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-servo-eth.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 3.0
MAX_LINEAR_VELOCITY = 4.0
DEFAULT_LINEAR_ACCELERATION = 6.0
MAX_LINEAR_ACCELERATION = 7.0
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Y]
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = -81920
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 10.0
HOME = 0.000
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Y axis servo's encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[AXIS_Z]
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the Z axis servo's encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=192.168.1.121
BOARD=7i96s
CONFIG="num_encoders=3 num_pwmgens=3 num_stepgens=0"

View File

@@ -0,0 +1,19 @@
This configuration drives a 3-axis servo machine using a Mesa AnythingIO board with the HostMot2 firmware. The config will only run if you have the card installed and have installed the firmware.
See LinuxCNC_Documentation.pdf - 11.4 Mesa HostMot2 Driver section for more information.
All 3 axes use a home switch. All home switches are connected to a single shared input pin. X and Z home without encoder index, Y homes with encoder index.
No limit switches are used.
These configs have 3 Encoders, 3 PWMs, and 0 StepGens
5i22-big For the 1.5M gate version
5i22-small For the 1.0M gate version
7i43-big For the 400k gate version
7i43-small For the 200k gate version
3x20-small For the 1.0M gate version

View File

@@ -0,0 +1,230 @@
# #######################################
#
# HAL file for HostMot2 with 3 servos
#
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# standard components
loadrt pid num_chan=3
# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's going on in the syslog
#loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](BOARD_IP) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 40000
# ################################################
# 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 hm2_[HOSTMOT2](BOARD).0.write servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= joint.0.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [JOINT_0]INPUT_SCALE
net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => joint.0.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale [JOINT_0]OUTPUT_SCALE
net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
net emcmot.01.enable <= joint.1.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale [JOINT_1]INPUT_SCALE
net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.01.position => pid.1.feedback
net motor.01.pos-fb => joint.1.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.scale [JOINT_1]OUTPUT_SCALE
net emcmot.01.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.01.command pid.1.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable => pid.2.enable
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.enable
net emcmot.02.enable <= joint.2.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.scale [JOINT_2]INPUT_SCALE
net motor.02.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.02.position => pid.2.feedback
net motor.02.pos-fb => joint.2.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.scale [JOINT_2]OUTPUT_SCALE
net emcmot.02.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net motor.02.command pid.2.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.value
# ##################################################
# 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
#
# homing
#
#
# In this example, each of the three axes have their own home switch. All
# home switches are connected to GPIO 25, though hostmot2 boards generally
# have enough GPIO pins to put each axis' home switch on its own pin.
#
# Each switch is normally open, momentarily closed. When the switch is open,
# GPIO 25 floats high (because that is the hostmot2 way). When the switch is
# closed, it shorts GPIO 25 to ground.
#
# EMC expects the value on the .home-sw-in HAL pin to be active high, ie
# True when the switch is closed and False when the switch is open.
# We get this behavior by linking the GPIO .in_not pin instead of the .in
# pin.
#
net home-switch <= hm2_[HOSTMOT2](BOARD).0.gpio.025.in_not
net home-switch => joint.0.home-sw-in
net home-switch => joint.1.home-sw-in
net home-switch => joint.2.home-sw-in
# only the Y servo has an index, X and Z home without using the index
net y-index-enable hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable <=> joint.1.index-enable

View File

@@ -0,0 +1,230 @@
# #######################################
#
# HAL file for HostMot2 with 3 servos
#
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# standard components
loadrt pid num_chan=3
# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's going on in the syslog
#loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 40000
# ################################################
# 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 hm2_[HOSTMOT2](BOARD).0.write servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= joint.0.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [JOINT_0]INPUT_SCALE
net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => joint.0.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale [JOINT_0]OUTPUT_SCALE
net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ################
# Y [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
net emcmot.01.enable <= joint.1.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale [JOINT_1]INPUT_SCALE
net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.01.position => pid.1.feedback
net motor.01.pos-fb => joint.1.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.01.scale [JOINT_1]OUTPUT_SCALE
net emcmot.01.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.01.command pid.1.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value
# ################
# Z [2] Axis
# ################
# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE
net emcmot.02.enable => pid.2.enable
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.enable
net emcmot.02.enable <= joint.2.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.02.scale [JOINT_2]INPUT_SCALE
net motor.02.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.02.position => pid.2.feedback
net motor.02.pos-fb => joint.2.motor-pos-fb #push copy back to Axis GUI
# 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
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.scale [JOINT_2]OUTPUT_SCALE
net emcmot.02.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net motor.02.command pid.2.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.value
# ##################################################
# 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
#
# homing
#
#
# In this example, each of the three axes have their own home switch. All
# home switches are connected to GPIO 25, though hostmot2 boards generally
# have enough GPIO pins to put each axis' home switch on its own pin.
#
# Each switch is normally open, momentarily closed. When the switch is open,
# GPIO 25 floats high (because that is the hostmot2 way). When the switch is
# closed, it shorts GPIO 25 to ground.
#
# EMC expects the value on the .home-sw-in HAL pin to be active high, ie
# True when the switch is closed and False when the switch is open.
# We get this behavior by linking the GPIO .in_not pin instead of the .in
# pin.
#
net home-switch <= hm2_[HOSTMOT2](BOARD).0.gpio.025.in_not
net home-switch => joint.0.home-sw-in
net home-switch => joint.1.home-sw-in
net home-switch => joint.2.home-sw-in
# only the Y servo has an index, X and Z home without using the index
net y-index-enable hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable <=> joint.1.index-enable

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,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=3x20
CONFIG="firmware=hm2/3x20-1/SVST16_24.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,194 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=4i65
CONFIG="firmware=hm2/4i65/SVST8_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=4i68
CONFIG="firmware=hm2/4i68/SVST8_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i20
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i22
CONFIG="firmware=hm2/5i22-1.5/SVST8_8.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i22
CONFIG="firmware=hm2/5i22-1/SVST8_8.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i23
CONFIG="firmware=hm2/5i23/SVST8_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_7i43
BOARD=7i43
CONFIG="firmware=hm2/7i43-4/SVST4_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_7i43
BOARD=7i43
CONFIG="firmware=hm2/7i43-2/SVST4_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,196 @@
[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., 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
[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]
# 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-stepper-rpspi.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_rpspi
BOARD=7i90
CONFIG=""
SPICLK_RATE=12500

View File

@@ -0,0 +1,195 @@
[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., 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
[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]
# 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-stepper.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_7i90
BOARD=7i90
CONFIG=""

View File

@@ -0,0 +1,196 @@
[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., 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
[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]
# 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-stepper-eth.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=192.168.1.121
BOARD=7i93
CONFIG="num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,196 @@
[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., 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
[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]
# 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-stepper-eth.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
#No Content
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 100
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_0]
#
# Step timing is 40 us steplen + 40 us stepspace
# That gives 80 us step period = 12.5 KHz step freq
#
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
# such slow steppers.
#
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
#
# This gives a maxvel of 12.5/1 = 12.5 ips
#
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
# scale is 200 steps/rev * 5 revs/inch
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[AXIS_Z]
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 10
MAX_ACCELERATION = 20
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 12
STEPGEN_MAX_ACC = 24
BACKLASH = 0.000
SCALE = 1000
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
FERROR = 0.050
MIN_FERROR = 0.005
#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
HOME_SEQUENCE = 0
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 40000
STEPSPACE = 40000
[HOSTMOT2]
DRIVER=hm2_eth
BOARD_IP=192.168.1.121
BOARD=7i96s
CONFIG="num_encoders=0 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,15 @@
This configuration drives a 3-axis stepper machine using a Mesa Anything IO board with the HostMot2 firmware. No limit switches are used, so this should work with very basic hardware. The config will only run if you have the card installed and have installed the firmware.
See LinuxCNC_Documentation.pdf - 11.4 Mesa HostMot2 Driver section for more information.
These configs have 0 Encoders, 0 PWMs, and 3 StepGens
5i22-big For the 1.5M gate version
5i22-small For the 1.0M gate version
7i43-big For the 400k gate version
7i43-small For the 200k gate version
3x20-small For the 1.0M gate version

View File

@@ -0,0 +1,202 @@
# #######################################
#
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](BOARD_IP) config=[HOSTMOT2](CONFIG)
# load estop latch component
loadrt estop_latch
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# revel in the free time here from not having to run PID
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
addf estop-latch.0 servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# 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
# position command and feedback
net emcmot.00.pos-cmd <= joint.0.motor-pos-cmd
net emcmot.00.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net motor.00.pos-fb => joint.0.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.01.pos-cmd <= joint.1.motor-pos-cmd
net emcmot.01.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
net motor.01.pos-fb => joint.1.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.02.pos-cmd <= joint.2.motor-pos-cmd
net emcmot.02.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
net motor.02.pos-fb => joint.2.motor-pos-fb
# 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
#
# The Mesa AnyIO output pins can be in open-drain mode (drive low, float
# high) or push/pull mode (drive low, drive high).
#
# When a logical output is 1 in open-drain mode, the FPGA lets the pin
# float and it gets pulled high to +5V via a 10K resistor.
#
# When a logical output is 1 in push/pull mode, the FPGA pushes the pin
# high but only to +3.3V. This is problematic on some kinds of inputs.
#
#setp hm2_[HOSTMOT2](BOARD).0.gpio.048.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.049.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.054.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.055.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.060.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.061.is_opendrain 1
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# A basic estop loop that only includes the hostmot watchdog.
net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset
net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in
net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-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

View File

@@ -0,0 +1,202 @@
# #######################################
#
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG) spiclk_rate=[HOSTMOT2](SPICLK_RATE)
# load estop latch component
loadrt estop_latch
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# revel in the free time here from not having to run PID
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
addf estop-latch.0 servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# 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
# position command and feedback
net emcmot.00.pos-cmd <= joint.0.motor-pos-cmd
net emcmot.00.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net motor.00.pos-fb => joint.0.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.01.pos-cmd <= joint.1.motor-pos-cmd
net emcmot.01.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
net motor.01.pos-fb => joint.1.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.02.pos-cmd <= joint.2.motor-pos-cmd
net emcmot.02.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
net motor.02.pos-fb => joint.2.motor-pos-fb
# 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
#
# The Mesa AnyIO output pins can be in open-drain mode (drive low, float
# high) or push/pull mode (drive low, drive high).
#
# When a logical output is 1 in open-drain mode, the FPGA lets the pin
# float and it gets pulled high to +5V via a 10K resistor.
#
# When a logical output is 1 in push/pull mode, the FPGA pushes the pin
# high but only to +3.3V. This is problematic on some kinds of inputs.
#
#setp hm2_[HOSTMOT2](BOARD).0.gpio.048.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.049.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.054.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.055.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.060.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.061.is_opendrain 1
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# A basic estop loop that only includes the hostmot watchdog.
net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset
net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in
net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-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

View File

@@ -0,0 +1,202 @@
# #######################################
#
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ###################################
# Core EMC/HAL Loads
# ###################################
# 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
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
# load estop latch component
loadrt estop_latch
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# revel in the free time here from not having to run PID
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
addf estop-latch.0 servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# 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
# position command and feedback
net emcmot.00.pos-cmd <= joint.0.motor-pos-cmd
net emcmot.00.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net motor.00.pos-fb => joint.0.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.01.pos-cmd <= joint.1.motor-pos-cmd
net emcmot.01.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
net motor.01.pos-fb => joint.1.motor-pos-fb
# 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
# ################
# 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
# position command and feedback
net emcmot.02.pos-cmd <= joint.2.motor-pos-cmd
net emcmot.02.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
net motor.02.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
net motor.02.pos-fb => joint.2.motor-pos-fb
# 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
#
# The Mesa AnyIO output pins can be in open-drain mode (drive low, float
# high) or push/pull mode (drive low, drive high).
#
# When a logical output is 1 in open-drain mode, the FPGA lets the pin
# float and it gets pulled high to +5V via a 10K resistor.
#
# When a logical output is 1 in push/pull mode, the FPGA pushes the pin
# high but only to +3.3V. This is problematic on some kinds of inputs.
#
#setp hm2_[HOSTMOT2](BOARD).0.gpio.048.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.049.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.054.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.055.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.060.is_opendrain 1
#setp hm2_[HOSTMOT2](BOARD).0.gpio.061.is_opendrain 1
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# A basic estop loop that only includes the hostmot watchdog.
net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset
net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in
net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-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

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,5 @@
This configuration is to show how to connect the Mesa THCAD card with LinuxCNC on a Plasma Cutter.
There are two configurations, the plasma-5i20 that requires you to have a Mesa 5i20 installed and the plasma-demo using parallel port. The plasma-demo version is just to show how this config looks and is not a good candidate for the THCAD card due to the slow update speed when using a software encoder with the parallel port.
The subroutine touchoff.ngc is used with a floating head and the probe input to set the torch to the initial height of the cut. The example files x-trim.ngc and touchtest.ngc demonstrate the use of touchoff.ngc. The usage of touchoff.ngc requires you to have the probe input and Arc Ok input. It uses M66 to wait for the Arc Ok input after lighting off the torch. Three parameters are passed to touchoff pierce height, pierce delay, and cut height. In actual use you will need to adjust the height to raise the torch after touch off to Z0 to match your actual setup.

View File

@@ -0,0 +1,199 @@
# 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:
# <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>
# and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################
# ******************
# Core EMC/HAL Loads
# 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
loadrt hal_parport cfg=0x378
# hostmot2 driver
loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
# Torch Height Control
loadrt thc
addf thc servo-thread
# THREADS
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
addf parport.0.read servo-thread
addf parport.0.write servo-thread
# #############################################
# Axis-of-motion Specific Configs (not the GUI)
# **********
# 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
# position command and feedback
net emcmot.00.pos-cmd <= joint.0.motor-pos-cmd
net emcmot.00.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net motor.00.pos-fb => joint.0.motor-pos-fb
# 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 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
net both-home-x <= parport.0.pin-10-in-not
net both-home-x => joint.0.home-sw-in
net both-home-x => joint.0.neg-lim-sw-in
net both-home-x => joint.0.pos-lim-sw-in
# ################
# 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
# position command and feedback
net emcmot.01.pos-cmd <= joint.1.motor-pos-cmd
net emcmot.01.pos-cmd => hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
net motor.01.pos-fb => joint.1.motor-pos-fb
# 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 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
net both-home-y <= parport.0.pin-11-in-not
net both-home-y => joint.1.home-sw-in
net both-home-y => joint.1.neg-lim-sw-in
net both-home-y => joint.1.pos-lim-sw-in
# ################
# 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
# position command and feedback
# hijack position command and feed through thc
net emcmot.02.pos-cmd thc.z-pos-in <= joint.2.motor-pos-cmd
net thc-pos-cmd thc.z-pos-out => hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
net motor.02.pos-fb joint.2.motor-pos-fb <= thc.z-fb-out
net both-home-z => joint.2.home-sw-in
net both-home-z => joint.2.neg-lim-sw-in
net both-home-z => joint.2.pos-lim-sw-in
# 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 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
net both-home-z <= parport.0.pin-12-in-not
net both-home-z => joint.2.home-sw-in
net both-home-z => joint.2.neg-lim-sw-in
net both-home-z => joint.2.pos-lim-sw-in
#######################
# 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
# Touch Off
net torch-probe motion.probe-input <= parport.0.pin-13-in-not
# Set up the Encoder for the THC
setp hm2_5i20.0.encoder.00.counter-mode 1
net thc-vel-in hm2_5i20.0.encoder.00.velocity => thc.encoder-vel
setp thc.scale-offset 119000
setp thc.vel-scale 0.00037866834
# this might need to be increased
setp thc.correction-vel 0.0001
# spindle on starts the arc
net spindle-on spindle.0.on => parport.0.pin-16-out
net spindle-on thc.torch-on
# starts the motion when the plasma arc has transferred to the work
net start-motion-input thc.arc-ok <= motion.digital-in-00 <= parport.0.pin-15-in
# ******
# For Joypad, the rest are in postgui.hal
loadusr hal_input -W -KRAL Dual

View File

@@ -0,0 +1,169 @@
; This configuration is based on the hostmot2 stepper configuration
[EMC]
# The version string for this INI file.
VERSION = 1.1
MACHINE = Plasma-THC
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
[DISPLAY]
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# 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
MAX_LINEAR_VELOCITY = 4
DEFAULT_LINEAR_VELOCITY = 1.6
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 3
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
#EDITOR = geany
PYVCP = plasma.xml
[FILTER]
#No Content
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = plasma.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 = plasma-5i20.hal
POSTGUI_HALFILE = postgui.hal
HALUI = halui
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
[HALUI]
# Rapid to Machine Home
MDI_COMMAND = G53 G0 X0 Y0 Z0
[TRAJ]
COORDINATES = X Y Z
#HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
NO_FORCE_HOMING = 1
[EMCIO]
# tool table file
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -50.0
MAX_LIMIT = 51.0
MAX_VELOCITY = 7
MAX_ACCELERATION = 125
[JOINT_0]
# X Axis
TYPE = LINEAR
MAX_VELOCITY = 7
MAX_ACCELERATION = 125
STEPGEN_MAXACCEL = 150
BACKLASH = 0.000
SCALE = 3180
MIN_LIMIT = -50.0
MAX_LIMIT = 51.0
FERROR = 0.050
MIN_FERROR = 0.005
HOME = 0.000
HOME_OFFSET = -0.250
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = -0.025
HOME_FINAL_VEL = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
[AXIS_Y]
MIN_LIMIT = -36
MAX_LIMIT = 36
MAX_VELOCITY = 6.75
MAX_ACCELERATION = 125
[JOINT_1]
# Y Axis
TYPE = LINEAR
MAX_VELOCITY = 6.75
MAX_ACCELERATION = 125
STEPGEN_MAXACCEL = 150
BACKLASH = 0.000
SCALE = 2985
MIN_LIMIT = -36
MAX_LIMIT = 36
FERROR = 0.050
MIN_FERROR = 0.005
HOME = 0.000
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = 0.025
HOME_FINAL_VEL = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 4
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 50
[JOINT_2]
# Z Axis
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 50
STEPGEN_MAXACCEL = 55
BACKLASH = 0.000
SCALE = 20000
MIN_LIMIT = -4.0
MAX_LIMIT = 4
FERROR = 0.050
MIN_FERROR = 0.005
HOME = 0.000
HOME_OFFSET = 0.50
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.025
HOME_FINAL_VEL = 1
# these are in nanoseconds
DIRSETUP = 200
DIRHOLD = 200
STEPLEN = 1000
STEPSPACE = 2000
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i20
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=1 num_pwmgens=0 num_stepgens=3"

View File

@@ -0,0 +1,107 @@
# Generated by stepconf at Sat Apr 16 07:47:05 2011
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0x378 out "
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf stepgen.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
# Torch Height Control
loadrt encoder
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread
loadrt thc
addf thc servo-thread
net spindle-cmd <= spindle.0.speed-out
net spindle-on <= spindle.0.on
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net spindle-on => parport.0.pin-08-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 15200
setp stepgen.0.dirsetup 15200
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 xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 15200
setp stepgen.1.dirsetup 15200
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 ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 15200
setp stepgen.2.dirsetup 15200
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 zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
#loadusr -W hal_manualtoolchange
#net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
#net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
#net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
#net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# Touch Off
net torch-probe motion.probe-input <= parport.0.pin-13-in-not
# Set up the Encoder for the THC
setp encoder.0.counter-mode 1
net thc-vel-in encoder.0.velocity => thc.encoder-vel
setp thc.scale-offset 119000
setp thc.vel-scale 0.00037866834
# this might need to be increased
setp thc.correction-vel 0.0001
# spindle on starts the arc
net spindle-on spindle.0.on => parport.0.pin-16-out
net spindle-on thc.torch-on
# starts the motion when the plasma arc has transferred to the work
net start-motion-input thc.arc-ok <= motion.digital-in-00 <= parport.0.pin-15-in

View File

@@ -0,0 +1,127 @@
; This configuration is based on the Step Config Wizard generated configuration.
; It is included to show what the Axis GUI looks like until you get a 5i20
; The thc comp will work rather poorly on a parallel port input unless you have
; an extremely good latency and can have a fast base thread.
[EMC]
# The version string for this INI file.
VERSION = 1.1
MACHINE = plasma
DEBUG = 0
[DISPLAY]
DISPLAY = axis
#EDITOR = geany
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ../../nc_files/
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PYVCP = plasma.xml
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3
[RS274NGC]
PARAMETER_FILE = emc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = plasma-demo.hal
POSTGUI_HALFILE = postgui.hal
[HALUI]
# add halui MDI commands here (max 64)
# Rapid to Machine Home
MDI_COMMAND = G53 G0 X0 Y0 Z0
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00
[EMCIO]
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins
JOINTS = 3
[AXIS_X]
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
[JOINT_0]
# X Axis
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
[AXIS_Y]
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
[JOINT_1]
# Y Axis
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
[AXIS_Z]
MIN_LIMIT = -4.0
MAX_LIMIT = 0.01
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
[JOINT_2]
# Z Axis
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -4.0
MAX_LIMIT = 0.01
HOME_OFFSET = 0.0

View File

@@ -0,0 +1,99 @@
[175654.344093] I-pipe: Domain RTAI registered.
[175654.344104] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[175654.344107] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[175654.344115] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[175654.344118] PIPELINE layers:
[175654.344121] e0af4000 9ac15d93 RTAI 200
[175654.344123] c0383180 0 Linux 100
[175654.361183] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[175654.361575] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[175654.361582] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[175654.361586] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 2400241000 hz.
[175654.361589] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[175654.472379] RTAI[math]: loaded.
[175654.509879] RTAPI: Init
[175654.509934] RTAPI: Init complete
[175654.523048] HAL_LIB: loading kernel lib
[175654.523055] RTAPI: initing module HAL_LIB
[175654.523059] RTAPI: module 'HAL_LIB' loaded, ID: 1
[175654.523407] RTAPI: shmem 01 created by module 01, key: 1212238898, size: 262000
[175654.523416] HAL_LIB: kernel lib installed successfully
[175654.615892] config string '0x378'
[175654.629887] hm2: loading Mesa HostMot2 driver version 0.15
[175654.635022] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.6
[175654.637533] hm2_pci: discovered 5i20 at 0000:02:03.0
[175654.769217] hm2/hm2_5i20.0: 72 I/O Pins used:
[175654.769224] hm2/hm2_5i20.0: IO Pin 000 (P2-01): IOPort
[175654.769227] hm2/hm2_5i20.0: IO Pin 001 (P2-03): IOPort
[175654.769231] hm2/hm2_5i20.0: IO Pin 002 (P2-05): Encoder #0, pin B (Input)
[175654.769235] hm2/hm2_5i20.0: IO Pin 003 (P2-07): Encoder #0, pin A (Input)
[175654.769239] hm2/hm2_5i20.0: IO Pin 004 (P2-09): IOPort
[175654.769242] hm2/hm2_5i20.0: IO Pin 005 (P2-11): Encoder #0, pin Index (Input)
[175654.769246] hm2/hm2_5i20.0: IO Pin 006 (P2-13): IOPort
[175654.769249] hm2/hm2_5i20.0: IO Pin 007 (P2-15): IOPort
[175654.769252] hm2/hm2_5i20.0: IO Pin 008 (P2-17): IOPort
[175654.769255] hm2/hm2_5i20.0: IO Pin 009 (P2-19): IOPort
[175654.769258] hm2/hm2_5i20.0: IO Pin 010 (P2-21): IOPort
[175654.769262] hm2/hm2_5i20.0: IO Pin 011 (P2-23): IOPort
[175654.769265] hm2/hm2_5i20.0: IO Pin 012 (P2-25): IOPort
[175654.769268] hm2/hm2_5i20.0: IO Pin 013 (P2-27): IOPort
[175654.769271] hm2/hm2_5i20.0: IO Pin 014 (P2-29): IOPort
[175654.769274] hm2/hm2_5i20.0: IO Pin 015 (P2-31): IOPort
[175654.769277] hm2/hm2_5i20.0: IO Pin 016 (P2-33): IOPort
[175654.769280] hm2/hm2_5i20.0: IO Pin 017 (P2-35): IOPort
[175654.769283] hm2/hm2_5i20.0: IO Pin 018 (P2-37): IOPort
[175654.769287] hm2/hm2_5i20.0: IO Pin 019 (P2-39): IOPort
[175654.769290] hm2/hm2_5i20.0: IO Pin 020 (P2-41): IOPort
[175654.769293] hm2/hm2_5i20.0: IO Pin 021 (P2-43): IOPort
[175654.769296] hm2/hm2_5i20.0: IO Pin 022 (P2-45): IOPort
[175654.769299] hm2/hm2_5i20.0: IO Pin 023 (P2-47): IOPort
[175654.769302] hm2/hm2_5i20.0: IO Pin 024 (P3-01): IOPort
[175654.769305] hm2/hm2_5i20.0: IO Pin 025 (P3-03): IOPort
[175654.769308] hm2/hm2_5i20.0: IO Pin 026 (P3-05): IOPort
[175654.769311] hm2/hm2_5i20.0: IO Pin 027 (P3-07): IOPort
[175654.769315] hm2/hm2_5i20.0: IO Pin 028 (P3-09): IOPort
[175654.769318] hm2/hm2_5i20.0: IO Pin 029 (P3-11): IOPort
[175654.769321] hm2/hm2_5i20.0: IO Pin 030 (P3-13): IOPort
[175654.769324] hm2/hm2_5i20.0: IO Pin 031 (P3-15): IOPort
[175654.769327] hm2/hm2_5i20.0: IO Pin 032 (P3-17): IOPort
[175654.769330] hm2/hm2_5i20.0: IO Pin 033 (P3-19): IOPort
[175654.769333] hm2/hm2_5i20.0: IO Pin 034 (P3-21): IOPort
[175654.769336] hm2/hm2_5i20.0: IO Pin 035 (P3-23): IOPort
[175654.769339] hm2/hm2_5i20.0: IO Pin 036 (P3-25): IOPort
[175654.769342] hm2/hm2_5i20.0: IO Pin 037 (P3-27): IOPort
[175654.769346] hm2/hm2_5i20.0: IO Pin 038 (P3-29): IOPort
[175654.769349] hm2/hm2_5i20.0: IO Pin 039 (P3-31): IOPort
[175654.769352] hm2/hm2_5i20.0: IO Pin 040 (P3-33): IOPort
[175654.769355] hm2/hm2_5i20.0: IO Pin 041 (P3-35): IOPort
[175654.769358] hm2/hm2_5i20.0: IO Pin 042 (P3-37): IOPort
[175654.769361] hm2/hm2_5i20.0: IO Pin 043 (P3-39): IOPort
[175654.769364] hm2/hm2_5i20.0: IO Pin 044 (P3-41): IOPort
[175654.769367] hm2/hm2_5i20.0: IO Pin 045 (P3-43): IOPort
[175654.769370] hm2/hm2_5i20.0: IO Pin 046 (P3-45): IOPort
[175654.769373] hm2/hm2_5i20.0: IO Pin 047 (P3-47): IOPort
[175654.769377] hm2/hm2_5i20.0: IO Pin 048 (P4-01): StepGen #0, pin Step (Output)
[175654.769381] hm2/hm2_5i20.0: IO Pin 049 (P4-03): StepGen #0, pin Direction (Output)
[175654.769385] hm2/hm2_5i20.0: IO Pin 050 (P4-05): IOPort
[175654.769388] hm2/hm2_5i20.0: IO Pin 051 (P4-07): IOPort
[175654.769391] hm2/hm2_5i20.0: IO Pin 052 (P4-09): IOPort
[175654.769394] hm2/hm2_5i20.0: IO Pin 053 (P4-11): IOPort
[175654.769398] hm2/hm2_5i20.0: IO Pin 054 (P4-13): StepGen #1, pin Step (Output)
[175654.769402] hm2/hm2_5i20.0: IO Pin 055 (P4-15): StepGen #1, pin Direction (Output)
[175654.769406] hm2/hm2_5i20.0: IO Pin 056 (P4-17): IOPort
[175654.769409] hm2/hm2_5i20.0: IO Pin 057 (P4-19): IOPort
[175654.769412] hm2/hm2_5i20.0: IO Pin 058 (P4-21): IOPort
[175654.769415] hm2/hm2_5i20.0: IO Pin 059 (P4-23): IOPort
[175654.769419] hm2/hm2_5i20.0: IO Pin 060 (P4-25): StepGen #2, pin Step (Output)
[175654.769423] hm2/hm2_5i20.0: IO Pin 061 (P4-27): StepGen #2, pin Direction (Output)
[175654.769427] hm2/hm2_5i20.0: IO Pin 062 (P4-29): IOPort
[175654.769430] hm2/hm2_5i20.0: IO Pin 063 (P4-31): IOPort
[175654.769433] hm2/hm2_5i20.0: IO Pin 064 (P4-33): IOPort
[175654.769436] hm2/hm2_5i20.0: IO Pin 065 (P4-35): IOPort
[175654.769439] hm2/hm2_5i20.0: IO Pin 066 (P4-37): IOPort
[175654.769442] hm2/hm2_5i20.0: IO Pin 067 (P4-39): IOPort
[175654.769445] hm2/hm2_5i20.0: IO Pin 068 (P4-41): IOPort
[175654.769448] hm2/hm2_5i20.0: IO Pin 069 (P4-43): IOPort
[175654.769451] hm2/hm2_5i20.0: IO Pin 070 (P4-45): IOPort
[175654.769455] hm2/hm2_5i20.0: IO Pin 071 (P4-47): IOPort
[175654.769637] hm2/hm2_5i20.0: registered
[175654.769640] hm2_5i20.0: initialized AnyIO board at 0000:02:03.0

View File

@@ -0,0 +1,164 @@
<pyvcp>
<hbox>
<checkbutton>
<text>"THC Enable"</text>
<halpin>"thc-enable"</halpin>
</checkbutton>
</hbox>
<labelframe text="THC Settings">
<hbox>
<vbox>
<label>
<text>"Vel Tolerance "</text>
<font>("Helvetica",10)</font>
</label>
<label>
<text>"Volts Setting "</text>
<font>("Helvetica",10)</font>
</label>
<label>
<text>"Volts Tolerance"</text>
<font>("Helvetica",10)</font>
</label>
</vbox>
<vbox>
<spinbox>
<width>"5"</width>
<halpin>"vel-tol"</halpin>
<min_>.01</min_>
<max_>1</max_>
<resolution>0.01</resolution>
<initval>0.2</initval>
<format>"1.2f"</format>
<font>("Arial",10)</font>
</spinbox>
<spinbox>
<width>"5"</width>
<halpin>"volts-requested"</halpin>
<min_>0</min_>
<max_>200</max_>
<resolution>1</resolution>
<font>("Helvetica",10)</font>
<format>"1.0f"</format>
<font>("Arial",10)</font>
<initval>1</initval>
</spinbox>
<spinbox>
<width>"5"</width>
<font>("Helvetica",10)</font>
<halpin>"volts-tolerance"</halpin>
<resolution>0.1</resolution>
<initval>1</initval>
<min_>0</min_>
<max_>10</max_>
</spinbox>
</vbox>
</hbox>
</labelframe>
<labelframe text="Arc Volts Status">
<hbox>
<vbox>
<label>
<text>"Under"</text>
<font>("Helvetica",10)</font>
</label>
<rectled>
<halpin>"volts-under"</halpin>
<height>"20"</height>
<width>"40"</width>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</rectled>
</vbox>
<vbox>
<label>
<text>"OK"</text>
<font>("Helvetica",10)</font>
</label>
<rectled>
<halpin>"volts-ok"</halpin>
<height>"20"</height>
<width>"40"</width>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</rectled>
</vbox>
<vbox>
<label>
<text>"Over"</text>
<font>("Helvetica",10)</font>
</label>
<rectled>
<halpin>"volts-high"</halpin>
<height>"20"</height>
<width>"40"</width>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</rectled>
</vbox>
</hbox>
</labelframe>
<labelframe text="Status">
<hbox>
<vbox>
<label>
<text>"Velocity"</text>
<font>("Helvetica",10)</font>
</label>
<rectled>
<halpin>"vel-status"</halpin>
<height>"20"</height>
<width>"40"</width>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</rectled>
</vbox>
<vbox>
<label>
<text>"Arc"</text>
<font>("Helvetica",10)</font>
</label>
<rectled>
<halpin>"arc-ok"</halpin>
<height>"20"</height>
<width>"40"</width>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</rectled>
</vbox>
<vbox>
<label>
<text>"Offset"</text>
<font>("Helvetica",10)</font>
</label>
<number>
<halpin>"offset"</halpin>
<font>("Helvetica",10)</font>
<format>"+4.4f"</format>
</number>
</vbox>
</hbox>
</labelframe>
<label text="Actual Volts"/>
<meter>
<halpin>"actual-volts"</halpin>
<text>"Torch"</text>
<subtext>"Volts"</subtext>
<size>150</size>
<min_>0</min_>
<max_>200</max_>
<majorscale>25</majorscale>
<minorscale>5</minorscale>
</meter>
<labelframe text="MDI Commands">
<button>
<halpin>"rapid-to-home"</halpin>
<text>"Rapid to Home"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>

View File

@@ -0,0 +1,16 @@
# THC connections
net thc-enable pyvcp.thc-enable thc.enable
net thc-voltmeter pyvcp.actual-volts thc.volts
net thc-voltset pyvcp.volts-requested thc.volts-requested
net thc-req-vel thc.requested-vel <= motion.requested-vel
net thc-cur-vel thc.current-vel <= motion.current-vel
net thc-vel-status pyvcp.vel-status thc.vel-status
net thc-vel-tol pyvcp.vel-tol thc.vel-tol
#net thc-volts-tol pyvcp.volts-tolerance-i thc.volts-tol
# MDI commands
# rapid to home button
net remote-rapid-home halui.mdi-command-00 <= pyvcp.rapid-to-home

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