Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Gene Heskett
On Friday 24 February 2017 07:34:16 Ron Bean wrote:

> >What I'd like is a 0.1, 0.2, 0.5, 1.0, 2.0, 5.0 etc gain sequence,
> >extended another decade both directions.
>
> I like this idea a lot, I've been thinking along similar lines. I
> don't understand why every CNC controller uses 10x increments.

To control a mux16 I need a nibble sized 4 lines.

Aha! See man 9 multiswitch and set it for 4 bits wide. That will give the 
4 bits needed to drive a mux16, and the mux16 will have the 1,2.5 value 
sequence set at its inputs. Inputs can be setp'd, but I'd druther setp 
one master value, and scale all the other mux16 inputs from that. Set it 
once per axis in the .ini file. Now, can I put this outside the 
servo-thread loop, so all this is done once only at LCNC launch time?

Given the limited resources of the pi, I would much druther it was kept 
out of the servo loop execution every millisecond and done only at init 
time.  How can I do that? Hmmm, would need a sign bit too for both 
directions... In which case mul the reference by -1.000 and reapply to 
the mux16.  Perhaps a new mpg-thread, running at 10 milliseconds for 
this stuff?

What do you guru's think?

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 

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Ron Bean
>What I'd like is a 0.1, 0.2, 0.5, 1.0, 2.0, 5.0 etc gain sequence,
>extended another decade both directions.

I like this idea a lot, I've been thinking along similar lines. I don't 
understand why every CNC controller uses 10x increments.


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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Gene Heskett
On Friday 24 February 2017 05:53:35 andy pugh wrote:

> On 24 February 2017 at 10:44, Gene Heskett  
wrote:
> > But every scheme I come up demands the encoder be restored to
> > zero on the button release before the accumulated count can make the
> > machine move wildly.
>
> LinuxCNC handles that. No need to zero the counts.
>
> Wheel-jogging works on delta counts after the jog-enable pin goes
> true.

Ahh, did not know that. Good job of idiot proofing it already done.

You must have seen me coming. :)

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 

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Gene Heskett
On Friday 24 February 2017 00:08:42 Chris Albertson wrote:

> I don't think it works this way.  It does not power down.   But it
> does work exactly as per the specification.  There are 100 detented
> divisions per revolution.  The A and B phase of course only change
> when there is movement.
>
> In theory you can get 400 steps per rev but the wheel has detents so
> there is no good way to move it to a place between the marks.
>
> This is OK because we get to define what "one revolution" means.  It
> one rev is 0.01 inches them each mark is 0.0001 Will can define it to
> be inches or metric.  The division are as fine or course as you like. 
>  If you are building a user interface with this wheel I think what's
> needed is a selector that defines what one revolution means.   It will
> also need a "zero" button and and axis selector
>
> My plan is to place a small micro controller inside the pendent with
> the wheel and an LCD screen and some other controls.  The uP will do
> the translation.

Whereas I have i/o to throw away, so my LCD screen will be pyvcp tallys 
on the axis screen & hal modules doing the math. My dials will be 
mounted on the apron. Z lower left, X lower right. And my saddle will 
grow another piece of 3/8" OD SS pipe from the cable chain at the rear 
to the apron top for a piece of cat5 jumper cable I have yet to acquire.  
With 72 total I/O I can do some of that in hal.

All predicated on me finding enough round tuits of course. I have a Dr's 
appointment this afternoon, a decent excuse to stop someplace and get 
some stranded "jumper" cat5 for the cable chain. I'll get one of the 
elderly girls across the street to come in and sit with Dee while I'm 
gone.

