Sorry about that,
Please let me know if you are able to view these files, if not I can send a 
direct email to you with them, I also attached them as .txt if googles 
security servers are not letting you download the .hal file itself. I also 
have copied the text below, so hopefully if all else fails that will 
work.Thank you for the quick response we really appreciate it!
Thank you, Bradley Turner



INI:


[PRUCONF]
DRIVER=hal_pru_generic
CONFIG=pru=0 num_stepgens=5 num_pwmgens=6
PRUBIN=xenomai/pru_generic.bin
#MPCNC

[EMC]

# Name of machine, for use with display, etc.
MACHINE =               MPCNC-BCNC-CRAMPS

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG =                0x00000003
#DEBUG =                0x00000007
DEBUG = 5




[DISPLAY]

# Name of display program, e.g., tkemc
#DISPLAY = tkemc
#DISPLAY = gscreen
DISPLAY = axis

# Touchy currently won't work without some hardware buttons/jog-wheel
#DISPLAY = touchy

# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME =            0.200

# Path to help file
HELP_FILE =             tklinucnc.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 =     4

# Max jog speed (This is in mm per second.)
MAX_LINEAR_VELOCITY = 200
MIN_LNEAR_VELOCITY = 1

DEFAULT_LINEAR_VELOCITY =20




# Prefix to be used
PROGRAM_PREFIX = /home/machinekit/machinekit/nc_files

# Introductory graphic
INTRO_GRAPHIC =         machinekit.gif
INTRO_TIME =            5

# Increments for the JOG section
INCREMENTS = 10 1 0.1 0.01

# This is the temperature display - not needed for this
#PYVCP = 3D.Temps.panel.xml

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python


[TASK]

# Name of task controller program, e.g., milltask
TASK =                  milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME =            0.010




[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE =        pru-stepper.var




[EMCMOT]
#This is the real time motion component
#You can read up on this here 
http://linuxcnc.org/docs/html/man/man9/motion.9.html
EMCMOT =                motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT =          1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT =             0.010

# Servo task period, in nanoseconds
SERVO_PERIOD =          1000000
BASE_PERIOD = 79375

[PENDANT]
SPEED_1 = 20
SPEED_2 = 30
SPEED_3 = 60


[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 = CRAMPS.hal

# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD =               save neta

POSTGUI_HALFILE =       3D.postgui.hal
POSTGUI_HALFILE = custom_postgui.hal
HALUI = halui


[TRAJ]

#JOINTS =                5
AXES =                  4
COORDINATES =           X Y Z A
#MAX_ANGULAR_VELOCITY = 45.00
#DEFAULT_ANGULAR_VELOCITY = 4.50
LINEAR_UNITS =          mm
ANGULAR_UNITS =         degree
CYCLE_TIME =            0.010
DEFAULT_VELOCITY = 5

DEFAULT_ACCELERATION = 400
CYCLE_TIME =            0.010
MAX_LINEAR_VELOCITY = 20.00





[AXIS_0]
#X Axis

# 
# 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 doesnt 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 =       200.0
MAX_ACCELERATION =   3000.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    240.0
STEPGEN_MAX_ACC =    3600.0

BACKLASH =           0.000

# scale is 200 steps/rev * 5 revs/inch
SCALE =  -200

MIN_LIMIT =             -1.0
MAX_LIMIT =             220.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         1

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# These are settings for DRV8825 Polulo
# these are in nanoseconds
#DIRSETUP   =              650
#DIRHOLD    =              650
#STEPLEN    =              1900
#STEPSPACE  =              1900

#http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing
# There are settings for a A4988 Polulo
# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_1]
#Y1

TYPE =              LINEAR
MAX_VELOCITY =       20.0
MAX_ACCELERATION =   300.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    2.0
STEPGEN_MAX_ACC =    3.0

BACKLASH =           0.000

SCALE =  200

MIN_LIMIT =             -1.0
MAX_LIMIT =             250.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         2

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_2]

TYPE =              LINEAR
MAX_VELOCITY =      200
MAX_ACCELERATION =  300
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    6.0
STEPGEN_MAX_ACC =    125.0

BACKLASH =           0.000

#SCALE = 1511.81102362
SCALE = 200

MIN_LIMIT =             -10.0
MAX_LIMIT =             200.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         0

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_3]
#Axis A
TYPE = ANGULAR
MAX_VELOCITY = 31.8993189453
MAX_ACCELERATION = 3000.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 3.0
STEPGEN_MAX_ACC = 37.0

BACKLASH =           0.000

#SCALE = -744.530002058
SCALE = -1489.06
#SCALE = -732.32

MIN_LIMIT = -9999.0
MAX_LIMIT = 999999999.0

FERROR = 1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         0

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[EMCIO]

# Name of IO controller program, e.g., io
EMCIO =                 io

# cycle time, in seconds
CYCLE_TIME =            0.100

# tool table file
TOOL_TABLE =            tool.tbl



HAL:


# #######################################
#
# HAL file for BeagleBone + CRAMPS cape with 5 steppers BCNC
#
# Derived from example hm2-stepper config
#
# ########################################

# Launch the setup script to make sure hardware setup looks good
loadusr -w ./setup.sh


# ###################################
# Core EMC/HAL Loads
# ###################################

# kinematics
loadrt trivkins

# motion controller, get name and thread periods from ini file
# trajectory planner
loadrt tp
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD 
num_joints=[TRAJ]AXES tp=tp kins=trivkins


# load low-level drivers
loadrt hal_bb_gpio output_pins=816,822,823,824,825,826,914,923,925 
input_pins=807,808,809,810,817,911,913
loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) 
[PRUCONF](CONFIG) halname=hpg
#loadrt pid count=2

###################################
#This enables gantry configs
###################################

newinst gantry gantryY.0 pincount=2

###################################

loadrt limit1 count=2


# Python user-mode HAL module to read ADC value and generate a thermostat 
output for PWM
# c = analog input channel and thermistor table
# loadusr -Wn Therm hal_temp_bbb -n Therm -c 
04:epcos_B57560G1104,05:epcos_B57560G1104 -b CRAMPS

# ################################################
# THREADS
# ################################################

addf hpg.capture-position                 servo-thread
addf bb_gpio.read                         servo-thread
addf motion-command-handler               servo-thread
addf gantryY.0.read                       servo-thread
addf motion-controller                    servo-thread


#addf pid.0.do-pid-calcs                  servo-thread
#addf pid.1.do-pid-calcs                  servo-thread


addf gantryY.0.write                      servo-thread


addf limit1.0                             servo-thread
addf limit1.1                             servo-thread
addf hpg.update                           servo-thread
addf bb_gpio.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 <= axis.0.amp-enable-out
net emcmot.00.enable => hpg.stepgen.00.enable


# position command and feedback
net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd

net motor.00.pos-fb <= hpg.stepgen.00.position-fb
net motor.00.pos-fb => axis.0.motor-pos-fb


