On 9/19/23 20:12, Peter Wallace wrote:
On Tue, 19 Sep 2023, gene heskett wrote:
Date: Tue, 19 Sep 2023 19:23:23 -0400
From: gene heskett <ghesk...@shentel.net>
Reply-To: "Enhanced Machine Controller (EMC)"
<emc-users@lists.sourceforge.net>
To: "'Enhanced Machine Controller (EMC)'"
<emc-users@lists.sourceforge.net>
Subject: [Emc-users] question for Peter C. Wallace
Greeting Peter;
I hope this finds you well.
I am installing a new A axis on my go704, and am trying to exercise it
before moving 99% of the actual driver code code in from another
machine with identical hdwe for its B axis.
I have loaded a siggen to use its triangular drive as input to the
joint.03.position-cmd, with the amplitude set to 2.5 and this for the
rest of the dummy code:
setp hm2_5i25.0.stepgen.03.enable true #turn it on
setp siggen.0.frequency 10
setp siggen.0.amplitude 2.5
setp hm2_5i25.0.stepgen.03.steplen 4000
setp hm2_5i25.0.stepgen.03.stepspace 10000
setp hm2_5i25.0.stepgen.03.dirhold 6000
setp hm2_5i25.0.stepgen.03.dirsetup 6000
net mtr-test
<= siggen.0.triangle =>
hm2_5i25.0.stepgen.03.position-cmd
So tb2-20 to 23 on the 7i76D is supposed to be stepgen.03.outputs.
man siggen says it should be symmetrical if no offset is set. But dir
on neither pin is anywhere near 50/50, closer to 5/95, and faster than
the above 10 a sec by quite a bit, and the step terminals are a solid
5 volt or zero volts, no activity at all.
This on a 4 channel storage scope with a 350MHz bandwidth. Siglent's
best. That puppy doesn't miss a thing.
Did I miss a setp above?
Thanks Peter.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
You would also need to set reasonable stepgen acceleration and
velocity limits.
In addition, It may be that because you have a non-differentiable
position command (Triangle wave) that you have started an
instability in the built in position mode, so a sine wave would
be a better test.
For best performance where the are possible large following
errors it's better to use the stepgens in velocity mode and
close the (local) position with a PID loop.
Another thing that has confused me, is the lack of a typical hal hookup
example for each mode. Folks in the know throw that terminology
difference out there, assuming everybody on the planet knows the
difference but we don't.
Here is how two of these motors are configured on a 6040 mill:
#*************
# Z axis stuff
#*************
setp hm2_5i25.0.stepgen.02.position-scale [JOINT_2]STEPSCALE
setp hm2_5i25.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd <= joint.2.motor-pos-cmd =>
hm2_5i25.0.stepgen.02.position-cmd
net zpos-fb <= hm2_5i25.0.stepgen.02.position-fb =>
joint.2.motor-pos-fb
net zenable <= joint.2.amp-enable-out =>
hm2_5i25.0.stepgen.02.enable
#*************
# A or B axis stuff
#*************
# here I need a pullup to field power, say about 10k to 22k to give
# a true reading when unplugged.
net b-prsnt <= hm2_5i25.0.7i76.0.0.input-09 # high is it plugged in?
# so first, go add that.
setp hm2_5i25.0.stepgen.03.position-scale [JOINT_3]STEPSCALE
setp hm2_5i25.0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_5i25.0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_5i25.0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_5i25.0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_5i25.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
#this work for A o B
net bpos-cmd <= joint.3.motor-pos-cmd => hm2_5i25.0.stepgen.03.position-cmd
net bpos-fb <= hm2_5i25.0.stepgen.03.position-fb => joint.3.motor-pos-fb
net benable <= joint.3.amp-enable-out => hm2_5i25.0.stepgen.03.enable
No PID's anyplace but it does beautiful work. 2 more of these
stepper/servo's are moving my Sheldon lathe, no PID's there either.
And I think you'd call both Z & B position loops.
Take care & stay well, Peter.
Typical settings for the loop are
P = 1/servo period so 1000 for a 1 ms servo thread
FF1 = 1.000
FF2 = Time between Position read and velocity write
(say 20 us on a PCI card =.00002, perhaps 200 usec on a
Ethernet card = .0002)
Peter Wallace
Mesa Electronics
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users