> On Thu, Feb 23, 2017 at 6:31 PM, Gene Heskett  
wrote:
> > But I think its something we may be able to outwit in the hal file.
> >
> > They appear to have a power save shutdown, and a power up lag.
> >
> > And seem to have timings independent from each other.  This is going
> > to cause, unless we scale the encoder down by 4, one edge received
> > occurs just as you start to turn it by hand, and again some
> > milliseconds later after YOU have stopped turning the dial. When you
> > stop moving it, it goes back to zero volts a few milliseconds later.
> >
> > This is looking at the A/B terminals, I have not yet checked the
> > -A/-B terminals for their behavior.  It may be that this problem may
> > disappear if differential receivers with lots of histerisys(sp?,
> > when do we get a spell checker that knows these technical words?)
> > would just ignore this.
> >
> > But be aware its there guys if you feed it straight into the encoder
> > module as is. You have effectively only those positions at rest
> > corresponding to A,B=0.  None of the other three combo's are
> > available to you in the detent at rest condition. So you will move
> > in a modulo4 at the start, and end of a move, always ending up in
> > the 0/0 position when the wheel is at rest.
> >
> > I just checked the - terminals, it is not powering down, at rest
> > they are both at the 5 volt rail. I was hopeing that we might have a
> > true fine tune by using a straight edge went by=one motor microstep,
> > but thats not going to happen, best we can do is one micro-step per
> > detent felt.
> >
> > Now we know why such a precision looking and seemingly well built
> > wheel was only a 20 dollar bill. ;-)  You can only use 1/4 of its
> > real resolution.
> >
> > Now I need to find some cat5 intended for jumpers, eg stranded wire
> > for use in the cable chain to the saddle. But the last jumper I
> > bought was made from flat cable.  It works ok, but..., 8 wires isn't
> > enough for everything either, I still need independent home
> > switches, so thats 10. Sigh.  When does it end and you can switch to
> > use it mode?
> >
> > I did measure how far I can move the crossfeed in w/o exposing the
> > ball screw, 3.35". Thats enough to  put the tool tip on centerline,
> > and work on something 6.7" in diameter w/o throwing swarf into the
> > slot.  Said another way, stuff will need to be zeroed and an air cut
> > made to check if its still covered at the smallest diameter of the
> > job.  If not, move the toolpost mount, rezero, and cut some more
> > air.
> >
> > 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 
> >
> > 
> > --
> > 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
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of 

Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread andy pugh
On 24 February 2017 at 10:44, Gene Heskett  wrote:
> But every scheme I come up demands the encoder be restored to
> zero on the button release before the accumulated count can make the
> machine move wildly.

LinuxCNC handles that. No need to zero the counts.

Wheel-jogging works on delta counts after the jog-enable pin goes true.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Gene Heskett
On Thursday 23 February 2017 23:14:37 Kurt Jacobson wrote:

> Gene, my MPG works great. Does not have any lag at all. The 400ppr did
> throw me off at first when the machine jogged four times the jog
> scale. I put a fix for that in the MPG comp I wrote, it just divides
> the jog scale by whatever the mpg-pulses parameter is set to, 4 in
> this case.
>
> I like the 400ppm as I don't need to use a lowpass like with the
> 100ppm MPGs to get smooth motion.
>
> Kurt

Thats great, Kurt. Thanks. And I'm noodling around, trying to come up 
with a way to control the gain so it takes less furious spinning to move 
a foot. But every scheme I come up demands the encoder be restored to 
zero on the button release before the accumulated count can make the 
machine move wildly.  I'll sort out something... There are a lot 
of "handles" sticking out of the encoder module. :)

What I'd like is a 0.1, 0.2, 0.5, 1.0, 2.0, 5.0 etc gain sequence, 
extended another decade both directions. I can display the state of the 
gain with pyvcp with little problem.

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 

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-24 Thread Gene Heskett
On Thursday 23 February 2017 22:44:19 Jon Elson wrote:

