Ok i am not well enough conversed to explain this in detail,but i will try.
Having recently been involved with the beaglebone/machinekit setup,i accidently came across a problem. I found that speradically the motors would make a noise like "frying an egg" after movement had finished. This after some investigation by Charles,Jeff pollard,and few others,was found to be the dir line hunting after a movement. This has turned out to be a known problem with the pru and the fact it is using position feedback and not velocity feedback. So the outcome after a few discussions was that the hal file needs changing to utilise the stepgen in velocity mode. Now i am at a complete loss how to do this,so is there anyone out there that can help?
Charles is snowed under at the moment otherwise i am sure he would oblige.
I will try attatching my hal file.
I am sure there are others that will explain this better than me because of my limited knowledge.

# These buffer ALL siginal used on the DB25 port
# The board also has a pair of a set of four 0805 size jumper resistors
# these can be used to output either the standard Spindle/Mist/flood and
# input ALIM from the DB25 pins
# or allow BBB SPI singals to be routed to the DB25 connector instead.
# The ALIM RC buffer Capacitor would need to change if this
# option was used.  The LIM Switch input signals are pulled to 3V3 through
# 10K resistors
# then go through a 1K resistor and bypassed with a .22uF cap.   This is
# the cap that should be removed
# if the SPI port (untested option)  is used.  The 4 SPI signals are also
# directly routed
# to six through-holes which include 3V3 and GND.  This singals are
# otherwise Unbuffered and
# go directly to the BBB
# At powerup the LVC541 enabl;e signals are pulled high, disabling the
# drivers until
# the BBB and LinuxCNC pull the enable signal low.
#
########################################


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

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

# kinematics
loadrt trivkins

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


# load low-level drivers
loadrt hal_bb_gpio output_pins=107,113,119,126,214 
input_pins=109,110,114,118,241
loadrt [PRUCONF](DRIVER) [PRUCONF](CONFIG)
#(JP) Not suing PID loop so comment out
#(JP)loadrt pid num_chan=2
loadrt limit1 count=2

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

addf [PRUCONF](DRIVER).capture-position   servo-thread
addf bb_gpio.read                         servo-thread
addf motion-command-handler               servo-thread
addf motion-controller                    servo-thread
#(JP) Not doing PID for temperature sensor for PWM output
#(JP)addf pid.0.do-pid-calcs                   servo-thread
#(JP)addf pid.1.do-pid-calcs                   servo-thread
addf limit1.0                             servo-thread
addf limit1.1                             servo-thread
addf [PRUCONF](DRIVER).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 => [PRUCONF](DRIVER).stepgen.00.enable

# position command and feedback
net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
net emcmot.00.pos-cmd => [PRUCONF](DRIVER).stepgen.00.position-cmd

net motor.00.pos-fb <= [PRUCONF](DRIVER).stepgen.00.position-fb
net motor.00.pos-fb => axis.0.motor-pos-fb

# timing parameters
setp [PRUCONF](DRIVER).stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp [PRUCONF](DRIVER).stepgen.00.dirhold         [AXIS_0]DIRHOLD

setp [PRUCONF](DRIVER).stepgen.00.steplen         [AXIS_0]STEPLEN
setp [PRUCONF](DRIVER).stepgen.00.stepspace       [AXIS_0]STEPSPACE

setp [PRUCONF](DRIVER).stepgen.00.position-scale  [AXIS_0]SCALE

setp [PRUCONF](DRIVER).stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
setp [PRUCONF](DRIVER).stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC

#setp [PRUCONF](DRIVER).stepgen.00.step_type       0
setp [PRUCONF](DRIVER).stepgen.00.steppin         0x4C
setp [PRUCONF](DRIVER).stepgen.00.dirpin          0x4D

#(JP) Add home switch input
net home-xyz bb_gpio.p8.in-10 => axis.0.home-sw-in
setp bb_gpio.p8.in-10.invert 1

# ################
# 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 => [PRUCONF](DRIVER).stepgen.01.enable

# position command and feedback
net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd
net emcmot.01.pos-cmd => [PRUCONF](DRIVER).stepgen.01.position-cmd

net motor.01.pos-fb <= [PRUCONF](DRIVER).stepgen.01.position-fb
net motor.01.pos-fb => axis.1.motor-pos-fb