# timing parameters
setp hpg.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp hpg.stepgen.00.dirhold         [AXIS_0]DIRHOLD

setp hpg.stepgen.00.steplen         [AXIS_0]STEPLEN
setp hpg.stepgen.00.stepspace       [AXIS_0]STEPSPACE

setp hpg.stepgen.00.position-scale  [AXIS_0]SCALE

setp hpg.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
setp hpg.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC

#setp hpg.stepgen.00.step_type       0
# P8.43 PRU1.out2
setp hpg.stepgen.00.steppin        813
# P8.44 PRU1.out4
setp hpg.stepgen.00.dirpin         812


# ################
# Y Axis Gantry
# ################

net y1pos-cmd gantryY.0.joint.00.pos-cmd => hpg.stepgen.02.position-cmd
net y1pos-fb  gantryY.0.joint.00.pos-fb  <= hpg.stepgen.02.position-fb
net y2pos-cmd gantryY.0.joint.01.pos-cmd => hpg.stepgen.03.position-cmd
net y2pos-fb  gantryY.0.joint.01.pos-fb  <= hpg.stepgen.03.position-fb
net ypos-cmd  gantryY.0.position-cmd     <= axis.1.motor-pos-cmd
net ypos-fb   gantryY.0.position-fb      => axis.1.motor-pos-fb
net yenable axis.1.amp-enable-out => hpg.stepgen.02.enable 
hpg.stepgen.03.enable
setp gantryY.0.search-vel [AXIS_1]HOME_SEARCH_VEL