> On 02/23/2017 08:31 PM, Gene Heskett wrote:
> > But I think its something we may be able to outwit in the hal file.
> >
> > They appear to have a power save shutdown, and a power up lag.
> >
> > And seem to have timings independent from each other.  This is going
> > to cause, unless we scale the encoder down by 4, one edge received
> > occurs just as you start to turn it by hand, and again some
> > milliseconds later after YOU have stopped turning the dial. When you
> > stop moving it, it goes back to zero volts a few milliseconds later.
>
> Sorry, Gene, you are wrong.  They don't power down, but the
> detent draws the dial to the state where A=B=0.
> If you hold the dial between detents, the A or B outputs
> hold at whatever level they should.  When you let go, it
> drops into the detent again, and outputs are zero.  This is
> all as it should be.
>
> YES, it gives 400 quadrature counts per rev, so you need to
> scale the encoder by a factor of 4 to get rational units per
> detent step.
>
> Jon
>
I wondered if that might not be the case, but I still got the same 
behaviour when I tried to hold it between detents. Maybe my bit of hand 
shake fooled me. They aren't as steady as they once were. :(

That was just powered up on the table watching it with the fawncy 
sampling scope. That I haven't 100% learned to run yet, its too darned 
automatic.

Thanks Jon.

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 

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-23 Thread Gene Heskett
On Thursday 23 February 2017 22:37:59 Jon Elson wrote:

> On 02/23/2017 08:31 PM, Gene Heskett wrote:
> > But I think its something we may be able to outwit in the hal file.
> >
> > They appear to have a power save shutdown, and a power up lag.
> >
> > And seem to have timings independent from each other.  This is going
> > to cause, unless we scale the encoder down by 4, one edge received
> > occurs just as you start to turn it by hand, and again some
> > milliseconds later after YOU have stopped turning the dial. When you
> > stop moving it, it goes back to zero volts a few milliseconds later.
>
> OH, MY!!!  Thanks for finding this stupidity!  Explains why
> there are in the sale bin at M. P. Jones!
>
> I wonder if there's a jumper pad inside that can defeat this
> behavior?
>
> Jon

No clue Jon. Do you feel brave? I'm generally up to it with the missus & 
running out of back before I get to this lathe.

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


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 

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-23 Thread Chris Albertson
I don't think it works this way.  It does not power down.   But it does
work exactly as per the specification.  There are 100 detented divisions
per revolution.  The A and B phase of course only change when there is
movement.

In theory you can get 400 steps per rev but the wheel has detents so there
is no good way to move it to a place between the marks.

This is OK because we get to define what "one revolution" means.  It one
rev is 0.01 inches them each mark is 0.0001 Will can define it to be inches
or metric.  The division are as fine or course as you like.   If you are
building a user interface with this wheel I think what's needed is a
selector that defines what one revolution means.   It will also need a
"zero" button and and axis selector

My plan is to place a small micro controller inside the pendent with the
wheel and an LCD screen and some other controls.  The uP will do the
translation.



On Thu, Feb 23, 2017 at 6:31 PM, Gene Heskett  wrote:

> But I think its something we may be able to outwit in the hal file.
>
> They appear to have a power save shutdown, and a power up lag.
>
> And seem to have timings independent from each other.  This is going to
> cause, unless we scale the encoder down by 4, one edge received occurs
> just as you start to turn it by hand, and again some milliseconds later
> after YOU have stopped turning the dial. When you stop moving it, it
> goes back to zero volts a few milliseconds later.
>
> This is looking at the A/B terminals, I have not yet checked the -A/-B
> terminals for their behavior.  It may be that this problem may disappear
> if differential receivers with lots of histerisys(sp?, when do we get a
> spell checker that knows these technical words?) would just ignore this.
>
> But be aware its there guys if you feed it straight into the encoder
> module as is. You have effectively only those positions at rest
> corresponding to A,B=0.  None of the other three combo's are available
> to you in the detent at rest condition. So you will move in a modulo4 at
> the start, and end of a move, always ending up in the 0/0 position when
> the wheel is at rest.
>
> I just checked the - terminals, it is not powering down, at rest they are
> both at the 5 volt rail. I was hopeing that we might have a true fine
> tune by using a straight edge went by=one motor microstep, but thats not
> going to happen, best we can do is one micro-step per detent felt.
>
> Now we know why such a precision looking and seemingly well built wheel
> was only a 20 dollar bill. ;-)  You can only use 1/4 of its real
> resolution.
>
> Now I need to find some cat5 intended for jumpers, eg stranded wire for
> use in the cable chain to the saddle. But the last jumper I bought was
> made from flat cable.  It works ok, but..., 8 wires isn't enough for
> everything either, I still need independent home switches, so thats 10.
> Sigh.  When does it end and you can switch to use it mode?
>
> I did measure how far I can move the crossfeed in w/o exposing the ball
> screw, 3.35". Thats enough to  put the tool tip on centerline, and work
> on something 6.7" in diameter w/o throwing swarf into the slot.  Said
> another way, stuff will need to be zeroed and an air cut made to check
> if its still covered at the smallest diameter of the job.  If not, move
> the toolpost mount, rezero, and cut some more air.
>
> 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 
>
> 
> --
> 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
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>



