On Wed, 15 Nov 2017, Gene Heskett wrote:
Date: Wed, 15 Nov 2017 09:14:49 -0500
From: Gene Heskett <[email protected]>
Reply-To: "Enhanced Machine Controller (EMC)"
<[email protected]>
To: [email protected]
Subject: Re: [Emc-users] For Peter C. Wallace
On Sunday 12 November 2017 05:12:54 andy pugh wrote:
On 12 November 2017 at 01:49, Gene Heskett <[email protected]>
wrote:
If I write a hal thing that changes the value pushed into the
encoder's scale input, how much of a time lag might there be to make
it effective?
The scaling does not happen in the Mesa layer, it happens in the HAL
driver.
But, the encoder scale is a parameter, not a pin, so you can't change
it in HAL.
What I would do would be to pass the hm2_..._position and
hm2..._...velocity through a pair of "scale" HAL functions with the
scaling factor for both chosen by a "mux2" controlled by the gear
selection before connecting to the motion... pins.
You might be able to use the "gearchange" component for this (or,
specifically, two more instances of the component) as this is
basically what it does, ie switch between two scales.
That I can do, but it does bring up a related question. Actually 2 or 3.
1. How long, probably in cycles, does it take motion to recover when it
finds a huge change in either its position, or velocity inputs which the
scale switching causes?
2. at what point does the accumulated position overflow? or is position
reset to zero on the index pulse? Seems to me like it ought to be, but I
don't recall anyone saying.
I intend to temporarily set up a counter to be frozen and reset in one
pulse, useing probably an edge module to tap the index pulse to transfer
the counter to a sample-hold, then reset the counter when the edge
recovers from a very short output pulse, with the sample-hold becoming
the value for the 2 scale modules for that gear. By running the motor
slow, I ought to be able to define the unknown, in this case the actual
gear ratio when in each of its 2 gears. Or maybe even use it as the
scale.n.gain input since its a pin, however I'd expect a count or more
to be skipped at the higher motor speeds and that would confuse the
scale values derived. Not a Good Thing.
Best to carve it into the ini file once determined.
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)
Genes Web page <http://geneslinuxbox.net:6309/gene>
I dont think any of that is needed, as long as you do not change the gear
ratio in the middle of a spindle synchronized move.
Spindle synchronized moves always start at index = spindle position 0,
and dealing with the spindle position "steps" is all handled in motion
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users