On Sun, 25 Oct 2020, Gene Heskett wrote:

Date: Sun, 25 Oct 2020 21:50:25 -0400
From: Gene Heskett <ghesk...@shentel.net>
Reply-To: EMC developers <emc-developers@lists.sourceforge.net>
To: EMC developers <emc-developers@lists.sourceforge.net>
Subject: [Emc-developers] pwmgen, mesa version, man page is?

Greetings all;

Some confusion about useing the mesa pwmgens in a 5i25 with the
5i25_7i76_1px2d.bit file loaded.  this bitfile fails to wire up the dir
output, but is as close to driveing a stock bob on p2 as there is.

I dont think this is the case, Both PWMgens have direction outputs


In order to use both pwmgens, I have added and ABS module for each
pwmgen, feeding it the pwmgen.xx.value, and using the sign bit output in
place of the missing pwmgen.01 mode=1 DIR line. But because I needed
both polarities to control the H-bridge, something I can get out of
pwmgen.00, I've swapped the spindle duties to pwmgen.01 which only needs
one dir signal, and put the A axis on pwmgen.00 where I can get the
complimentary DIRs out of TB3 on the 7i76D.

It almost works. I can run the spindle either direction but it runs it
slightly rough because the pwm output is in groups of pulses, making
perhaps 20 pulses, then stopping for a few milliseconds, then making
another group of pulses. Looking at the encoder output with a real
scope, the speed variation is nearly 50% while averaging the requested
100 revs.

I thought  my encoder was going out but its still tightly coupled to the
motor shaft, so there isn't any slippage unless its internal, and I have
about made up my mind to obtain another encoder.

Until I started up wireing up that car seat H-bridge from olymex to drive
the A axis as a servo. That motors encoder is wired up in hal, but is
not yet connected to the bobs inputs 1,2,3 for encoder.01's
IDX,encA,encB.  The IDX will be a switch on the BS-1, used for a home
switch, not wired up yet because the motor is yt to be mounte.

So there is not any A feedback.  For testing, pid.A.FF0 is 1, the
remaining pid inputs are all zero'd.

So theoreticly pid.A.output is straight thru from the [] keys.  The
cobbled up abs.A.sign works, giving a plus DIR signal to which ever side
of the top half of H-bridge you want the motor to run, while the bottom
half is pulsed by the pwm. And it switches the stepgen#3 outputs at
exactly 0.00000 at the pwmgen.00.value just like I expected.

But the pulses from that pwmgen.00 are coming out in groups, then
silence, basicly acting quite like the other pwmgen.01 now driving the
spindle rather noisily.


It sounds a bit like you have the wrong PWM mode set or a hardware issue

The PWM generator is described  in the hostmot2 manual page


I'm stumped. The DC supplies running the cards are solid at 5.1 and 12.05
for field power.



Has anyone a clue what I might be fighting with? The FUNCTION's shown in
the man page I assume do not exist for the mesa versions, so there are
no addf lines for them.  Should there be?
There are these addf's first:
addf    hm2_5i25.0.read_gpio    servo-thread
addf    hm2_5i25.0.read         servo-thread
couple more pages of addf's
# and finally, update machine
addf   hm2_5i25.0.write_gpio    servo-thread
addf   hm2_5i25.0.write         servo-thread

I do note that hm2_5i25.0.dpll.phase-error-us is dancing wildly, over
about a +-50 range, much wilder than the other 2 machines that have that
pin in the halmeter menu. They are only showing a +-1 or 2 dance.

Thanks all.

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)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to