-- 

Chris Albertson
Redondo Beach, California
--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-23 Thread Kurt Jacobson
Gene, my MPG works great. Does not have any lag at all. The 400ppr did
throw me off at first when the machine jogged four times the jog scale. I
put a fix for that in the MPG comp I wrote, it just divides the jog scale
by whatever the mpg-pulses parameter is set to, 4 in this case.

I like the 400ppm as I don't need to use a lowpass like with the 100ppm
MPGs to get smooth motion.

Kurt

On Thu, Feb 23, 2017 at 10:44 PM, Jon Elson  wrote:

> On 02/23/2017 08:31 PM, Gene Heskett wrote:
> > But I think its something we may be able to outwit in the hal file.
> >
> > They appear to have a power save shutdown, and a power up lag.
> >
> > And seem to have timings independent from each other.  This is going to
> > cause, unless we scale the encoder down by 4, one edge received occurs
> > just as you start to turn it by hand, and again some milliseconds later
> > after YOU have stopped turning the dial. When you stop moving it, it
> > goes back to zero volts a few milliseconds later.
> >
> >
> Sorry, Gene, you are wrong.  They don't power down, but the
> detent draws the dial to the state where A=B=0.
> If you hold the dial between detents, the A or B outputs
> hold at whatever level they should.  When you let go, it
> drops into the detent again, and outputs are zero.  This is
> all as it should be.
>
> YES, it gives 400 quadrature counts per rev, so you need to
> scale the encoder by a factor of 4 to get rational units per
> detent step.
>
> Jon
>
> 
> --
> 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
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-23 Thread Jon Elson
On 02/23/2017 08:31 PM, Gene Heskett wrote:
> But I think its something we may be able to outwit in the hal file.
>
> They appear to have a power save shutdown, and a power up lag.
>
> And seem to have timings independent from each other.  This is going to
> cause, unless we scale the encoder down by 4, one edge received occurs
> just as you start to turn it by hand, and again some milliseconds later
> after YOU have stopped turning the dial. When you stop moving it, it
> goes back to zero volts a few milliseconds later.
>
>
Sorry, Gene, you are wrong.  They don't power down, but the 
detent draws the dial to the state where A=B=0.
If you hold the dial between detents, the A or B outputs 
hold at whatever level they should.  When you let go, it 
drops into the detent again, and outputs are zero.  This is 
all as it should be.

YES, it gives 400 quadrature counts per rev, so you need to 
scale the encoder by a factor of 4 to get rational units per 
detent step.

Jon

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


Re: [Emc-users] Those encoder dials have a gotcha

2017-02-23 Thread Jon Elson
On 02/23/2017 08:31 PM, Gene Heskett wrote:
> But I think its something we may be able to outwit in the hal file.
>
> They appear to have a power save shutdown, and a power up lag.
>
> And seem to have timings independent from each other.  This is going to
> cause, unless we scale the encoder down by 4, one edge received occurs
> just as you start to turn it by hand, and again some milliseconds later
> after YOU have stopped turning the dial. When you stop moving it, it
> goes back to zero volts a few milliseconds later.
OH, MY!!!  Thanks for finding this stupidity!  Explains why 
there are in the sale bin at M. P. Jones!

I wonder if there's a jumper pad inside that can defeat this 
behavior?

Jon

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