Managed to get some shop time today, and was working on the lincurve stuff.  Got most of the kinks worked out, as it now loads without error, but now getting joint following errors as soon as I try to home the machine.  Nota beni, prior to using the lincurve hal code, the machine homed fine with no errors. Here's the error I get once I start the homing sequence:

mark@canecutter:~$ /usr/bin/linuxcnc '/home/mark/linuxcnc/configs/Cane-Cutter/Cane-Cutter.ini'
LINUXCNC - 2.7.12
Machine configuration directory is '/home/mark/linuxcnc/configs/Cane-Cutter'
Machine configuration file is 'Cane-Cutter.ini'
Starting LinuxCNC...
.
Found file(REL): ./Cane-Cutter.hal
Found file(REL): ./lin_curve.hal
joint 2 following error
emc/task/taskintf.cc 617: Error on axis 2, command number 65

Here's the current main hal file:

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

# Generated by stepconf at Sat Mar 13 15:20:58 201
# If you make changes to this file, they will be
# overwritten when you run stepconf again

loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="0xec00 out 0e000 in"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= motion.spindle-speed-out
addf parport.1.read base-thread  # added for pendant
addf parport.1.write base-thread  # added for pendant

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

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 33934
setp stepgen.0.dirsetup 33934
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp stepgen.1.position-scale [AXIS_0]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 33934
setp stepgen.1.dirsetup 33934
setp stepgen.1.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => axis.1.motor-pos-fb
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd stepgen.1.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
setp parport.0.pin-02-out-invert 1
setp parport.0.pin-03-out-invert 1
setp parport.0.pin-04-out-invert 1
#setp parport.0.pin-05-out-invert 1
net x1step  stepgen.0.step => parport.0.pin-02-out
net x1dir   stepgen.0.dir => parport.0.pin-03-out
net x2step  stepgen.1.step => parport.0.pin-04-out
net x2dir   stepgen.1.dir => parport.0.pin-05-out
net xenable axis.0.amp-enable-out => stepgen.0.enable stepgen.1.enable
net home-x => axis.0.home-sw-in
net both-x => axis.0.neg-lim-sw-in
net both-x => axis.0.pos-lim-sw-in

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

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 33934
setp stepgen.2.dirsetup 33934
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
#net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-cmd stepgen.2.position-cmd
#net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zpos-fb stepgen.2.position-fb
setp parport.0.pin-06-out-invert 1
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net home-z => axis.2.home-sw-in
net both-z => axis.2.neg-lim-sw-in
net both-z => axis.2.pos-lim-sw-in





loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

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


Here's the current lincurve hal file:

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

loadrt lincurve personality=16
loadrt offset
addf lincurve.0 servo-thread
addf offset.0.update-output servo-thread


setp lincurve.0.x-val-00 3.000
setp lincurve.0.y-val-00 -0.007
setp lincurve.0.x-val-01 5.000
setp lincurve.0.y-val-01 0.000
setp lincurve.0.x-val-02 11.000
setp lincurve.0.y-val-02 0.000
setp lincurve.0.x-val-03 12.000
setp lincurve.0.y-val-03 -0.001
setp lincurve.0.x-val-04 18.000
setp lincurve.0.y-val-04 -0.001
setp lincurve.0.x-val-05 19.000
setp lincurve.0.y-val-05 0.000
setp lincurve.0.x-val-06 27.000
setp lincurve.0.y-val-06 0.000
setp lincurve.0.x-val-07 28.000
setp lincurve.0.y-val-07 0.003
setp lincurve.0.x-val-08 33.000
setp lincurve.0.y-val-08 0.000
setp lincurve.0.x-val-09 34.000
setp lincurve.0.y-val-09 -0.002
setp lincurve.0.x-val-10 38.000
setp lincurve.0.y-val-10 -0.002
setp lincurve.0.x-val-11 39.000
setp lincurve.0.y-val-11 0.001
setp lincurve.0.x-val-12 41.000
setp lincurve.0.y-val-12 0.001
setp lincurve.0.x-val-13 42.000
setp lincurve.0.y-val-13 0.002
setp lincurve.0.x-val-14 47.000
setp lincurve.0.y-val-14 0.002
setp lincurve.0.x-val-15 48.000
setp lincurve.0.y-val-15 0.005




net z-raw axis.2.joint-pos-cmd offset.0.in
net z-corr lincurve.0.out offset.0.offset
net zpos-cmd offset.0.out
net zpos-fb offset.0.fb-in
net z-pos-fb-offs offset.0.fb-out  axis.2.motor-pos-fb

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


Not sure what would cause the joint following error on homing though.  I did have to change the net zpos-fb assignment in the main and lincurve hal files because I was getting a similar error on load that I was getting for the net zpos-cmd assignment previously.

Also, it didn't like having offset.0.fb-out sent to axis.2.joint-pos-fb, so I set that to axis.2.motor-pos-fb.

Here's the error I was getting for the z-pos-fb-offs:

########################
mark@canecutter:~$ /usr/bin/linuxcnc '/home/mark/linuxcnc/configs/Cane-Cutter/Cane-Cutter.ini'
LINUXCNC - 2.7.12
Machine configuration directory is '/home/mark/linuxcnc/configs/Cane-Cutter'
Machine configuration file is 'Cane-Cutter.ini'
Starting LinuxCNC...
.
Found file(REL): ./Cane-Cutter.hal
Found file(REL): ./lin_curve.hal
./lin_curve.hal:46: Signal 'z-pos-fb-offs' can not add OUT pin 'axis.2.joint-pos-fb', it already has OUT pin 'offset.0.fb-out'
Shutting down and cleaning up LinuxCNC...

At any rate, something in the homing sequence does not like something in these hal files.  In my homing sequence, Z homes first, so here's the applicable section of the ini file:


[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 0.09
MAX_ACCELERATION = 0.3
STEPGEN_MAXACCEL = 3.3
#STEPGEN_MAXACCEL = 1.0
SCALE = 48000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = 0.080  # used for table 0 so saw blades do not hit vacuum table
MAX_LIMIT = 2.4005 # used for table 0
HOME = 2.4  # used for table 0
HOME_OFFSET=2.5670  # used for table 0 - 04/3/15 - distance down from Z home to table top
HOME_SEARCH_VEL = -0.09
HOME_LATCH_VEL = 0.01
HOME_SEQUENCE = 0


I'm stumped at this point.  Any help, pointers, or hand holding would be much appreciated.

Thanks,
Mark



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to