On Sunday 21 July 2019 23:20:26 John Dammeyer wrote:

> HI everyone,
> I think I've finally figured out the configuration for my Harmonic
> Drive axis but I'm not sure.  So I thought I'd talk out loud and
> describe what I've done.  Perhaps this will also help some else figure
> what to do.  Some of the arithmetic is a bit tedious but bear with me.
>
> My A Axis  FHA-25B-6015 Harmonic drive has an AC servo run with the
> STMBL driver. The motor voltage rating is max 200VDC and I'm running
> it on the 105VDC Servo Power supply. It has an encoder with 1500 lines
> or 6000 quadrature pulses per rev and a 50:1 harmonic drive gearing.
>
> The Harmonic Drive is rated at 60 RPM (which I believe is the output
> of the drive) that implies the Servo inside has a top speed of 3000
> RPM (50:1)

60 rpm * 6000 edges=360000 to turn it 60 times. 1 full turn in one second 
would then=6000, the number of A and B edges that go by.  Thats assuming 
the encoder is in the output shaft.  And that would rather poor 
resolution.  Now if that 1500 line encoder is on the motor shaft, with a 
50/1 reduction. then we have 6000 edges*50=300000 steps to make one full 
turn.  That. in one second is likely beyond the steppers follow range 
since you're running on nominally half voltage.  It may even be beyond 
the speed rating of the opto's in the STMBL if it has them.

What might be confusing is that your are crossing the edges from the 
encoder, with steps to move the drive, which are of course linked by the 
math, but aren't going to be 1 for 1. Unless by pure serendipity...

> The STMBL is configured as follows with the 1500 lines on the encoder
> and I have no idea why there is a *2 multiplier in the formula. 
> Unless I've made a 2x mistake all along the way the number of steps to
> turn 360 degrees works.
>
> Here's what is needed in the STMBL config file.  Since I can't step
> faster than about 35kHz at the moment it's easier to not use
> quadrature from the encoder. # 1500 lines * 50 revolutions = 75000
> steps on the input = 50 motor turns # to get this set conf0.cmd_res to
> 75000/50*2 = 3000

And I am lost, not having any experience with an STMBL driver.

> With 60RPM max that's 1 RPS or 75000 steps per second.

75000 Hz? Piece of cake for anything but software stepping.  Some are 
said to be able to do 10 megasteps, but thats beyond the range of the 
commonly available drivers.

Most any of the "hardware stepper drivers" can overrun the opto's, which 
in my fooling around generally get befuddled in the 200000 to 350000 pps 
range.

Now, another ugly thought, because it happened to me when I put that 1000 
line encoder directly on my spindle motor by adding a back shaft. 
Depending on the spindle gear it went berzerkers. What was happening was 
that the SainSmart BoB's I was using, had opto's for input isolation, 
and my pulse rate from the encoder was about 3x faster than those opto's 
could pass.  So out came that BoB, and I traced those two inputs on the 
pcb to the individual opto unit, removed it and bypassed it. Put the BoB 
back in, end of problem. The 5i25 and its ilk can count to several 
Megahertz.

Do you have a decent scope? 50-100 MHz dual trace? Look at the encoder 
signals as they leave the BoB, headed for the interface card.  If you 
don't have pulses that are flat on both the upper and lower parts of 
that waveform, running from about .1 volt to 4.95 volts, what is 
commonly called rail to rail. Thats the first thing you fix, probably by 
removing and bypassing those opto's.
> Can't generate 
> that yet and even if I could I'd probably need the 200VDC motor
> voltage to get there.
>
> Now from the LinuxCNC perspective.  LinuxCNC  doesn't really care
> about steps but we actually do care because we have to set up a scale.
>  If there are 75000 steps in one 360 degree revolution then each
> degree has 75000/360 = 208.3333333333 steps and that's the SCALE value
> in the INI file.  How many steps per degree since that's what it needs
> for the degrees per second rate calculation.
>
> Figuring out the maximum axis speed is where I keep stumbling around
> and confusing myself.    With a stepping rate of 75kHz I'm turning 360
> degrees per second so that would be the MAX_VELOCITY value in the INI
> file.  But the AXIS display shows numbers per minute so multiply that
> by 60 would result in 21600 degrees/Minute.
>
> Conservatively then running 1/3rd of that  or 25kHz which is 120
> degrees per second equal to 7200 degrees per minute.  The motor does
> that quite nicely.  In fact with half the motor voltage ideally it
> should reach 37.5kHz or 180 degrees per second which is 10,800
> Degrees/Minute.    And the Axis display shows it doing 10,800
> Degrees/minute without a problem in the photo.   Increase much past
> that and I get a following error failure.  Which makes sense.  The
> motor needs 200V to go full speed.  The parallel port stepping
> probably gets a bit ragged over 30kHz since I get that nag warning on
> start-up  that there are latency timing problems.
>
> So here's the INI file information.
> [AXIS_3]
> TYPE = ANGULAR
> HOME = 0.0
> MAX_VELOCITY = 180.00
> MAX_ACCELERATION = 720.0
> STEPGEN_MAXACCEL = 800.00
> SCALE= 208.33333333333
> FERROR = 1
> MIN_FERROR = .25
> MIN_LIMIT = -99999.0
> MAX_LIMIT = 99999.0
> HOME_OFFSET = 0.0
> HOME_SEARCH_VEL = 0
> HOME_LATCH_VEL = 0
> HOME_FINAL_VEL = 0
> HOME_IGNORE_LIMITS = YES
> HOME_USE_INDEX = 0
> HOME_SEQUENCE = 0
>
> The HAL file interface is also simple since this is run as a step/dir
> drive. net astep           => parport.0.pin-08-out
> setp parport.0.pin-08-out-reset 1
> setp parport.0.pin-09-out-invert 1
> net adir            => parport.0.pin-09-out
>
Ahh, so you are using "software" stepping.  That puts some fairly severe 
speed limits into play. One of the mesa cards like a 5i25 will fix that 
and give you the equ of two parports too. It will also fix encoder 
mistakes the software encoder might be making at the higher speeds.

> If anyone has suggestions on how to improve this or if I've made some
> glaring stupid mistake I'd appreciate the feedback. John Dammeyer


Cheers John, 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-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to