# y1-axis
setp hpg.stepgen.02.position-scale [AXIS_1]SCALE
setp hpg.stepgen.02.steplen [AXIS_1]STEPLEN
setp hpg.stepgen.02.stepspace [AXIS_1]STEPSPACE
setp hpg.stepgen.02.dirhold [AXIS_1]DIRHOLD
setp hpg.stepgen.02.dirsetup [AXIS_1]DIRSETUP
setp hpg.stepgen.02.maxaccel [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.01.steppin         144
#setp hpg.stepgen.01.dirpin          145
#setp hpg.stepgen.02.step_type       0
# P8.42 PRU1.out5
setp hpg.stepgen.02.steppin        815
# P8.39 PRU1.out6
setp hpg.stepgen.02.dirpin         814

# y2-axis
setp hpg.stepgen.03.position-scale [AXIS_1]SCALE
setp hpg.stepgen.03.steplen [AXIS_1]STEPLEN
setp hpg.stepgen.03.stepspace [AXIS_1]STEPSPACE
setp hpg.stepgen.03.dirhold [AXIS_1]DIRHOLD
setp hpg.stepgen.03.dirsetup [AXIS_1]DIRSETUP
setp hpg.stepgen.03.maxaccel [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.02.steppin         52
#setp hpg.stepgen.02.dirpin          147
#setp hpg.stepgen.03.step_type       0
setp hpg.stepgen.03.steppin        917
setp hpg.stepgen.03.dirpin         918





#######################################################
# GETTING THE GANTRY HOME SWITCHES SETUP
########################################################
# TODO this can be deleted just a refer to the cramps pins
#net limit-x-min <= bb_gpio.p8.in-08
#net limit-x-max <= bb_gpio.p8.in-07
#net limit-y-min <= bb_gpio.p8.in-10
#net limit-y-max <= bb_gpio.p8.in-09
#net limit-z-min <= bb_gpio.p9.in-13
#net limit-z-max <= bb_gpio.p9.in-11



####################################
### X- AXIS GANTRY  ################
####################################
# debounce the X-axis switches and connect them to signals
#net switches-x1 <= bb_gpio.p8.in-08
#net switches-x2 <= bb_gpio.p8.in-07

# join the home switch signals so that both switches have to be closed to 
trigger a home position
#net switches-x1 => gantryX.0.joint.00.home
#net switches-x2 => gantryX.0.joint.01.home
#net home-x <= gantryX.0.home
#net home-x => axis.0.home-sw-in
#net limit-x <= gantryX.0.limit
#net limit-x => axis.0.neg-lim-sw-in

####################################
### Y- AXIS GANTRY  ################
####################################
# debounce the y-axis switches and connect them to signals
##net switches-y1 <= bb_gpio.p8.in-10
##net switches-y2 <= bb_gpio.p8.in-09

# join the home switch signals so that both switches have to be closed to 
trigger a home position
##net switches-y1 => gantryY.0.joint.00.home
##net switches-y2 => gantryY.0.joint.01.home
##net home-y <= gantryY.0.home
##net home-y => axis.1.home-sw-in
##net limit-y <= gantryY.0.limit
##net limit-y => axis.1.neg-lim-sw-in

####################################
### Z AXIS  ################
####################################

##net limit-z-min <= bb_gpio.p9.in-13
##net both-home-z-max <= bb_gpio.p9.in-11
##net both-home-z-max => axis.2.pos-lim-sw-in
##net limit-z-min => axis.2.neg-lim-sw-in
##net both-home-z-max => axis.2.home-sw-in




# axis enable chain
#newsig emcmot.00.enable bit
#sets emcmot.00.enable FALSE

#net emcmot.00.enable <= axis.0.amp-enable-out
#net emcmot.00.enable => hpg.stepgen.00.enable


# position command and feedback
#net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
#net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd

#net motor.00.pos-fb <= hpg.stepgen.00.position-fb
#net motor.00.pos-fb => axis.0.motor-pos-fb


# timing parameters
#setp hpg.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
#setp hpg.stepgen.00.dirhold         [AXIS_0]DIRHOLD

#setp hpg.stepgen.00.steplen         [AXIS_0]STEPLEN
#setp hpg.stepgen.00.stepspace       [AXIS_0]STEPSPACE

#setp hpg.stepgen.00.position-scale  [AXIS_0]SCALE

#setp hpg.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
#setp hpg.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC

#setp hpg.stepgen.00.step_type       0
# P8.43 PRU1.out2
#setp hpg.stepgen.00.steppin        813
# P8.44 PRU1.out4
#setp hpg.stepgen.00.dirpin         812





# ################
# Y [1] Axis
# ################

# axis enable chain
#newsig emcmot.01.enable bit
#sets emcmot.01.enable FALSE

#net emcmot.01.enable <= axis.1.amp-enable-out
#net emcmot.01.enable => hpg.stepgen.01.enable


# position command and feedback
#net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd
#net emcmot.01.pos-cmd => hpg.stepgen.01.position-cmd

#net motor.01.pos-fb <= hpg.stepgen.01.position-fb
#net motor.01.pos-fb => axis.1.motor-pos-fb


# timing parameters
#setp hpg.stepgen.01.dirsetup        [AXIS_1]DIRSETUP
#setp hpg.stepgen.01.dirhold         [AXIS_1]DIRHOLD

#setp hpg.stepgen.01.steplen         [AXIS_1]STEPLEN
#setp hpg.stepgen.01.stepspace       [AXIS_1]STEPSPACE

#setp hpg.stepgen.01.position-scale  [AXIS_1]SCALE

#setp hpg.stepgen.01.maxvel          [AXIS_1]STEPGEN_MAX_VEL
#setp hpg.stepgen.01.maxaccel        [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.01.step_type       0
# P8.42 PRU1.out5
#setp hpg.stepgen.01.steppin        815
# P8.39 PRU1.out6
#setp hpg.stepgen.01.dirpin         814









# ################
# Z [2] Axis
# ################

# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE

net emcmot.02.enable <= axis.2.amp-enable-out
#net emcmot.02.enable => hpg.stepgen.02.enable


# position command and feedback
net emcmot.02.pos-cmd <= axis.2.motor-pos-cmd
#net emcmot.02.pos-cmd => hpg.stepgen.02.position-cmd

#net motor.02.pos-fb <= hpg.stepgen.02.position-fb
net motor.02.pos-fb => axis.2.motor-pos-fb


# timing parameters
#setp hpg.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
#setp hpg.stepgen.02.dirhold         [AXIS_2]DIRHOLD

#setp hpg.stepgen.02.steplen         [AXIS_2]STEPLEN
#setp hpg.stepgen.02.stepspace       [AXIS_2]STEPSPACE

#setp hpg.stepgen.02.position-scale  [AXIS_2]SCALE

#setp hpg.stepgen.02.maxvel          [AXIS_2]STEPGEN_MAX_VEL
#setp hpg.stepgen.02.maxaccel        [AXIS_2]STEPGEN_MAX_ACC

#setp hpg.stepgen.02.step_type       0
# P8.27 PRU1.out8
#setp hpg.stepgen.02.steppin        819
# P8.29 PRU1.out9
#setp hpg.stepgen.02.dirpin         818


# ################
# A [3] Axis A-Axis
# ################

# axis enable chain
#newsig emcmot.03.enable bit
#sets emcmot.03.enable FALSE

#net emcmot.03.enable <= axis.3.amp-enable-out
#net emcmot.03.enable => hpg.stepgen.03.enable


# position command and feedback
#net emcmot.03.pos-cmd <= axis.3.motor-pos-cmd
#net emcmot.03.pos-cmd => hpg.stepgen.03.position-cmd

#net motor.03.pos-fb <= hpg.stepgen.03.position-fb
#net motor.03.pos-fb => axis.3.motor-pos-fb


# timing parameters
#setp hpg.stepgen.03.dirsetup        [AXIS_3]DIRSETUP
#setp hpg.stepgen.03.dirhold         [AXIS_3]DIRHOLD

#setp hpg.stepgen.03.steplen         [AXIS_3]STEPLEN
#setp hpg.stepgen.03.stepspace       [AXIS_3]STEPSPACE

#setp hpg.stepgen.03.position-scale  [AXIS_3]SCALE

#setp hpg.stepgen.03.maxvel          [AXIS_3]STEPGEN_MAX_VEL
#setp hpg.stepgen.03.maxaccel        [AXIS_3]STEPGEN_MAX_ACC

#setp hpg.stepgen.03.step_type       0
# P8.30 GPIO2.25
#setp hpg.stepgen.03.steppin        916
# P8.21 GPIO1.30
#setp hpg.stepgen.03.dirpin         912






# ##############################
# A [4] Axis Extra Y Axis Gantry
# THIS iS THE E1 drive on the cramps drive
# ##############################

# axis enable chain
#newsig emcmot.04.enable bit
#sets emcmot.04.enable FALSE

#net emcmot.04.enable <= axis.4.amp-enable-out
#net emcmot.04.enable => hpg.stepgen.04.enable


# position command and feedback
#net emcmot.04.pos-cmd <= axis.4.motor-pos-cmd
#net emcmot.04.pos-cmd => hpg.stepgen.04.position-cmd

#net motor.04.pos-fb <= hpg.stepgen.04.position-fb
#net motor.04.pos-fb => axis.4.motor-pos-fb


# timing parameters
#setp hpg.stepgen.04.dirsetup        [AXIS_4]DIRSETUP
#setp hpg.stepgen.04.dirhold         [AXIS_4]DIRHOLD

#setp hpg.stepgen.04.steplen         [AXIS_4]STEPLEN
#setp hpg.stepgen.04.stepspace       [AXIS_4]STEPSPACE

#setp hpg.stepgen.04.position-scale  [AXIS_4]SCALE

#setp hpg.stepgen.04.maxvel          [AXIS_4]STEPGEN_MAX_VEL
#setp hpg.stepgen.04.maxaccel        [AXIS_4]STEPGEN_MAX_ACC

#setp hpg.stepgen.04.steppin        917
#setp hpg.stepgen.04.dirpin         918











# ##################################################
# Standard I/O - EStop, Enables, Limit Switches, Etc
# ##################################################

# Create estop signal chain
# Drive software estop to hardware
net estop-out iocontrol.0.user-enable-out => bb_gpio.p8.out-26
setp bb_gpio.p8.out-26.invert 1

# Monitor estop input from hardware
net estop-loop bb_gpio.p8.in-17 => iocontrol.0.emc-enable-in
setp bb_gpio.p8.in-17.invert 1

# 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

# Axis enable signal (active low)
net emcmot.00.enable => bb_gpio.p9.out-14
setp bb_gpio.p9.out-14.invert 1

# Machine power
# Use halui.machine.is-on instead?
#net emcmot.00.enable => bb_gpio.p9.out-23
#net xenable => bb_gpio.p9.out-14


# Tie machine power signal to the CRAMPS LED
# Feel free to tie any other signal you like to the LED
net emcmot.00.enable => bb_gpio.p9.out-25

# ################
# Limit Switches
# ################
#newsig limit-x-min bit
#newsig limit-x-max bit
#newsig limit-y-min bit
#newsig limit-y-max bit
#newsig limit-z-min bit
#newsig limit-z-max bit

#net limit-x-min <= bb_gpio.p8.in-08
#net limit-x-max <= bb_gpio.p8.in-07
#net limit-y-min <= bb_gpio.p8.in-10
#net limit-y-max <= bb_gpio.p8.in-09
#net limit-z-min <= bb_gpio.p9.in-13
#net limit-z-max <= bb_gpio.p9.in-11

# Adjust as needed for your switch polarity
#setp bb_gpio.p8.in-08.invert 1
#setp bb_gpio.p8.in-07.invert 1
#setp bb_gpio.p8.in-10.invert 1
setp bb_gpio.p8.in-09.invert 1
#setp bb_gpio.p9.in-11.invert 1
#setp bb_gpio.p9.in-13.invert 1

# Uncomment if you actually have limit switches setup
# You probably want to setup homing in the INI file, as well
#net limit-x-min => axis.0.home-sw-in
#net limit-x-min => axis.0.neg-lim-sw-in
#net limit-x-max => axis.0.pos-lim-sw-in
#net limit-y-min => axis.1.home-sw-in
#net limit-y-min => axis.1.neg-lim-sw-in
#net limit-y-max => axis.1.pos-lim-sw-in
#net limit-z-min => axis.2.home-sw-in
#net limit-z-min => axis.2.neg-lim-sw-in
#net limit-z-max => axis.2.pos-lim-sw-in

# ################
# Servo signals
# ################

# There is currently no driver to generate pulses for actual
# radio-control style servos, but the buffered 5V output
# signals can be used as GPIO

# !!! WARNING !!!
# BBB on-board eMMC *MUST* be disabled in order to use these!
# Drive eMMC-disabled signal high to enable signals that overlap
# with the eMMC pins on P8, otherwise they are tri-stated
#
# You also need to edit the setup.sh file to enable the GPIO pins

# Signal the hardware that eMMC has been disabled and it is safe
# to drive the signals connected to eMMC lines (active low)
newsig eMMC-disabled bit
sets eMMC-disabled 0
net eMMC-disabled bb_gpio.p8.out-16
setp bb_gpio.p8.out-16.invert 1

# Servo signals, output only, driven by an 'ACT125

#newsig servo.1 bit
#newsig servo.2 bit
#newsig servo.3 bit
#newsig servo.4 bit

#sets servo.1 0
#sets servo.2 0
#sets servo.3 0
#sets servo.4 0

#net servo.1 bb_gpio.p8.out-25
#net servo.2 bb_gpio.p8.out-24
#net servo.3 bb_gpio.p8.out-23
#net servo.4 bb_gpio.p8.out-22


# ##################################################
# PWM and Temperature Signals
# ##################################################

# Define signals to use elsewhere (ie: M1xx codes)
# If you change any names here, lots of things will break!
newsig e0.temp.set   float
newsig e0.temp.meas  float
newsig bed.temp.set  float
newsig bed.temp.meas float


setp hpg.pwmgen.00.pwm_period       10000000

# Bed Heater FET 1
setp hpg.pwmgen.00.out.00.pin       811
setp hpg.pwmgen.00.out.00.enable    1
setp hpg.pwmgen.00.out.00.value     0.0

# E0 Heater FET 2
setp hpg.pwmgen.00.out.01.pin       915
setp hpg.pwmgen.00.out.01.enable    1
setp hpg.pwmgen.00.out.01.value     0.0

# E1 Heater FET 3
setp hpg.pwmgen.00.out.02.pin       927
setp hpg.pwmgen.00.out.02.enable    1
setp hpg.pwmgen.00.out.02.value     0.0

# E2 Heater FET 4
setp hpg.pwmgen.00.out.03.pin       921
setp hpg.pwmgen.00.out.03.enable    1
setp hpg.pwmgen.00.out.03.value     0.0

# FET 5 - Fan / LED
setp hpg.pwmgen.00.out.04.pin       941
setp hpg.pwmgen.00.out.04.enable    1
setp hpg.pwmgen.00.out.04.value     0.0

# FET 6 - Fan / LED
setp hpg.pwmgen.00.out.05.pin       922
setp hpg.pwmgen.00.out.05.enable    1
setp hpg.pwmgen.00.out.05.value     0.0

# PID for Extruder 0 temperature control
#net e0.temp.meas    <= Therm.ch-04.value
#net e0.temp.meas    => pid.0.feedback

#sets e0.temp.set  0
#net e0.temp.set     => pid.0.command

#net e0.heater  <= pid.0.output
#net e0.heater  => limit1.0.in
#net e0.heaterl <= limit1.0.out
#net e0.heaterl => hpg.pwmgen.00.out.01.value

# Limit heater PWM to positive values
# PWM mimics hm2 implementation, which generates output for negative values
setp limit1.0.min 0

# PID for Bed temperature control
#net bed.temp.meas    <= Therm.ch-05.value
#net bed.temp.meas    => pid.1.feedback

#sets bed.temp.set  0
#net bed.temp.set     => pid.1.command

#net bed.heater  <= pid.1.output
#net bed.heater  => limit1.1.in
#net bed.heaterl <= limit1.1.out
#net bed.heaterl => hpg.pwmgen.00.out.00.value

# Limit heater PWM to positive values
# PWM mimics hm2 implementation, which generates output for negative values
setp limit1.1.min 0

# PID Parameters for adjusting temperature control
# Extruder
#setp pid.0.FF0      0
#setp pid.0.FF1      0
#setp pid.0.FF2      0
#setp pid.0.Pgain  0.30
#setp pid.0.Igain  0.00001
#setp pid.0.Dgain  0.9375
#setp pid.0.maxerrorI 1.0
#setp pid.0.bias    0.5
#setp pid.0.enable   1

# Bed
#setp pid.1.FF0      0
#setp pid.1.FF1      0
#setp pid.1.FF2      0
#setp pid.1.Pgain  1
#setp pid.1.Igain  0.0
#setp pid.1.Dgain  0.0
#setp pid.1.maxerrorI 1.0
#setp pid.1.bias    0.5
#setp pid.1.enable   1








On Tuesday, April 16, 2019 at 12:04:02 PM UTC-4, Charles Steinkuehler wrote:
>
> Stepper motors are (typically) open-loop, but the motion control logic 
> in Machinekit and LCNC are closed-loop.  That many joint following 
> errors probably means you either have problems with your HAL file 
> (typically a goof in how the position command and position feedback 
> signals are connected) or there's some other basic problem (eg: your 
> scale is far enough out of wack that it's impossible for the stepgen 
> instances to keep up with the commanded positions). 
>
> Post your INI & HAL file and we can review. 
>
> It looks like there's a link to your HAL file, but Google is being 
> weird and I can't open it.  Also, we'd typically need to see your INI 
> file as well unless you aren't pulling any ini values into your HAL file. 
>
> On 4/16/2019 10:17 AM, jonas hauptman wrote: 
> > Our team working on the bamboo CNC project is really stuck over this 
> issue, 
> > any help would be greatly appreciated. 
> > 
> > The machine information can all be found below (and I have posted before 
> if 
> > you recognize the posts). I used someones HAL file for gantry deracking 
> for 
> > an MPCNC, and changed the settings to accommodate to my motion setup. 
> When 
> > I go to move the axes in the GUI (AXIS) I get "joint 1 following error", 
> > "joint 2 following error", and "joint 3 following error". Joint 1 (X - 
> > Axis) works just fine. I am not sure what these errors mean, or how to 
> fix 
> > them, so any information y'all could provide would be greatly 
> appreciated. 
> > I will post my .hal file and some accompanying documentation/photos. I 
> have 
> > learned that the following error is related to motors, and the 
> BeagleBone 
> > not communicating with them correctly, but I have not been able to 
> figure 
> > out how to fix the issues. I have the issue whether or not the motors 
> are 
> > connected. I have been trying to figure out why, and have been working 
> > through the errors I get but haven't made much progress. If I am using 
> any 
> > terminology that isn't correct please excuse it, as I am new to this. 
> Any 
> > help anyone can provide would be awesome. Thank you in advance. 
> > 
> > 
> https://docs.google.com/presentation/d/1a7goIQwWIO0uKRLa-KfeOs9Kg6j0zBQBgmQGL14omLM/edit#slide=id.g5047c009fb_0_5
>  
> > 
> > Preview attachment Screen_Grab.jpg 
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.2&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdhy1>
>  
>
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.2&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdhy1>
>  
>
> > Screen_Grab.jpg 
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.2&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdhy1>
>  
>
> > 714 KB 
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.2&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdhy1>Preview
>  
>
> > attachment CRAMPS.hal 
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.1&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdh30>
>  
>
> > CRAMPS.hal 
> > 17 KB 
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.1&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdh30>
>  
>
> > <
> https://mail.google.com/mail/u/0?ui=2&ik=6fb2ca6400&attid=0.2&permmsgid=msg-f:1630982304047515506&th=16a269c3a3b34772&view=att&disp=safe&realattid=f_jujwfdhy1>
>  
>
> > 
>
>
> -- 
> Charles Steinkuehler 
> [email protected] <javascript:> 
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Attachment: CRAMPS.hal
Description: Binary data

Attachment: CRAMPS.ini
Description: Binary data

[PRUCONF]
DRIVER=hal_pru_generic
CONFIG=pru=0 num_stepgens=5 num_pwmgens=6
PRUBIN=xenomai/pru_generic.bin
#MPCNC

[EMC]

# Name of machine, for use with display, etc.
MACHINE =               MPCNC-BCNC-CRAMPS

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG =                0x00000003
#DEBUG =                0x00000007
DEBUG = 5




[DISPLAY]

# Name of display program, e.g., tkemc
#DISPLAY = tkemc
#DISPLAY = gscreen
DISPLAY = axis

# Touchy currently won't work without some hardware buttons/jog-wheel
#DISPLAY = touchy

# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME =            0.200

# Path to help file
HELP_FILE =             tklinucnc.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 =     4

# Max jog speed (This is in mm per second.)
MAX_LINEAR_VELOCITY = 200
MIN_LNEAR_VELOCITY = 1

DEFAULT_LINEAR_VELOCITY =20




# Prefix to be used
PROGRAM_PREFIX = /home/machinekit/machinekit/nc_files

# Introductory graphic
INTRO_GRAPHIC =         machinekit.gif
INTRO_TIME =            5

# Increments for the JOG section
INCREMENTS = 10 1 0.1 0.01

# This is the temperature display - not needed for this
#PYVCP = 3D.Temps.panel.xml

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python


[TASK]

# Name of task controller program, e.g., milltask
TASK =                  milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME =            0.010




[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE =        pru-stepper.var




[EMCMOT]
#This is the real time motion component
#You can read up on this here 
http://linuxcnc.org/docs/html/man/man9/motion.9.html
EMCMOT =                motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT =          1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT =             0.010

# Servo task period, in nanoseconds
SERVO_PERIOD =          1000000
BASE_PERIOD = 79375

[PENDANT]
SPEED_1 = 20
SPEED_2 = 30
SPEED_3 = 60


[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 =               CRAMPS.hal

# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD =               save neta

POSTGUI_HALFILE =       3D.postgui.hal
POSTGUI_HALFILE = custom_postgui.hal
HALUI = halui


[TRAJ]

#JOINTS =                5
AXES =                  4
COORDINATES =           X Y Z A
#MAX_ANGULAR_VELOCITY = 45.00
#DEFAULT_ANGULAR_VELOCITY = 4.50
LINEAR_UNITS =          mm
ANGULAR_UNITS =         degree
CYCLE_TIME =            0.010
DEFAULT_VELOCITY = 5

DEFAULT_ACCELERATION = 400
CYCLE_TIME =            0.010
MAX_LINEAR_VELOCITY = 20.00





[AXIS_0]
#X Axis

# 
# 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 doesnt 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 =       200.0
MAX_ACCELERATION =   3000.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    240.0
STEPGEN_MAX_ACC =    3600.0

BACKLASH =           0.000

# scale is 200 steps/rev * 5 revs/inch
SCALE =  -200

MIN_LIMIT =             -1.0
MAX_LIMIT =             220.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         1

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# These are settings for DRV8825 Polulo
# these are in nanoseconds
#DIRSETUP   =              650
#DIRHOLD    =              650
#STEPLEN    =              1900
#STEPSPACE  =              1900

#http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing
# There are settings for a A4988 Polulo
# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_1]
#Y1

TYPE =              LINEAR
MAX_VELOCITY =       20.0
MAX_ACCELERATION =   300.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    2.0
STEPGEN_MAX_ACC =    3.0

BACKLASH =           0.000

SCALE =  200

MIN_LIMIT =             -1.0
MAX_LIMIT =             250.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         2

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_2]

TYPE =              LINEAR
MAX_VELOCITY =      200
MAX_ACCELERATION =  300
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    6.0
STEPGEN_MAX_ACC =    125.0

BACKLASH =           0.000

#SCALE = 1511.81102362
SCALE = 200

MIN_LIMIT =             -10.0
MAX_LIMIT =             200.0

FERROR =     1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         0

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[AXIS_3]
#Axis A
TYPE = ANGULAR
MAX_VELOCITY = 31.8993189453
MAX_ACCELERATION = 3000.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 3.0
STEPGEN_MAX_ACC = 37.0

BACKLASH =           0.000

#SCALE = -744.530002058
SCALE = -1489.06
#SCALE = -732.32

MIN_LIMIT = -9999.0
MAX_LIMIT = 999999999.0

FERROR = 1.0
MIN_FERROR = 0.25

HOME =                  0.000
HOME_OFFSET =           0.00
HOME_IGNORE_LIMITS =    YES
HOME_USE_INDEX =        NO
HOME_SEQUENCE =         0

# Set to zero if you don't have physical home/limit switches
# Set to the desired homing and latch velocity if you have switches
# See: https://github.com/machinekit/machinekit-docs
HOME_SEARCH_VEL =       0
HOME_LATCH_VEL =        0

# these are in nanoseconds
DIRSETUP   =              650
DIRHOLD    =              650
STEPLEN    =              1900
STEPSPACE  =              1900




[EMCIO]

# Name of IO controller program, e.g., io
EMCIO =                 io

# cycle time, in seconds
CYCLE_TIME =            0.100

# tool table file
TOOL_TABLE =            tool.tbl

# #######################################
#
# HAL file for BeagleBone + CRAMPS cape with 5 steppers BCNC
#
# Derived from example hm2-stepper config
#
# ########################################

# Launch the setup script to make sure hardware setup looks good
loadusr -w ./setup.sh


# ###################################
# Core EMC/HAL Loads
# ###################################

# kinematics
loadrt trivkins

# motion controller, get name and thread periods from ini file
# trajectory planner
loadrt tp
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD 
num_joints=[TRAJ]AXES tp=tp kins=trivkins


# load low-level drivers
loadrt hal_bb_gpio output_pins=816,822,823,824,825,826,914,923,925 
input_pins=807,808,809,810,817,911,913
loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) 
[PRUCONF](CONFIG) halname=hpg
#loadrt pid count=2

###################################
#This enables gantry configs
###################################

newinst gantry gantryY.0 pincount=2

###################################

loadrt limit1 count=2


# Python user-mode HAL module to read ADC value and generate a thermostat 
output for PWM
# c = analog input channel and thermistor table
# loadusr -Wn Therm hal_temp_bbb -n Therm -c 
04:epcos_B57560G1104,05:epcos_B57560G1104 -b CRAMPS

# ################################################
# THREADS
# ################################################

addf hpg.capture-position                 servo-thread
addf bb_gpio.read                         servo-thread
addf motion-command-handler               servo-thread
addf gantryY.0.read                       servo-thread
addf motion-controller                    servo-thread


#addf pid.0.do-pid-calcs                  servo-thread
#addf pid.1.do-pid-calcs                  servo-thread


addf gantryY.0.write                      servo-thread


addf limit1.0                             servo-thread
addf limit1.1                             servo-thread
addf hpg.update                           servo-thread
addf bb_gpio.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 <= axis.0.amp-enable-out
net emcmot.00.enable => hpg.stepgen.00.enable


# position command and feedback
net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd

net motor.00.pos-fb <= hpg.stepgen.00.position-fb
net motor.00.pos-fb => axis.0.motor-pos-fb


# timing parameters
setp hpg.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp hpg.stepgen.00.dirhold         [AXIS_0]DIRHOLD

setp hpg.stepgen.00.steplen         [AXIS_0]STEPLEN
setp hpg.stepgen.00.stepspace       [AXIS_0]STEPSPACE

setp hpg.stepgen.00.position-scale  [AXIS_0]SCALE

setp hpg.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
setp hpg.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC

#setp hpg.stepgen.00.step_type       0
# P8.43 PRU1.out2
setp hpg.stepgen.00.steppin        813
# P8.44 PRU1.out4
setp hpg.stepgen.00.dirpin         812


# ################
# Y Axis Gantry
# ################

net y1pos-cmd gantryY.0.joint.00.pos-cmd => hpg.stepgen.02.position-cmd
net y1pos-fb  gantryY.0.joint.00.pos-fb  <= hpg.stepgen.02.position-fb
net y2pos-cmd gantryY.0.joint.01.pos-cmd => hpg.stepgen.03.position-cmd
net y2pos-fb  gantryY.0.joint.01.pos-fb  <= hpg.stepgen.03.position-fb
net ypos-cmd  gantryY.0.position-cmd     <= axis.1.motor-pos-cmd
net ypos-fb   gantryY.0.position-fb      => axis.1.motor-pos-fb
net yenable axis.1.amp-enable-out => hpg.stepgen.02.enable hpg.stepgen.03.enable
setp gantryY.0.search-vel [AXIS_1]HOME_SEARCH_VEL

# y1-axis
setp hpg.stepgen.02.position-scale [AXIS_1]SCALE
setp hpg.stepgen.02.steplen [AXIS_1]STEPLEN
setp hpg.stepgen.02.stepspace [AXIS_1]STEPSPACE
setp hpg.stepgen.02.dirhold [AXIS_1]DIRHOLD
setp hpg.stepgen.02.dirsetup [AXIS_1]DIRSETUP
setp hpg.stepgen.02.maxaccel [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.01.steppin         144
#setp hpg.stepgen.01.dirpin          145
#setp hpg.stepgen.02.step_type       0
# P8.42 PRU1.out5
setp hpg.stepgen.02.steppin        815
# P8.39 PRU1.out6
setp hpg.stepgen.02.dirpin         814

# y2-axis
setp hpg.stepgen.03.position-scale [AXIS_1]SCALE
setp hpg.stepgen.03.steplen [AXIS_1]STEPLEN
setp hpg.stepgen.03.stepspace [AXIS_1]STEPSPACE
setp hpg.stepgen.03.dirhold [AXIS_1]DIRHOLD
setp hpg.stepgen.03.dirsetup [AXIS_1]DIRSETUP
setp hpg.stepgen.03.maxaccel [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.02.steppin         52
#setp hpg.stepgen.02.dirpin          147
#setp hpg.stepgen.03.step_type       0
setp hpg.stepgen.03.steppin        917
setp hpg.stepgen.03.dirpin         918





#######################################################
# GETTING THE GANTRY HOME SWITCHES SETUP
########################################################
# TODO this can be deleted just a refer to the cramps pins
#net limit-x-min <= bb_gpio.p8.in-08
#net limit-x-max <= bb_gpio.p8.in-07
#net limit-y-min <= bb_gpio.p8.in-10
#net limit-y-max <= bb_gpio.p8.in-09
#net limit-z-min <= bb_gpio.p9.in-13
#net limit-z-max <= bb_gpio.p9.in-11



####################################
### X- AXIS GANTRY  ################
####################################
# debounce the X-axis switches and connect them to signals
#net switches-x1        <= bb_gpio.p8.in-08
#net switches-x2        <= bb_gpio.p8.in-07

# join the home switch signals so that both switches have to be closed to 
trigger a home position
#net switches-x1                => gantryX.0.joint.00.home
#net switches-x2                => gantryX.0.joint.01.home
#net home-x             <= gantryX.0.home
#net home-x             => axis.0.home-sw-in
#net limit-x            <= gantryX.0.limit
#net limit-x            => axis.0.neg-lim-sw-in

####################################
### Y- AXIS GANTRY  ################
####################################
# debounce the y-axis switches and connect them to signals
##net switches-y1       <= bb_gpio.p8.in-10
##net switches-y2       <= bb_gpio.p8.in-09

# join the home switch signals so that both switches have to be closed to 
trigger a home position
##net switches-y1               => gantryY.0.joint.00.home
##net switches-y2               => gantryY.0.joint.01.home
##net home-y            <= gantryY.0.home
##net home-y            => axis.1.home-sw-in
##net limit-y           <= gantryY.0.limit
##net limit-y           => axis.1.neg-lim-sw-in

####################################
### Z AXIS  ################
####################################

##net limit-z-min <= bb_gpio.p9.in-13
##net both-home-z-max <= bb_gpio.p9.in-11
##net both-home-z-max           => axis.2.pos-lim-sw-in
##net limit-z-min => axis.2.neg-lim-sw-in
##net both-home-z-max => axis.2.home-sw-in




# axis enable chain
#newsig emcmot.00.enable bit
#sets emcmot.00.enable FALSE

#net emcmot.00.enable <= axis.0.amp-enable-out
#net emcmot.00.enable => hpg.stepgen.00.enable


# position command and feedback
#net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
#net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd

#net motor.00.pos-fb <= hpg.stepgen.00.position-fb
#net motor.00.pos-fb => axis.0.motor-pos-fb


# timing parameters
#setp hpg.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
#setp hpg.stepgen.00.dirhold         [AXIS_0]DIRHOLD

#setp hpg.stepgen.00.steplen         [AXIS_0]STEPLEN
#setp hpg.stepgen.00.stepspace       [AXIS_0]STEPSPACE

#setp hpg.stepgen.00.position-scale  [AXIS_0]SCALE

#setp hpg.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
#setp hpg.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC

#setp hpg.stepgen.00.step_type       0
# P8.43 PRU1.out2
#setp hpg.stepgen.00.steppin        813
# P8.44 PRU1.out4
#setp hpg.stepgen.00.dirpin         812





# ################
# Y [1] Axis
# ################

# axis enable chain
#newsig emcmot.01.enable bit
#sets emcmot.01.enable FALSE

#net emcmot.01.enable <= axis.1.amp-enable-out
#net emcmot.01.enable => hpg.stepgen.01.enable


# position command and feedback
#net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd
#net emcmot.01.pos-cmd => hpg.stepgen.01.position-cmd

#net motor.01.pos-fb <= hpg.stepgen.01.position-fb
#net motor.01.pos-fb => axis.1.motor-pos-fb


# timing parameters
#setp hpg.stepgen.01.dirsetup        [AXIS_1]DIRSETUP
#setp hpg.stepgen.01.dirhold         [AXIS_1]DIRHOLD

#setp hpg.stepgen.01.steplen         [AXIS_1]STEPLEN
#setp hpg.stepgen.01.stepspace       [AXIS_1]STEPSPACE

#setp hpg.stepgen.01.position-scale  [AXIS_1]SCALE

#setp hpg.stepgen.01.maxvel          [AXIS_1]STEPGEN_MAX_VEL
#setp hpg.stepgen.01.maxaccel        [AXIS_1]STEPGEN_MAX_ACC

#setp hpg.stepgen.01.step_type       0
# P8.42 PRU1.out5
#setp hpg.stepgen.01.steppin        815
# P8.39 PRU1.out6
#setp hpg.stepgen.01.dirpin         814









# ################
# Z [2] Axis
# ################

# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE

net emcmot.02.enable <= axis.2.amp-enable-out
#net emcmot.02.enable => hpg.stepgen.02.enable


# position command and feedback
net emcmot.02.pos-cmd <= axis.2.motor-pos-cmd
#net emcmot.02.pos-cmd => hpg.stepgen.02.position-cmd

#net motor.02.pos-fb <= hpg.stepgen.02.position-fb
net motor.02.pos-fb => axis.2.motor-pos-fb


# timing parameters
#setp hpg.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
#setp hpg.stepgen.02.dirhold         [AXIS_2]DIRHOLD

#setp hpg.stepgen.02.steplen         [AXIS_2]STEPLEN
#setp hpg.stepgen.02.stepspace       [AXIS_2]STEPSPACE

#setp hpg.stepgen.02.position-scale  [AXIS_2]SCALE

#setp hpg.stepgen.02.maxvel          [AXIS_2]STEPGEN_MAX_VEL
#setp hpg.stepgen.02.maxaccel        [AXIS_2]STEPGEN_MAX_ACC

#setp hpg.stepgen.02.step_type       0
# P8.27 PRU1.out8
#setp hpg.stepgen.02.steppin        819
# P8.29 PRU1.out9
#setp hpg.stepgen.02.dirpin         818


# ################
# A [3] Axis A-Axis
# ################

# axis enable chain
#newsig emcmot.03.enable bit
#sets emcmot.03.enable FALSE

#net emcmot.03.enable <= axis.3.amp-enable-out
#net emcmot.03.enable => hpg.stepgen.03.enable


# position command and feedback
#net emcmot.03.pos-cmd <= axis.3.motor-pos-cmd
#net emcmot.03.pos-cmd => hpg.stepgen.03.position-cmd

#net motor.03.pos-fb <= hpg.stepgen.03.position-fb
#net motor.03.pos-fb => axis.3.motor-pos-fb


# timing parameters
#setp hpg.stepgen.03.dirsetup        [AXIS_3]DIRSETUP
#setp hpg.stepgen.03.dirhold         [AXIS_3]DIRHOLD

#setp hpg.stepgen.03.steplen         [AXIS_3]STEPLEN
#setp hpg.stepgen.03.stepspace       [AXIS_3]STEPSPACE

#setp hpg.stepgen.03.position-scale  [AXIS_3]SCALE

#setp hpg.stepgen.03.maxvel          [AXIS_3]STEPGEN_MAX_VEL
#setp hpg.stepgen.03.maxaccel        [AXIS_3]STEPGEN_MAX_ACC

#setp hpg.stepgen.03.step_type       0
# P8.30 GPIO2.25
#setp hpg.stepgen.03.steppin        916
# P8.21 GPIO1.30
#setp hpg.stepgen.03.dirpin         912






# ##############################
# A [4] Axis Extra Y Axis Gantry
# THIS iS THE E1 drive on the cramps drive
# ##############################

# axis enable chain
#newsig emcmot.04.enable bit
#sets emcmot.04.enable FALSE

#net emcmot.04.enable <= axis.4.amp-enable-out
#net emcmot.04.enable => hpg.stepgen.04.enable


# position command and feedback
#net emcmot.04.pos-cmd <= axis.4.motor-pos-cmd
#net emcmot.04.pos-cmd => hpg.stepgen.04.position-cmd

#net motor.04.pos-fb <= hpg.stepgen.04.position-fb
#net motor.04.pos-fb => axis.4.motor-pos-fb


# timing parameters
#setp hpg.stepgen.04.dirsetup        [AXIS_4]DIRSETUP
#setp hpg.stepgen.04.dirhold         [AXIS_4]DIRHOLD

#setp hpg.stepgen.04.steplen         [AXIS_4]STEPLEN
#setp hpg.stepgen.04.stepspace       [AXIS_4]STEPSPACE

#setp hpg.stepgen.04.position-scale  [AXIS_4]SCALE

#setp hpg.stepgen.04.maxvel          [AXIS_4]STEPGEN_MAX_VEL
#setp hpg.stepgen.04.maxaccel        [AXIS_4]STEPGEN_MAX_ACC

#setp hpg.stepgen.04.steppin        917
#setp hpg.stepgen.04.dirpin         918











# ##################################################
# Standard I/O - EStop, Enables, Limit Switches, Etc
# ##################################################

# Create estop signal chain
# Drive software estop to hardware
net estop-out iocontrol.0.user-enable-out => bb_gpio.p8.out-26
setp bb_gpio.p8.out-26.invert 1

# Monitor estop input from hardware
net estop-loop bb_gpio.p8.in-17 => iocontrol.0.emc-enable-in
setp bb_gpio.p8.in-17.invert 1

# 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

# Axis enable signal (active low)
net emcmot.00.enable => bb_gpio.p9.out-14
setp bb_gpio.p9.out-14.invert 1

# Machine power
# Use halui.machine.is-on instead?
#net emcmot.00.enable => bb_gpio.p9.out-23
#net xenable => bb_gpio.p9.out-14


# Tie machine power signal to the CRAMPS LED
# Feel free to tie any other signal you like to the LED
net emcmot.00.enable => bb_gpio.p9.out-25

# ################
# Limit Switches
# ################
#newsig limit-x-min bit
#newsig limit-x-max bit
#newsig limit-y-min bit
#newsig limit-y-max bit
#newsig limit-z-min bit
#newsig limit-z-max bit

#net limit-x-min <= bb_gpio.p8.in-08
#net limit-x-max <= bb_gpio.p8.in-07
#net limit-y-min <= bb_gpio.p8.in-10
#net limit-y-max <= bb_gpio.p8.in-09
#net limit-z-min <= bb_gpio.p9.in-13
#net limit-z-max <= bb_gpio.p9.in-11

# Adjust as needed for your switch polarity
#setp bb_gpio.p8.in-08.invert 1
#setp bb_gpio.p8.in-07.invert 1
#setp bb_gpio.p8.in-10.invert 1
setp bb_gpio.p8.in-09.invert 1
#setp bb_gpio.p9.in-11.invert 1
#setp bb_gpio.p9.in-13.invert 1

# Uncomment if you actually have limit switches setup
# You probably want to setup homing in the INI file, as well
#net limit-x-min => axis.0.home-sw-in
#net limit-x-min => axis.0.neg-lim-sw-in
#net limit-x-max => axis.0.pos-lim-sw-in
#net limit-y-min => axis.1.home-sw-in
#net limit-y-min => axis.1.neg-lim-sw-in
#net limit-y-max => axis.1.pos-lim-sw-in
#net limit-z-min => axis.2.home-sw-in
#net limit-z-min => axis.2.neg-lim-sw-in
#net limit-z-max => axis.2.pos-lim-sw-in

# ################
# Servo signals
# ################

# There is currently no driver to generate pulses for actual
# radio-control style servos, but the buffered 5V output
# signals can be used as GPIO

# !!! WARNING !!!
# BBB on-board eMMC *MUST* be disabled in order to use these!
# Drive eMMC-disabled signal high to enable signals that overlap
# with the eMMC pins on P8, otherwise they are tri-stated
#
# You also need to edit the setup.sh file to enable the GPIO pins

# Signal the hardware that eMMC has been disabled and it is safe
# to drive the signals connected to eMMC lines (active low)
newsig eMMC-disabled bit
sets eMMC-disabled 0
net eMMC-disabled bb_gpio.p8.out-16
setp bb_gpio.p8.out-16.invert 1

# Servo signals, output only, driven by an 'ACT125

#newsig servo.1 bit
#newsig servo.2 bit
#newsig servo.3 bit
#newsig servo.4 bit

#sets servo.1 0
#sets servo.2 0
#sets servo.3 0
#sets servo.4 0

#net servo.1 bb_gpio.p8.out-25
#net servo.2 bb_gpio.p8.out-24
#net servo.3 bb_gpio.p8.out-23
#net servo.4 bb_gpio.p8.out-22


# ##################################################
# PWM and Temperature Signals
# ##################################################

# Define signals to use elsewhere (ie: M1xx codes)
# If you change any names here, lots of things will break!
newsig e0.temp.set   float
newsig e0.temp.meas  float
newsig bed.temp.set  float
newsig bed.temp.meas float


setp hpg.pwmgen.00.pwm_period       10000000

# Bed Heater FET 1
setp hpg.pwmgen.00.out.00.pin       811
setp hpg.pwmgen.00.out.00.enable    1
setp hpg.pwmgen.00.out.00.value     0.0

# E0 Heater FET 2
setp hpg.pwmgen.00.out.01.pin       915
setp hpg.pwmgen.00.out.01.enable    1
setp hpg.pwmgen.00.out.01.value     0.0

# E1 Heater FET 3
setp hpg.pwmgen.00.out.02.pin       927
setp hpg.pwmgen.00.out.02.enable    1
setp hpg.pwmgen.00.out.02.value     0.0

# E2 Heater FET 4
setp hpg.pwmgen.00.out.03.pin       921
setp hpg.pwmgen.00.out.03.enable    1
setp hpg.pwmgen.00.out.03.value     0.0

# FET 5 - Fan / LED
setp hpg.pwmgen.00.out.04.pin       941
setp hpg.pwmgen.00.out.04.enable    1
setp hpg.pwmgen.00.out.04.value     0.0

# FET 6 - Fan / LED
setp hpg.pwmgen.00.out.05.pin       922
setp hpg.pwmgen.00.out.05.enable    1
setp hpg.pwmgen.00.out.05.value     0.0

# PID for Extruder 0 temperature control
#net e0.temp.meas    <= Therm.ch-04.value
#net e0.temp.meas    => pid.0.feedback

#sets e0.temp.set  0
#net e0.temp.set     => pid.0.command

#net e0.heater  <= pid.0.output
#net e0.heater  => limit1.0.in
#net e0.heaterl <= limit1.0.out
#net e0.heaterl => hpg.pwmgen.00.out.01.value

# Limit heater PWM to positive values
# PWM mimics hm2 implementation, which generates output for negative values
setp limit1.0.min 0

# PID for Bed temperature control
#net bed.temp.meas    <= Therm.ch-05.value
#net bed.temp.meas    => pid.1.feedback

#sets bed.temp.set  0
#net bed.temp.set     => pid.1.command

#net bed.heater  <= pid.1.output
#net bed.heater  => limit1.1.in
#net bed.heaterl <= limit1.1.out
#net bed.heaterl => hpg.pwmgen.00.out.00.value

# Limit heater PWM to positive values
# PWM mimics hm2 implementation, which generates output for negative values
setp limit1.1.min 0

# PID Parameters for adjusting temperature control
# Extruder
#setp pid.0.FF0      0
#setp pid.0.FF1      0
#setp pid.0.FF2      0
#setp pid.0.Pgain  0.30
#setp pid.0.Igain  0.00001
#setp pid.0.Dgain  0.9375
#setp pid.0.maxerrorI 1.0
#setp pid.0.bias    0.5
#setp pid.0.enable   1

# Bed
#setp pid.1.FF0      0
#setp pid.1.FF1      0
#setp pid.1.FF2      0
#setp pid.1.Pgain  1
#setp pid.1.Igain  0.0
#setp pid.1.Dgain  0.0
#setp pid.1.maxerrorI 1.0
#setp pid.1.bias    0.5
#setp pid.1.enable   1

Reply via email to