So i tried setting stepspace = 10000 but no change. Then i tried setting
both steplen and stepspace to 10000 and also no change. It seems as if
LinuxCNC ignores my values.
When i open HAL Meter and show the current value it shows me 75000 for
both of them. But this would mean 75µs pulse width which i don't have.
It is still around 2,3µs.
I attached my old confiurations and maybe someone can see what the
problem is. I don't know if i have to change something else for the
current version of LinuxCNC. I only know that the configs worked back
then when i last used them 15 years ago. :)
Ciao,
Rainer
Am 02.06.21 um 19:21 schrieb Fox Mulder:
Thanks for the hint. I will try to set stepspace at a higher value.
And i know about the newer Drivers. I already use DRV8825 for a new
project and it is far superior to the old L297/L298 combo.
At the moment i just want to get the old hardware running and i already
have planed to replace the old driver with a new one somewhere in the
future. But as long as it works for my intention it is ok. :)
Ciao,
Rainer
Am 02.06.21 um 18:31 schrieb Chris Albertson:
That 0.5 uS spec is for the minimum time the clock needs to be low.
STEPLEN is the time to remain high. You have STEPSPACE=0 which
means the
low time is to be "0 nanoseconds". I'd make STEPSPACE much larger.
BTW, that L297 is primitive at best. You'd be amazed at how much better
the new stepper drivers are and the price has come down. You get much
better performance (more speed and torque) and no high-pitched noise.
Something like one of these on each axis would be a great upgrade. Buy a
24V or 35V power supply to go with it.
.omc-stepperonline.com/digital-stepper-driver/digital-stepper-driver-18~56a-20-50vdc-for-nema-23-24-34-stepper-motor-dm556t.html
<https://www.omc-stepperonline.com/digital-stepper-driver/digital-stepper-driver-18~56a-20-50vdc-for-nema-23-24-34-stepper-motor-dm556t.html>
On Wed, Jun 2, 2021 at 5:48 AM Fox Mulder <[email protected]> wrote:
Hi,
i try to reactivate my old self-build cnc mill with stepper motors and
come to a little problem. My 15 year old electronics seems all still to
work. It uses L297/L298 stepper drivers driven by the parallel port from
my old pc which is quite outdated but this doesn't matter at the moment.
I reinstalled Debian with LinuxCNC v2.8.1 and at first start it updated
my old config files. But then when i try to jog one of my axes it
doesn't work. I only get some jitter from the motors but no movement.
After some investigation i found out that the width of the step pulses
is too small. At the moment they are ~2,3µs which should be valid
because the datasheet of the L297 says a minimum of 0,5µs is ok. But
when i try the step generation with a simple python script which has a
wider step pulse the motors move how they should. So i think i can get
it to work again with a wider pulse.
Now to my question, how to make the pulse width for the step signal
wider. I read in the stepgen module about the steplen parameter but it
seems i'm not setting it correct.
In my old hal file the configuration for the stepgen module looks like
this:
loadrt stepgen step_type=0,0,0
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
addf stepgen.update-freq servo-thread
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 51056
setp stepgen.0.dirsetup 21056
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
Now i tried to increase steplen to something like 10000 and expected a
step pulse width of ~10µs but nothing changes. The pulse width is still
~2,3µs.
Is there something i'm missing or what is the best way to change the
pulse width of the generated step signal?
Ciao,
Rainer
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0xCC00 out 0xC400 in"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf parport.1.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.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 <= spindle.0.speed-out
net spindle-on <= spindle.0.on
setp parport.0.pin-01-out-invert 1
net estop-out => parport.0.pin-01-out
net estop-out => iocontrol.0.emc-enable-in
net estop-out <= iocontrol.0.user-enable-out
net xdir => parport.0.pin-02-out
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
setp parport.0.pin-03-out-invert 1
net ydir => parport.0.pin-04-out
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
setp parport.0.pin-05-out-invert 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
setp parport.0.pin-07-out-invert 1
# falscher pin. richtiger steht in postgui.hal
#net spindle-on => parport.0.pin-14-out
net probe motion.probe-input <= parport.1.pin-08-in
net min-home-x <= parport.1.pin-07-in
net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
net max-x <= parport.1.pin-04-in
net max-x => joint.0.pos-lim-sw-in
net min-home-y <= parport.1.pin-03-in
net min-home-y => joint.1.home-sw-in
net min-home-y => joint.1.neg-lim-sw-in
net max-y <= parport.1.pin-06-in
net max-y => joint.1.pos-lim-sw-in
net min-home-z <= parport.1.pin-02-in
net min-home-z => joint.2.home-sw-in
net min-home-z => joint.2.neg-lim-sw-in
net max-z <= parport.1.pin-05-in
net max-z => joint.2.pos-lim-sw-in
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 10000
setp stepgen.0.stepspace 10000
setp stepgen.0.dirhold 51056
setp stepgen.0.dirsetup 21056
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 10000
setp stepgen.1.stepspace 10000
setp stepgen.1.dirhold 51056
setp stepgen.1.dirsetup 21056
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 10000
setp stepgen.2.stepspace 10000
setp stepgen.2.dirhold 51056
setp stepgen.2.dirsetup 21056
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
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
[EMC]
# The version string for this INI file.
VERSION = 1.1
MACHINE = 3D_CNC_Fraese
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 3
PROGRAM_PREFIX = /home/quakeman/linuxcnc/configs/quakeman.axis
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm .005mm
[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
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 75000
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = 3D_CNC_Fraese.hal
POSTGUI_HALFILE =
/home/quakeman/linuxcnc/configs/quakeman.axis/tools_postgui.hal
[HALUI]
MDI_COMMAND = o<laser_cal> call
MDI_COMMAND = /home/quakeman/linuxcnc/configs/quakeman.axis/M101
MDI_COMMAND = G92 X0 Y0
MDI_COMMAND = G92 Z0
MDI_COMMAND = G92.1
MDI_COMMAND = G28.1
MDI_COMMAND = G28
MDI_COMMAND = G30.1
MDI_COMMAND = G30
[TRAJ]
COORDINATES = XYZ
AXES = 3
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_VELOCITY = 13.00
MAX_LINEAR_VELOCITY = 13.00
POSITION_FILE = position.txt
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[KINS]
KINEMATICS = trivkins coordinates=XYZ
JOINTS = 3
[AXIS_0]
MIN_LIMIT = 0.0
MAX_LIMIT = 280.0
MAX_VELOCITY = 13.0
MAX_ACCELERATION = 50.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
STEPGEN_MAXACCEL = 62.5
SCALE = 250.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -13.0
HOME_LATCH_VEL = 0.50
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_1]
MIN_LIMIT = 0.0
MAX_LIMIT = 175.0
MAX_VELOCITY = 13.0
MAX_ACCELERATION = 50.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
STEPGEN_MAXACCEL = 62.5
SCALE = 250.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -13.0
HOME_LATCH_VEL = 0.50
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
[AXIS_2]
MIN_LIMIT = -10.0
MAX_LIMIT = 80.0
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 8.0
[JOINT_2]
TYPE = LINEAR
HOME = -10.0
STEPGEN_MAXACCEL = 10.0
SCALE = 500.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = -10.0
HOME_SEARCH_VEL = -6.0
HOME_LATCH_VEL = 0.50
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users