# timing parameters
setp [PRUCONF](DRIVER).stepgen.01.dirsetup        [AXIS_1]DIRSETUP
setp [PRUCONF](DRIVER).stepgen.01.dirhold         [AXIS_1]DIRHOLD

setp [PRUCONF](DRIVER).stepgen.01.steplen         [AXIS_1]STEPLEN
setp [PRUCONF](DRIVER).stepgen.01.stepspace       [AXIS_1]STEPSPACE

setp [PRUCONF](DRIVER).stepgen.01.position-scale  [AXIS_1]SCALE

setp [PRUCONF](DRIVER).stepgen.01.maxvel          [AXIS_1]STEPGEN_MAX_VEL
setp [PRUCONF](DRIVER).stepgen.01.maxaccel        [AXIS_1]STEPGEN_MAX_ACC

#setp [PRUCONF](DRIVER).stepgen.01.step_type       0
setp [PRUCONF](DRIVER).stepgen.01.steppin         0x4E
setp [PRUCONF](DRIVER).stepgen.01.dirpin          0x4F

#(JP) Add home switch input
net home-xyz  axis.1.home-sw-in

# ################
# 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 => [PRUCONF](DRIVER).stepgen.02.enable

# position command and feedback
net emcmot.02.pos-cmd <= axis.2.motor-pos-cmd
net emcmot.02.pos-cmd => [PRUCONF](DRIVER).stepgen.02.position-cmd

net motor.02.pos-fb <= [PRUCONF](DRIVER).stepgen.02.position-fb
net motor.02.pos-fb => axis.2.motor-pos-fb

# timing parameters
setp [PRUCONF](DRIVER).stepgen.02.dirsetup        [AXIS_2]DIRSETUP
setp [PRUCONF](DRIVER).stepgen.02.dirhold         [AXIS_2]DIRHOLD

setp [PRUCONF](DRIVER).stepgen.02.steplen         [AXIS_2]STEPLEN
setp [PRUCONF](DRIVER).stepgen.02.stepspace       [AXIS_2]STEPSPACE

setp [PRUCONF](DRIVER).stepgen.02.position-scale  [AXIS_2]SCALE

setp [PRUCONF](DRIVER).stepgen.02.maxvel          [AXIS_2]STEPGEN_MAX_VEL
setp [PRUCONF](DRIVER).stepgen.02.maxaccel        [AXIS_2]STEPGEN_MAX_ACC

#setp [PRUCONF](DRIVER).stepgen.02.step_type       0
setp [PRUCONF](DRIVER).stepgen.02.steppin         0x50
setp [PRUCONF](DRIVER).stepgen.02.dirpin          0x51

#(JP) Add home switch input
net home-xyz axis.2.home-sw-in

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

# 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 and IO control enable signals are all on one pin P8-7 which
# goes to DB25-1
# and is used to place the LVC541 drivers on the interface board in active
# (LOW) or unactive (HIGH) state
# All external Inputs and Outputs on external boards
# should have pullups/downs since when the interface board is
# not enabled, it will look dosconnected for all signals

# this pin is output on DB25-1
# it is also used to enable the LVC541 driver/receiver on the interface board
net machine-on bb_gpio.p8.out-07 bb_gpio.p8.out-26 => halui.machine.is-on
setp bb_gpio.p8.out-07.invert 1

# this currently goes to an LED on the interface board
# it is simply a duplicate of the enable signal on DB25-1 right now
setp bb_gpio.p8.out-26.invert 1

# this input signal must be active LOW to allow the system to energize.
# this should be fed through an NC STOP type switch from DB25-1 to DB25-10
#net estop-in bb_gpio.p8.in-09 => iocontrol.0.emc-enable-in
#setp bb_gpio.p8.in-09.invert 1
#newsig test bit
#sets test 1
#net test iocontrol.0.emc-enable-in
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
#setp iocontrol.0.emc-enable-in true

# This output is on DB25-14 and is currently tied to spindle control (M3/M5)
net Output1 bb_gpio.p8.out-13 => halui.spindle.is-on
#setp bb_gpio.p8.out-13.invert 1

# This output is on DB25-16
net Output2 bb_gpio.p8.out-19 => halui.mist.is-on
setp bb_gpio.p8.out-19.invert 1

# This output is on DB25-17 (M8/M9)
net Output3 bb_gpio.p9.out-14 => halui.flood.is-on
setp bb_gpio.p9.out-14.invert 1


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to