[Emc-users] missing tooth index questions..

2022-09-18 Thread Sam Sokolik
I have a optical encoder from a mouse running on an emco encoder wheel (100
holes).  I cut out the metal between 2 holes.  I think that would be
considered one missing tooth...  I have the encoder scale set to 100 and
the missing tooth set to 1

I have a little comp that sets the index enable to true whenever it is
false.

Looking at the halscope screen shot - it only counts to 98..  I would think
it would count from 0 to 99.  You can see the gap is seen - but I think
there should be an extra count in there..

(I could be not understanding it too)

ps - if I set the missing teeth to 2 - it will not trigger (like it doesn't
see the gap then which seems correct)

thanks!
sam
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Sam Sokolik
in case that screenshot didn't come through

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2015-43-25.png

On Sun, Sep 18, 2022 at 3:50 PM Sam Sokolik  wrote:

> I have a optical encoder from a mouse running on an emco encoder wheel
> (100 holes).  I cut out the metal between 2 holes.  I think that would be
> considered one missing tooth...  I have the encoder scale set to 100 and
> the missing tooth set to 1
>
> I have a little comp that sets the index enable to true whenever it is
> false.
>
> Looking at the halscope screen shot - it only counts to 98..  I would
> think it would count from 0 to 99.  You can see the gap is seen - but I
> think there should be an extra count in there..
>
> (I could be not understanding it too)
>
> ps - if I set the missing teeth to 2 - it will not trigger (like it
> doesn't see the gap then which seems correct)
>
> thanks!
> sam
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread dave engvall
This may be a bit wild  but use pll and trigger when the expected pulse 
doesn't appear. Maybe a bit far out of the box.

Basically the reverse of synchronous detection.
D

On 9/18/22 1:59 PM, Sam Sokolik wrote:

in case that screenshot didn't come through

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2015-43-25.png

On Sun, Sep 18, 2022 at 3:50 PM Sam Sokolik  wrote:


I have a optical encoder from a mouse running on an emco encoder wheel
(100 holes).  I cut out the metal between 2 holes.  I think that would be
considered one missing tooth...  I have the encoder scale set to 100 and
the missing tooth set to 1

I have a little comp that sets the index enable to true whenever it is
false.

Looking at the halscope screen shot - it only counts to 98..  I would
think it would count from 0 to 99.  You can see the gap is seen - but I
think there should be an extra count in there..

(I could be not understanding it too)

ps - if I set the missing teeth to 2 - it will not trigger (like it
doesn't see the gap then which seems correct)

thanks!
sam


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Ed

On 9/18/22 3:50 PM, Sam Sokolik wrote:

I have a optical encoder from a mouse running on an emco encoder wheel (100
holes).  I cut out the metal between 2 holes.  I think that would be
considered one missing tooth...  I have the encoder scale set to 100 and
the missing tooth set to 1

I have a little comp that sets the index enable to true whenever it is
false.

Looking at the halscope screen shot - it only counts to 98..  I would think
it would count from 0 to 99.  You can see the gap is seen - but I think
there should be an extra count in there..


Am I missing something? 0-99=100 inclusive.


Ed.




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Martin Dobbins
Er 100 minus 2 (the holes you cut metal between is 98?

From: Ed 
Sent: Sunday, September 18, 2022 4:53 PM
To: emc-users@lists.sourceforge.net 
Subject: Re: [Emc-users] missing tooth index questions..

On 9/18/22 3:50 PM, Sam Sokolik wrote:
> I have a optical encoder from a mouse running on an emco encoder wheel (100
> holes).  I cut out the metal between 2 holes.  I think that would be
> considered one missing tooth...  I have the encoder scale set to 100 and
> the missing tooth set to 1
>
> I have a little comp that sets the index enable to true whenever it is
> false.
>
> Looking at the halscope screen shot - it only counts to 98..  I would think
> it would count from 0 to 99.  You can see the gap is seen - but I think
> there should be an extra count in there..

Am I missing something? 0-99=100 inclusive.


Ed.




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread John Dammeyer
Much easier to visualize if you use less holes I think?

I first made 6 holes and then laid out two arcs and created a longer slot from 
two of the holes.

I count 5 holes and 5 spaces between the holes.  Are you sure you actually cut 
100 holes?

John Dammeyer


> -Original Message-
> From: Sam Sokolik [mailto:samco...@gmail.com]
> Sent: September-18-22 1:51 PM
> To: Enhanced Machine Controller (EMC)
> Subject: [Emc-users] missing tooth index questions..
> 
> I have a optical encoder from a mouse running on an emco encoder wheel (100
> holes).  I cut out the metal between 2 holes.  I think that would be
> considered one missing tooth...  I have the encoder scale set to 100 and
> the missing tooth set to 1
> 
> I have a little comp that sets the index enable to true whenever it is
> false.
> 
> Looking at the halscope screen shot - it only counts to 98..  I would think
> it would count from 0 to 99.  You can see the gap is seen - but I think
> there should be an extra count in there..
> 
> (I could be not understanding it too)
> 
> ps - if I set the missing teeth to 2 - it will not trigger (like it doesn't
> see the gap then which seems correct)
> 
> thanks!
> sam
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Ed

On 9/18/22 5:24 PM, Martin Dobbins wrote:

Er 100 minus 2 (the holes you cut metal between is 98?


He cut out the metal between two holes to make 99 holes, one being twice 
as wide as the rest. Did I follow that right?




From: Ed 
Sent: Sunday, September 18, 2022 4:53 PM
To: emc-users@lists.sourceforge.net 
Subject: Re: [Emc-users] missing tooth index questions..

On 9/18/22 3:50 PM, Sam Sokolik wrote:

I have a optical encoder from a mouse running on an emco encoder wheel (100
holes).  I cut out the metal between 2 holes.  I think that would be
considered one missing tooth...  I have the encoder scale set to 100 and





___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Sam Sokolik
ok..  It might be working?   I made a hal component that would set index
enable to true after so many encoder counts.   I set it to 998 (<10
rotations) to set the index enable to true.. and the encoder position was
9.98...

so it isn't losing every rotation.  so I 'think' it is working right...

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2018-41-42.png

sam

On Sun, Sep 18, 2022 at 5:54 PM Ed  wrote:

> On 9/18/22 5:24 PM, Martin Dobbins wrote:
> > Er 100 minus 2 (the holes you cut metal between is 98?
>
> He cut out the metal between two holes to make 99 holes, one being twice
> as wide as the rest. Did I follow that right?
>
> > 
> > From: Ed 
> > Sent: Sunday, September 18, 2022 4:53 PM
> > To: emc-users@lists.sourceforge.net 
> > Subject: Re: [Emc-users] missing tooth index questions..
> >
> > On 9/18/22 3:50 PM, Sam Sokolik wrote:
> >> I have a optical encoder from a mouse running on an emco encoder wheel
> (100
> >> holes).  I cut out the metal between 2 holes.  I think that would be
> >> considered one missing tooth...  I have the encoder scale set to 100 and
>
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Sam Sokolik
yep - andy is a genius...
(and halscope is really cool..)

I triggered on the rising edge of the index enable and put it one rotation
back..   You can see the position is counting up by .01 each time by the
steps.  Then the gap happens and the next step is .02 so the rotation
position ends at 1...

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2020-55-28.png

On Sun, Sep 18, 2022 at 6:48 PM Sam Sokolik  wrote:

> ok..  It might be working?   I made a hal component that would set index
> enable to true after so many encoder counts.   I set it to 998 (<10
> rotations) to set the index enable to true.. and the encoder position was
> 9.98...
>
> so it isn't losing every rotation.  so I 'think' it is working right...
>
>
> https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2018-41-42.png
>
> sam
>
> On Sun, Sep 18, 2022 at 5:54 PM Ed  wrote:
>
>> On 9/18/22 5:24 PM, Martin Dobbins wrote:
>> > Er 100 minus 2 (the holes you cut metal between is 98?
>>
>> He cut out the metal between two holes to make 99 holes, one being twice
>> as wide as the rest. Did I follow that right?
>>
>> > 
>> > From: Ed 
>> > Sent: Sunday, September 18, 2022 4:53 PM
>> > To: emc-users@lists.sourceforge.net 
>> > Subject: Re: [Emc-users] missing tooth index questions..
>> >
>> > On 9/18/22 3:50 PM, Sam Sokolik wrote:
>> >> I have a optical encoder from a mouse running on an emco encoder wheel
>> (100
>> >> holes).  I cut out the metal between 2 holes.  I think that would be
>> >> considered one missing tooth...  I have the encoder scale set to 100
>> and
>>
>>
>>
>>
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-18 Thread Sam Sokolik
well - the mouse sensor seems to work up to 400rpm..  About the fastest I
can do without breaking something...

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2021-03-39.png

https://photos.app.goo.gl/GRgXpfJwB7hCZBMT7

sensor board still needs to be fastened to the 3d printed part..  (might
just heatmelt the line up pins..

sam

On Sun, Sep 18, 2022 at 8:58 PM Sam Sokolik  wrote:

> yep - andy is a genius...
> (and halscope is really cool..)
>
> I triggered on the rising edge of the index enable and put it one rotation
> back..   You can see the position is counting up by .01 each time by the
> steps.  Then the gap happens and the next step is .02 so the rotation
> position ends at 1...
>
>
> https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2020-55-28.png
>
> On Sun, Sep 18, 2022 at 6:48 PM Sam Sokolik  wrote:
>
>> ok..  It might be working?   I made a hal component that would set index
>> enable to true after so many encoder counts.   I set it to 998 (<10
>> rotations) to set the index enable to true.. and the encoder position was
>> 9.98...
>>
>> so it isn't losing every rotation.  so I 'think' it is working right...
>>
>>
>> https://electronicsam.com/images/emco/Screenshot%20from%202022-09-18%2018-41-42.png
>>
>> sam
>>
>> On Sun, Sep 18, 2022 at 5:54 PM Ed  wrote:
>>
>>> On 9/18/22 5:24 PM, Martin Dobbins wrote:
>>> > Er 100 minus 2 (the holes you cut metal between is 98?
>>>
>>> He cut out the metal between two holes to make 99 holes, one being twice
>>> as wide as the rest. Did I follow that right?
>>>
>>> > 
>>> > From: Ed 
>>> > Sent: Sunday, September 18, 2022 4:53 PM
>>> > To: emc-users@lists.sourceforge.net 
>>> > Subject: Re: [Emc-users] missing tooth index questions..
>>> >
>>> > On 9/18/22 3:50 PM, Sam Sokolik wrote:
>>> >> I have a optical encoder from a mouse running on an emco encoder
>>> wheel (100
>>> >> holes).  I cut out the metal between 2 holes.  I think that would be
>>> >> considered one missing tooth...  I have the encoder scale set to 100
>>> and
>>>
>>>
>>>
>>>
>>> ___
>>> Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>>
>>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread Martin Dobbins
Dyslexia rules ko?

In your illustration I count 4 holes and 1 slot (made of 2 holes), so if a slot 
is not a hole there are 4 holes?

From: John Dammeyer 
Sent: Sunday, September 18, 2022 5:49 PM
To: 'Enhanced Machine Controller (EMC)' 
Subject: Re: [Emc-users] missing tooth index questions..

Much easier to visualize if you use less holes I think?

I first made 6 holes and then laid out two arcs and created a longer slot from 
two of the holes.

I count 5 holes and 5 spaces between the holes.  Are you sure you actually cut 
100 holes?

John Dammeyer


> -Original Message-
> From: Sam Sokolik [mailto:samco...@gmail.com]
> Sent: September-18-22 1:51 PM
> To: Enhanced Machine Controller (EMC)
> Subject: [Emc-users] missing tooth index questions..
>
> I have a optical encoder from a mouse running on an emco encoder wheel (100
> holes).  I cut out the metal between 2 holes.  I think that would be
> considered one missing tooth...  I have the encoder scale set to 100 and
> the missing tooth set to 1
>
> I have a little comp that sets the index enable to true whenever it is
> false.
>
> Looking at the halscope screen shot - it only counts to 98..  I would think
> it would count from 0 to 99.  You can see the gap is seen - but I think
> there should be an extra count in there..
>
> (I could be not understanding it too)
>
> ps - if I set the missing teeth to 2 - it will not trigger (like it doesn't
> see the gap then which seems correct)
>
> thanks!
> sam

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread John Dammeyer
No.  
A slot is still a hole.  So if you are counting,  say falling edges, you will 
get 5 of them.  If you count rising edges you will get 5 of them.  

Now if you measure the time between falling and rising edges you will get one 
timer interval that is much longer than the others.  The actual time doesn’t 
matter other than that it's a constant ratio between the small holes and the 
slot.

That gives you the index position and the time interval of the shorter pulses 
gives you RPM.  You really only need rising edges and the time between them 
unless you are tracking both directions.  

John


> -Original Message-
> From: Martin Dobbins [mailto:tu...@hotmail.com]
> Sent: September-19-22 7:12 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] missing tooth index questions..
> 
> Dyslexia rules ko?
> 
> In your illustration I count 4 holes and 1 slot (made of 2 holes), so if a 
> slot is not a hole there are 4 holes?
> 
> From: John Dammeyer 
> Sent: Sunday, September 18, 2022 5:49 PM
> To: 'Enhanced Machine Controller (EMC)' 
> Subject: Re: [Emc-users] missing tooth index questions..
> 
> Much easier to visualize if you use less holes I think?
> 
> I first made 6 holes and then laid out two arcs and created a longer slot 
> from two of the holes.
> 
> I count 5 holes and 5 spaces between the holes.  Are you sure you actually 
> cut 100 holes?
> 
> John Dammeyer
> 
> 
> > -Original Message-
> > From: Sam Sokolik [mailto:samco...@gmail.com]
> > Sent: September-18-22 1:51 PM
> > To: Enhanced Machine Controller (EMC)
> > Subject: [Emc-users] missing tooth index questions..
> >
> > I have a optical encoder from a mouse running on an emco encoder wheel (100
> > holes).  I cut out the metal between 2 holes.  I think that would be
> > considered one missing tooth...  I have the encoder scale set to 100 and
> > the missing tooth set to 1
> >
> > I have a little comp that sets the index enable to true whenever it is
> > false.
> >
> > Looking at the halscope screen shot - it only counts to 98..  I would think
> > it would count from 0 to 99.  You can see the gap is seen - but I think
> > there should be an extra count in there..
> >
> > (I could be not understanding it too)
> >
> > ps - if I set the missing teeth to 2 - it will not trigger (like it doesn't
> > see the gap then which seems correct)
> >
> > thanks!
> > sam
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread andy pugh
On Mon, 19 Sept 2022 at 17:06, John Dammeyer  wrote:

> No.
> A slot is still a hole.  So if you are counting,  say falling edges, you
> will get 5 of them.  If you count rising edges you will get 5 of them.


Actually, the missing-tooth scheme takes a different opinion. Each hole
corresponds to 1/6 of a revolution, so the correct scale is 6. But it only
responds to actual edges seen, so does not create a synthetic count in the
middle of the gap, instead it recognises the approximately double period
and adds two (or more) counts when it sees the gap.

Using position-interpolated will smooth through this jitter.

-- 
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, 1912

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread Sam Sokolik
That was my plan - use position-interpolated..  100 counts is barely enough
for smooth motion.

sam

On Mon, Sep 19, 2022 at 11:51 AM andy pugh  wrote:

> On Mon, 19 Sept 2022 at 17:06, John Dammeyer 
> wrote:
>
> > No.
> > A slot is still a hole.  So if you are counting,  say falling edges, you
> > will get 5 of them.  If you count rising edges you will get 5 of them.
>
>
> Actually, the missing-tooth scheme takes a different opinion. Each hole
> corresponds to 1/6 of a revolution, so the correct scale is 6. But it only
> responds to actual edges seen, so does not create a synthetic count in the
> middle of the gap, instead it recognises the approximately double period
> and adds two (or more) counts when it sees the gap.
>
> Using position-interpolated will smooth through this jitter.
>
> --
> 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, 1912
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread John Dammeyer
And is correct.  For RPM measurement a count of 6 is still required.  Here's my 
math for this.  Perhaps you can explain what position interpolated means.

So we have a spindle turning 6000 RPM or 50 RPS.  That means if we didn't have 
the longer slot we'd see an edge every 0.00 seconds.

Now assume our counter (parallel port for example) is running 20kHz.  That's a 
tick every 50 uS so divide that into 0.0033 seconds and you get 
66.66 counts before the next hole on the disk.

In reality you would see 66 counts and then 67 counts and then 66 counts etc. 
and then 133.33 counts for the index slot.

Anyway, assume we test and can tell the difference between the slot and the 
holes we get 66.  Multiply that by 0.50 (50uS) and we get the time for one 
hole edge to hole edge which is 0.0033 seconds or inverted 303.  Scale it by 10 
to get RPM which is 3030 RPM; out by 30 RPM.

Next time we count 67 which works out to 2985 RPM; out by 15 RPM.

Or we could accumulate 5 readings of 66,67,66,67,66 which gives us 66.4 a bit 
closer at 3012 RPM but really not the 3000 we're actually turning.  And if it's 
the other way around 67,66,67,66,67 it's 66.6 average and is 3003 RPM.  Closer.

Increasing to 60 holes improves things but there will still be a certain amount 
of jitter since we have repeating decimals in the math.  With 20kHz we're still 
able to count 5 or 6 ticks but above that encoder count the 20kHz tick clock 
has to be much faster.

Anyway, that's how I'd calculate RPM.  What's the position interpolated.  And 
is there a better way to get more accurate RPM?
John



> -Original Message-
> From: Sam Sokolik [mailto:samco...@gmail.com]
> Sent: September-19-22 10:20 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] missing tooth index questions..
> 
> That was my plan - use position-interpolated..  100 counts is barely enough
> for smooth motion.
> 
> sam
> 
> On Mon, Sep 19, 2022 at 11:51 AM andy pugh  wrote:
> 
> > On Mon, 19 Sept 2022 at 17:06, John Dammeyer 
> > wrote:
> >
> > > No.
> > > A slot is still a hole.  So if you are counting,  say falling edges, you
> > > will get 5 of them.  If you count rising edges you will get 5 of them.
> >
> >
> > Actually, the missing-tooth scheme takes a different opinion. Each hole
> > corresponds to 1/6 of a revolution, so the correct scale is 6. But it only
> > responds to actual edges seen, so does not create a synthetic count in the
> > middle of the gap, instead it recognises the approximately double period
> > and adds two (or more) counts when it sees the gap.
> >
> > Using position-interpolated will smooth through this jitter.
> >
> > --
> > 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, 1912
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread Sam Sokolik
The blue is encoder position..  white in encoder position interpolated..

https://electronicsam.com/images/emco/Screenshot%20from%202022-09-19%2015-28-44.png

On Mon, Sep 19, 2022 at 2:05 PM John Dammeyer 
wrote:

> And is correct.  For RPM measurement a count of 6 is still required.
> Here's my math for this.  Perhaps you can explain what position
> interpolated means.
>
> So we have a spindle turning 6000 RPM or 50 RPS.  That means if we didn't
> have the longer slot we'd see an edge every 0.00
> seconds.
>
> Now assume our counter (parallel port for example) is running 20kHz.
> That's a tick every 50 uS so divide that into 0.0033 seconds and you
> get 66.66 counts before the next hole on the disk.
>
> In reality you would see 66 counts and then 67 counts and then 66 counts
> etc. and then 133.33 counts for the index slot.
>
> Anyway, assume we test and can tell the difference between the slot and
> the holes we get 66.  Multiply that by 0.50 (50uS) and we get the time
> for one hole edge to hole edge which is 0.0033 seconds or inverted 303.
> Scale it by 10 to get RPM which is 3030 RPM; out by 30 RPM.
>
> Next time we count 67 which works out to 2985 RPM; out by 15 RPM.
>
> Or we could accumulate 5 readings of 66,67,66,67,66 which gives us 66.4 a
> bit closer at 3012 RPM but really not the 3000 we're actually turning.  And
> if it's the other way around 67,66,67,66,67 it's 66.6 average and is 3003
> RPM.  Closer.
>
> Increasing to 60 holes improves things but there will still be a certain
> amount of jitter since we have repeating decimals in the math.  With 20kHz
> we're still able to count 5 or 6 ticks but above that encoder count the
> 20kHz tick clock has to be much faster.
>
> Anyway, that's how I'd calculate RPM.  What's the position interpolated.
> And is there a better way to get more accurate RPM?
> John
>
>
>
> > -Original Message-
> > From: Sam Sokolik [mailto:samco...@gmail.com]
> > Sent: September-19-22 10:20 AM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] missing tooth index questions..
> >
> > That was my plan - use position-interpolated..  100 counts is barely
> enough
> > for smooth motion.
> >
> > sam
> >
> > On Mon, Sep 19, 2022 at 11:51 AM andy pugh  wrote:
> >
> > > On Mon, 19 Sept 2022 at 17:06, John Dammeyer 
> > > wrote:
> > >
> > > > No.
> > > > A slot is still a hole.  So if you are counting,  say falling edges,
> you
> > > > will get 5 of them.  If you count rising edges you will get 5 of
> them.
> > >
> > >
> > > Actually, the missing-tooth scheme takes a different opinion. Each hole
> > > corresponds to 1/6 of a revolution, so the correct scale is 6. But it
> only
> > > responds to actual edges seen, so does not create a synthetic count in
> the
> > > middle of the gap, instead it recognises the approximately double
> period
> > > and adds two (or more) counts when it sees the gap.
> > >
> > > Using position-interpolated will smooth through this jitter.
> > >
> > > --
> > > 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, 1912
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] missing tooth index questions..

2022-09-19 Thread Sam Sokolik
https://www.youtube.com/watch?v=r4B-MksNBJQ

On Mon, Sep 19, 2022 at 3:34 PM Sam Sokolik  wrote:

> The blue is encoder position..  white in encoder position interpolated..
>
>
> https://electronicsam.com/images/emco/Screenshot%20from%202022-09-19%2015-28-44.png
>
> On Mon, Sep 19, 2022 at 2:05 PM John Dammeyer 
> wrote:
>
>> And is correct.  For RPM measurement a count of 6 is still required.
>> Here's my math for this.  Perhaps you can explain what position
>> interpolated means.
>>
>> So we have a spindle turning 6000 RPM or 50 RPS.  That means if we didn't
>> have the longer slot we'd see an edge every 0.00
>> seconds.
>>
>> Now assume our counter (parallel port for example) is running 20kHz.
>> That's a tick every 50 uS so divide that into 0.0033 seconds and you
>> get 66.66 counts before the next hole on the disk.
>>
>> In reality you would see 66 counts and then 67 counts and then 66 counts
>> etc. and then 133.33 counts for the index slot.
>>
>> Anyway, assume we test and can tell the difference between the slot and
>> the holes we get 66.  Multiply that by 0.50 (50uS) and we get the time
>> for one hole edge to hole edge which is 0.0033 seconds or inverted 303.
>> Scale it by 10 to get RPM which is 3030 RPM; out by 30 RPM.
>>
>> Next time we count 67 which works out to 2985 RPM; out by 15 RPM.
>>
>> Or we could accumulate 5 readings of 66,67,66,67,66 which gives us 66.4 a
>> bit closer at 3012 RPM but really not the 3000 we're actually turning.  And
>> if it's the other way around 67,66,67,66,67 it's 66.6 average and is 3003
>> RPM.  Closer.
>>
>> Increasing to 60 holes improves things but there will still be a certain
>> amount of jitter since we have repeating decimals in the math.  With 20kHz
>> we're still able to count 5 or 6 ticks but above that encoder count the
>> 20kHz tick clock has to be much faster.
>>
>> Anyway, that's how I'd calculate RPM.  What's the position interpolated.
>> And is there a better way to get more accurate RPM?
>> John
>>
>>
>>
>> > -Original Message-
>> > From: Sam Sokolik [mailto:samco...@gmail.com]
>> > Sent: September-19-22 10:20 AM
>> > To: Enhanced Machine Controller (EMC)
>> > Subject: Re: [Emc-users] missing tooth index questions..
>> >
>> > That was my plan - use position-interpolated..  100 counts is barely
>> enough
>> > for smooth motion.
>> >
>> > sam
>> >
>> > On Mon, Sep 19, 2022 at 11:51 AM andy pugh  wrote:
>> >
>> > > On Mon, 19 Sept 2022 at 17:06, John Dammeyer 
>> > > wrote:
>> > >
>> > > > No.
>> > > > A slot is still a hole.  So if you are counting,  say falling
>> edges, you
>> > > > will get 5 of them.  If you count rising edges you will get 5 of
>> them.
>> > >
>> > >
>> > > Actually, the missing-tooth scheme takes a different opinion. Each
>> hole
>> > > corresponds to 1/6 of a revolution, so the correct scale is 6. But it
>> only
>> > > responds to actual edges seen, so does not create a synthetic count
>> in the
>> > > middle of the gap, instead it recognises the approximately double
>> period
>> > > and adds two (or more) counts when it sees the gap.
>> > >
>> > > Using position-interpolated will smooth through this jitter.
>> > >
>> > > --
>> > > 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, 1912
>> > >
>> > > ___
>> > > Emc-users mailing list
>> > > Emc-users@lists.sourceforge.net
>> > > https://lists.sourceforge.net/lists/listinfo/emc-users
>> > >
>> >
>> > ___
>> > Emc-users mailing list
>> > Emc-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>>
>>
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users