Problem with running at very low speeds

More
09 Feb 2015 05:48 #55822 by Knas
I have an issue running my machine at very low speeds. My Y-axis is driven by two motors, one on each side of the machine. When i try and run the machine at speeds ~1 ipm the two motors do not start immediately, but there's a delay in one of them of a few seconds making the machine stall. Furthermore it seems to alternate which of the two motors gets the delay, it seems relative to direction. The hardware is all fine as i have been running the machine for about a year and a half using Mach3, it's definitely a software issue. I tried using gantrykins but with the same results. Any help very much appreciated as i really need to use LinuxCNC with my machine.

Please Log in or Create an account to join the conversation.

More
09 Feb 2015 06:34 #55824 by PCW
Can you post your ini and hal files?

Please Log in or Create an account to join the conversation.

More
09 Feb 2015 08:51 #55825 by Knas
The machine is fitted with a fourth axis too just fyi.

[EMC]
MACHINE = KRMx02
DEBUG = 0

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/knas/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in

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

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 58000
SERVO_PERIOD = 1000000

[HAL]
HALFILE = KRMx02.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[TRAJ]
AXES = 4
COORDINATES = X Y Z A
MAX_ANGULAR_VELOCITY = 180.00
DEFAULT_ANGULAR_VELOCITY = 18.00
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.90
MAX_LINEAR_VELOCITY = 9.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 8.57645321229
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 1909.8
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -5.0
MAX_LIMIT = 32.0
HOME_OFFSET = 0.000000
#HOME_SEARCH_VEL = 0.050000
#HOME_LATCH_VEL = 0.050000
#HOME_IGNORE_LIMITS = YES

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 8.57645321229
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 1909.8
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -5.0
MAX_LIMIT = 27.0
HOME_OFFSET = 0.000000
#HOME_SEARCH_VEL = 0.050000
#HOME_LATCH_VEL = 0.050000
#HOME_IGNORE_LIMITS = YES

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4.09482758621
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 4000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = 0
MAX_LIMIT = 6.6
HOME_OFFSET = 0.0

[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 1
MAX_ACCELERATION = 5
STEPGEN_MAXACCEL = 5
SCALE = 2000.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = 0
MAX_LIMIT = 0.1
HOME_OFFSET = 0.0


loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out 0xe000 out 0xe200 out"
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out

addf parport.0.read base-thread
addf parport.1.read base-thread
addf parport.2.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.write base-thread
addf parport.2.write 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

net astep => parport.1.pin-02-out
net adir => parport.1.pin-03-out

net spindle-on <= motion.spindle-on
net spindle-on => parport.1.pin-01-out

#net dout-00 <= motion.digital-out-00
#net dout-00 => parport.1.pin-01-out
net dout-01 <= motion.digital-out-01
net dout-01 => parport.1.pin-17-out

net probe-in => motion.probe-input

net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net ystep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net ydir => parport.0.pin-09-out
net charge-pump => parport.0.pin-16-out


net probe-in <= parport.0.pin-12-in-not
net estop-ext <= parport.0.pin-15-in-not
net min-y <= parport.0.pin-11-in-not
net min-x <= parport.0.pin-13-in-not


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 50200
setp stepgen.0.dirsetup 50200
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
#net min-home-x => axis.0.home-sw-in
#net min-home-x => axis.0.neg-lim-sw-in
net min-x => axis.0.neg-lim-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 50200
setp stepgen.1.dirsetup 50200
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
#net min-home-y => axis.1.home-sw-in
#net min-home-y => axis.1.neg-lim-sw-in
net min-y => axis.1.neg-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 50200
setp stepgen.2.dirsetup 50200
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 50200
setp stepgen.3.dirsetup 50200
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

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

Please Log in or Create an account to join the conversation.

More
09 Feb 2015 21:02 #55833 by andypugh

I have an issue running my machine at very low speeds. My Y-axis is driven by two motors, one on each side of the machine. When i try and run the machine at speeds ~1 ipm the two motors do not start immediately, but there's a delay in one of them of a few seconds making the machine stall. Furthermore it seems to alternate which of the two motors gets the delay, it seems relative to direction.


Speculation: Is it possible that the stepper drivers are going into a sleep mode, and they only wake up when they see the direction pin change state? Possibly Mach3 toggles the DIR pins in a slightly different way.

With a step scale of 1909 and 0.5 in/min there are stil 16 pulses per second, though, so this doesn't quite fit with the stepper drives having the chance to sleep.

Are you 100% sure about the pin assignments? swapped enable and step lines can still work, to an extent and I think that with some drives you can get motion with swapped step and direction too. As you have it working with Mach I think this only needs to be a config check, not a wiring check.

You could check the parallel port pin state with halscope, but a real scope would be more definitive. However as both stepper drives share software stepgen I would be surprised if there was a difference on the output pins.

It might _possibly_ be a marginal step timing issue. 1uS is a pretty short step pulse. Try 4000 as the reset time, just as an experiment.
The following user(s) said Thank You: Knas

Please Log in or Create an account to join the conversation.

More
13 Feb 2015 02:30 #55936 by Knas
That did it! Set the reset to 5000 as i have 5uS in Mach3 and now it runs perfectly! Thank you so much, finally able to remove the windows partition from yet another computer :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum