Thank you, reading through that documentation helped me to understand a 
little bit more about what all I am doing, and what things mean when I 
change them.

The power issue is not related to being physically connected, at least I 
don't think. I have 12V power plugged into the Motor (MOT and GND) 
connectors on the CRAMPS board. When the machine is taken out of E-Stop the 
CRAMPS E-stop LED turns off, but the CRAMPS green Active LED does not come 
on, so I am guessing something is wrong with the E-Stop chain like you 
mentioned. I looked at the EStop chain, however I wasn't sure what I could 
or should change to get that to work.

I agree that I am having many problems with my HAL file, and I would love 
to clean it up but I don't really understand yet what clean looks like, and 
how to get there. I would love to learn though, so if there are some good 
examples of what the files should look like please let me know.

Regarding the Z - Axis; I added the following after reading and looking 
through the MPCNC AUTOHOME .hal file I downloaded from github. I added this 
to try and solve the feedback path issues that I was having. If this is not 
the right thing to do please let me know. 

(On line 158 of the hal file I included.)

# z-axis
setp hpg.stepgen.04.position-scale [AXIS_2]SCALE
setp hpg.stepgen.04.steplen [AXIS_2]STEPLEN
setp hpg.stepgen.04.stepspace [AXIS_2]STEPSPACE
setp hpg.stepgen.04.dirhold [AXIS_2]DIRHOLD
setp hpg.stepgen.04.dirsetup [AXIS_2]DIRSETUP
setp hpg.stepgen.04.maxaccel [AXIS_2]STEPGEN_MAX_ACC
net zpos-cmd axis.2.motor-pos-cmd => hpg.stepgen.04.position-cmd
net zpos-fb hpg.stepgen.04.position-fb => axis.2.motor-pos-fb
net zenable axis.2.amp-enable-out => hpg.stepgen.04.enable

I am now getting the error "CRAMPS.hal:174: paramter or pin 
'hpg.stepgen.04.dirstep' not found 14417"
I thought this meant that I had not defined it, so I attempted to do so by 
adding

"net emcmot.04.enable <= axis2.amp.enable-out
net emcmot.04.enable => hpg.stepgen.04.enable"

But nothing seemed to change with my errors. Please let me know what I 
should try next, or what I should look up/read/learn next. 
Again thank you for all the help.

On Monday, April 29, 2019 at 9:04:52 AM UTC-4, Charles Steinkuehler wrote:
>
> On 4/27/2019 9:36 PM, Bradley Turner wrote: 
> > Thank you so much for the help, I am sorry for the late reply, I wasn't 
> > able to get back to the lab until now. I'm sure those things seems super 
> > obvious, I just don't know what to look for! I did what you said to try 
> and 
> > it fixed the issue on the Y (Axis 1) and the A (Axis 3), however I still 
> > get the same issue on the Z axis (Axis 2). I tried adjusting the values 
> up 
> > and down, but it did not seem to affect the issue on the Z axis. 
>
> Your problem with the Z axis is you do not have a feedback path.  Your 
> HAL code: 
>
> # 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 
>
> Creates a position command net (emcmot.02.pos-cmd) that goes nowhere 
> and a feedback net (motor.02.pos-fb) that is not driven. 
>
>
> > I had removed the homing earlier to try and narrow down what was causing 
> > the issue. Once I get the joint following error and other movement 
> errors 
> > all cleared up I am intending to try and tackle the 
> auto-homing-deracking 
> > as well. Should I add this back in now, or continue with one problem at 
> a 
> > time? 
>
> Your HAL file is pretty much a mess.  I would recommend cleaning it up 
> substantially and enabling the homing you want to use.  You can debug 
> fundamental issues (like your Z problem, above) using manual jogs with 
> the axis unhomed.  The next step would be to get homing working as 
> desired, so you'll need the homing logic in the HAL file. 
>
> > Separately I am having an issue where software - wise the axes (other 
> than 
> > the Z) all work correctly, however none of the motors spin. I have a 
> > feeling that this issue is more related to the CRAMPS board, however I 
> > figured I would mention it, as I am not sure what could be causing this. 
>
> Make sure you are supplying power to the proper header on the CRAMPS 
> board (P201, labeled MOTORS).  There are several different power 
> supply rails on the CRAMPS board and the most common cause of "nothing 
> happens" has been the power wasn't connected properly. 
>
> Another thing that can cause nothing to happen is a problem with the 
> ESTOP chain.  When the machine is taken out of ESTOP and powered on, 
> the red ESTOP LED should be off, and the green ACTIVE LED should be 
> on.  If the ACTIVE LED (Machine Power) is not lit, the stepper drivers 
> will be disabled by hardware. 
>
> > I really appreciate all the help, I have tried to self educate, however 
> I 
> > haven't been able to find alot of information on configuring stuff like 
> > this, or errors like this on machinekit, so if there is a repository 
> where 
> > I could learn more about it please let me know, I would love to look 
> into 
> > all of that. Thank you again, I have posted the (slightly) edited .hal 
> and 
> > .ini files. 
>
> You seem to be having the most trouble with the HAL file.  This is 
> basically a plain text netlist file which creates a "wiring diagram" 
> or schematic of the machine control logic.  As with a real world 
> schematic, things like unconnected pins or undriven nets will 
> typically cause problems.  There is a fair amount of documentation 
> available for HAL, I would recommend you read through at least the 
> introduction: 
>
> http://www.machinekit.io/docs/hal/intro/ 
>
> You don't need all the details (eg: creating new components with C or 
> python), but you should be familiar with the concept of components, 
> pins, signals, and functions. 
>
> -- 
> 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.
# #######################################
#
# 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



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

newsig emcmot.04.enable bit
sets emcmot.04.enable FALSE

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

# z-axis
setp hpg.stepgen.04.position-scale [AXIS_2]SCALE
setp hpg.stepgen.04.steplen [AXIS_2]STEPLEN
setp hpg.stepgen.04.stepspace [AXIS_2]STEPSPACE
setp hpg.stepgen.04.dirhold [AXIS_2]DIRHOLD
setp hpg.stepgen.04.dirstep [AXIS_2]DIRSETUP
setp hpg.stepgen.04.maxaccel [AXIS_2]STEPGEN_MAX_ACC
net zpos-cmd axis.2.motor-pos-cmd => hpg.stepgen.04.position-cmd
net zpos-fb hpg.stepgen.04.position-fb => axis.2.motor-pos-fb
net zenable axis.2.amp-enable-out => hpg.stepgen.04.enable





#######################################################
# 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
# ################


net emcmot.03.pos <= axis.3.motor-pos-cmd
net emcmot.03.pos => axis.3.motor-pos-fb

# 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
[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 =       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 =  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 =  3000
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    240.0
STEPGEN_MAX_ACC =    3600.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 = 50.0
STEPGEN_MAX_ACC = 3700.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

Reply via email to