Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-16 Thread Steve Blackmore
On Tue, 15 Sep 2009 20:24:16 -0500, you wrote:

On Tue, 2009-09-15 at 11:06 -0400, Dave wrote:

IMO you'd want it to be no more than a pulse wide or the threading may
start at any of the pulses that the index spans.

Strange behaviour? - It should start on either the rising or falling
edge, if it starts anywhere else it needs fixing. 

Steve Blackmore
--

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-16 Thread Jon Elson
Steve Blackmore wrote:
 On Tue, 15 Sep 2009 20:24:16 -0500, you wrote:

   
 On Tue, 2009-09-15 at 11:06 -0400, Dave wrote:
 

   
 IMO you'd want it to be no more than a pulse wide or the threading may
 start at any of the pulses that the index spans.
 

 Strange behaviour? - It should start on either the rising or falling
 edge, if it starts anywhere else it needs fixing. 
   
This whole thread is about using the SOFTWARE enocder counter (a HAL 
component) for the
spindle position.  It is software sampling of the encoder signals, so 
the rising edge would be detected
at the first sample where index was noticed to be true.  But, of course, 
if the sample rate was slower than
the quadrature count rate, the encoder counter would not be able to 
reliably count position anyway!
So, stretching the index pulse wider than one encoder count would not 
actually help anything, unless
you were wanting to just sense the index pulse and ignore the quadrature 
count.

All in all, I think the whole exercise is a big mistake.  If you want to 
use the software encoder counter, you
need a low resolution encoder, maybe as low as 25 cycles/rev, or 100 
quadrature counts/rev.  At 1000 RPM
or 16.67 RPS, that would give 1667 counts/second, plenty safe for 
software counting.  I would think this would still
give perfectly smooth following of the axis.  If you insist on a higher 
resolution encoder, then you should be using
a hardware encoder counter.  Any possibility of accidentally running the 
spindle at a speed where the software counter
loses track will eventually occur and bite you!

Jon

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-16 Thread sam sokolik
I don't know how many have seen this but it really shows how flexable 
emc2 is.  This is rigid tapping through the printer port.  (and it is 
just cool)  He is using a 360ppr encoder.

http://www.youtube.com/watch?v=C740zS9R9kk

You can read about it here.

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Pjm

sam

Jon Elson wrote:
 Steve Blackmore wrote:
   
 On Tue, 15 Sep 2009 20:24:16 -0500, you wrote:

   
 
 On Tue, 2009-09-15 at 11:06 -0400, Dave wrote:
 
   
   
 
 IMO you'd want it to be no more than a pulse wide or the threading may
 start at any of the pulses that the index spans.
 
   
 Strange behaviour? - It should start on either the rising or falling
 edge, if it starts anywhere else it needs fixing. 
   
 
 This whole thread is about using the SOFTWARE enocder counter (a HAL 
 component) for the
 spindle position.  It is software sampling of the encoder signals, so 
 the rising edge would be detected
 at the first sample where index was noticed to be true.  But, of course, 
 if the sample rate was slower than
 the quadrature count rate, the encoder counter would not be able to 
 reliably count position anyway!
 So, stretching the index pulse wider than one encoder count would not 
 actually help anything, unless
 you were wanting to just sense the index pulse and ignore the quadrature 
 count.

 All in all, I think the whole exercise is a big mistake.  If you want to 
 use the software encoder counter, you
 need a low resolution encoder, maybe as low as 25 cycles/rev, or 100 
 quadrature counts/rev.  At 1000 RPM
 or 16.67 RPS, that would give 1667 counts/second, plenty safe for 
 software counting.  I would think this would still
 give perfectly smooth following of the axis.  If you insist on a higher 
 resolution encoder, then you should be using
 a hardware encoder counter.  Any possibility of accidentally running the 
 spindle at a speed where the software counter
 loses track will eventually occur and bite you!

 Jon

 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

   
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-16 Thread Steve Blackmore
On Wed, 16 Sep 2009 12:16:02 -0500, you wrote:

Steve Blackmore wrote:
 On Tue, 15 Sep 2009 20:24:16 -0500, you wrote:

   
 On Tue, 2009-09-15 at 11:06 -0400, Dave wrote:
 

   
 IMO you'd want it to be no more than a pulse wide or the threading may
 start at any of the pulses that the index spans.
 

 Strange behaviour? - It should start on either the rising or falling
 edge, if it starts anywhere else it needs fixing. 
   
This whole thread is about using the SOFTWARE enocder counter (a HAL 
component) for the
spindle position. 

Is it?  I started the thread :) All I'm personally interested in is
threading accurately. As I understand it, it waits for an index pulse
before starting a threading pass - I know that to be true, as
disconnecting the index pulse - it waits forever on a G33.

Then information becomes woolly - I guess it uses the quadrature count
to get an accurate speed and adjusts the Z feed accordingly?? 

My 3 phase VFD driven spindle isn't capable of behaving like a servo, so
spindle positioning is unnecessary for me.

 It is software sampling of the encoder signals, so 
the rising edge would be detected
at the first sample where index was noticed to be true.  But, of course, 
if the sample rate was slower than
the quadrature count rate, the encoder counter would not be able to 
reliably count position anyway!
So, stretching the index pulse wider than one encoder count would not 
actually help anything, unless
you were wanting to just sense the index pulse and ignore the quadrature 
count.

Not if the above is true?

All in all, I think the whole exercise is a big mistake.  If you want to 
use the software encoder counter, you
need a low resolution encoder, maybe as low as 25 cycles/rev, or 100 
quadrature counts/rev. 

125 count (500 quadrature counts/rev) works fine here via parallel port.

Steve Blackmore
--

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-16 Thread Jon Elson
Steve Blackmore wrote:
 On Wed, 16 Sep 2009 12:16:02 -0500, you wrote:

   

 This whole thread is about using the SOFTWARE enocder counter (a HAL 
 component) for the
 spindle position. 
 

 Is it?  I started the thread :)
Well, I thought that was the original problem, that the software encoder 
counter couldn't keep up with
a moderately high resolution encoder on the spindle.
  All I'm personally interested in is
 threading accurately. As I understand it, it waits for an index pulse
 before starting a threading pass - I know that to be true, as
 disconnecting the index pulse - it waits forever on a G33.

 Then information becomes woolly - I guess it uses the quadrature count
 to get an accurate speed and adjusts the Z feed accordingly?? 

 My 3 phase VFD driven spindle isn't capable of behaving like a servo, so
 spindle positioning is unnecessary for me.

   
Yes, but EMC2 by default expects a 3-channel encoder on the spindle to 
accurately slice up
the rotation and synchronize the Z feed.  Without the quadrature counts, 
it can only extimate
velocity once per revolution, and the velocity estimate may take a long 
time to settle after and
disturbance.  Also, without the quadrature signals, it is impossible to 
tell spindle direction, so
rigid tapping is impossible.


 125 count (500 quadrature counts/rev) works fine here via parallel port.

   
Depending on the BASE_THREAD interval and the maximum spindle RPM, you 
can get by.
At 3000 RPM, you'd have 50 * 500 = 25,000 counts/second.  If your 
BASE_THREAD was
40,000 (40 us) you'd be right on the edge.  If your spindle never goes 
that fast, or your BASE_THREAD
is faster, then you are OK.  I just prefer to have LOTS of headroom on 
the encoder counter.


Jon

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-15 Thread Ray Henry
On Tue, 2009-09-15 at 11:06 -0400, Dave wrote:
 Chris Radek wrote:
  On Mon, Sep 14, 2009 at 07:12:48PM -0400, Dave wrote:
 

  Will the
  EMC2 engine just wait on a threading cycle until the index pulse is
  seen, and once it is seen, start the cycle?
  
 
  Yes
 
 Good, so if my spindle is going too fast for the PC to pickup the index 
 pulse each rev it might have to wait for a few revs before it picks it 
 up I guess... 
  
 If that becomes an issue (waiting) and I put a pulse stretcher on the 
 index pulse and the stretcher makes the pulse longer than the other 
 encoder pulses at the rpm the spindle is
 running will that be a problem? 

IMO you'd want it to be no more than a pulse wide or the threading may
start at any of the pulses that the index spans.

HTH

Rayh




--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-14 Thread Dave
Hi Ray, Guys

The US digital encoder edivide box passes the index pulse straight
through.   I have an encoder on the spindle of my lathe but I am not
sure what the resolution is - I'm guessing it is 2500 PPR just like the
feed axes.That makes for a  pretty short index pulse.   Will the
EMC2 engine just wait on a threading cycle until the index pulse is
seen, and once it is seen, start the cycle?

Thanks,

Dave



Ray Henry wrote:
 You might have a look at 

 http://www.usdigital.com/products/interfaces/encoder/converters/edivide/

 Something like this would allow you to experiment with speed vs
 resolution and still keep the encoder you've got on there.


 On Sun, 2009-08-16 at 10:51 +0100, Steve Blackmore wrote:
   
 Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
 via a parallel port in EMC. Spindle is capable of 3500 rpm. 

 My home made encoder had 90, but I've altered the drive system and
 fitted a 1024 PPR encoder with index. Output is via differential line
 drivers. 

 I've changed the scale factor but it starts loosing pulses at 600 rpm or
 so?? 
 




 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with 
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

   



--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-09-14 Thread Chris Radek
On Mon, Sep 14, 2009 at 07:12:48PM -0400, Dave wrote:

 Will the
 EMC2 engine just wait on a threading cycle until the index pulse is
 seen, and once it is seen, start the cycle?

Yes


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Steve Blackmore
On Thu, 20 Aug 2009 20:58:41 -0500, you wrote:

Steve Blackmore wrote:
 One reason it's far too slow is the totally unrealistic base period.
 62500 is way too slow, reading the integrator manual, it probably should
 be much nearer 25000. 

   
It depends on the computer.  If it is just a slow CPU, or has a bad 
jitter problem due to some hardware/software
condition, then this may be as good as it can do.  You then have the 
choice to fix the jitter problem, if possible,
upgrade the CPU or the whole machine, or go to a hardware encoder counter.

Jon - you must have missed this bit from an earlier post. The 62500
figure came from stepconf.

Worst latency I've managed to get doing several things at once and
running a GL screensaver in a window is 12uS. Pulse diagram for drives
shows a 1uS rise and fall time and a minimum duration of 2.5uS,
direction must lead the rise by 2.5uS or greater.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Stephen Wille Padnos
Steve Blackmore wrote:

On Thu, 20 Aug 2009 20:58:41 -0500, you wrote:
  

Steve Blackmore wrote:


One reason it's far too slow is the totally unrealistic base period.
62500 is way too slow, reading the integrator manual, it probably should
be much nearer 25000. 

  
  

It depends on the computer.  If it is just a slow CPU, or has a bad 
jitter problem due to some hardware/software
condition, then this may be as good as it can do.  You then have the 
choice to fix the jitter problem, if possible,
upgrade the CPU or the whole machine, or go to a hardware encoder counter.



Jon - you must have missed this bit from an earlier post. The 62500
figure came from stepconf.
  

What version of EMC2 are you using?

I could swear that I added code to stepconf to take the spindle 
speed/resolution into account when calculating the base period.
- Steve


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Ray Henry
On Fri, 2009-08-21 at 07:41 -0400, Stephen Wille Padnos wrote:

 I could swear that I added code to stepconf to take the spindle 
 speed/resolution into account when calculating the base period.
 - Steve

IMO this thread appears to be a case of attempting to pass the buck.  I
can say, having written the first attempt at a configuration system,
that I really appreciate the effort that you folk have put into this
part of it.

Each attempt to apply the configuration system to something for which it
was not exactly written will lead to some frustration and to new
opportunities to expand the code base.  What the f32^% s*^ you mean
stepconf won't configure my dumpster 386 mobo to run my 12 axis SCARA!
What the hell good is this stuff anyway!

Rayh




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Gene Heskett
On Friday 21 August 2009, Ray Henry wrote:
On Fri, 2009-08-21 at 07:41 -0400, Stephen Wille Padnos wrote:
 I could swear that I added code to stepconf to take the spindle
 speed/resolution into account when calculating the base period.
 - Steve

IMO this thread appears to be a case of attempting to pass the buck.  I
can say, having written the first attempt at a configuration system,
that I really appreciate the effort that you folk have put into this
part of it.

Each attempt to apply the configuration system to something for which it
was not exactly written will lead to some frustration and to new
opportunities to expand the code base.  What the f32^% s*^ you mean
stepconf won't configure my dumpster 386 mobo to run my 12 axis SCARA!
What the hell good is this stuff anyway!

Rayh

I have got to say it: ROTFLMAO!  ;-)  Love it.

-- 
Cheers, Gene
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
The NRA is offering FREE Associate memberships to anyone who wants them.
https://www.nrahq.org/nrabonus/accept-membership.asp

Peace cannot be kept by force; it can only be achieved by understanding.
-- Albert Einstein


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Jon Elson
Steve Blackmore wrote:
 Jon - you must have missed this bit from an earlier post. The 62500
 figure came from stepconf.
   
It is supposed to be derived from measurements made on the specific 
computer.
I don't ise stepconf, so I'm not familiar with how it does that calculation.
 Worst latency I've managed to get doing several things at once and
 running a GL screensaver in a window is 12uS. Pulse diagram for drives
 shows a 1uS rise and fall time and a minimum duration of 2.5uS,
 direction must lead the rise by 2.5uS or greater.
 
That sounds like you could go to a much faster dispatch rate.  I'd think 
maybe 25000 would be a good place to start,
just make sure there is enough CPU left for the GUI, etc.

Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Steve Blackmore
On Fri, 21 Aug 2009 07:41:34 -0400, you wrote:


What version of EMC2 are you using?

2.3.2

I could swear that I added code to stepconf to take the spindle 
speed/resolution into account when calculating the base period.

You may have, Was done nearly two years ago, I only recall it asking me
what type of drives and the latency number. I had to add the spindle
encoder information manually to the hal file and have not ran stepconf
again since, I don't want my hal files overwriting ;)

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Gene Heskett
On Friday 21 August 2009, Peter C. Wallace wrote:
OK got it done and it fits in XC9572 we have on little CPLD board but I
 wont be able to test it until Monday

1. Input digital filter
ok 15 count filter on a,b,index

2. Quadrature decoder (quadrature to up/down)
ok

3. Up down modulo N counter (for divide  by N)
ok has 8 selectable DIVIDE_RATIOS via three input signals (jumpers on CPLD
 bd)

4. 2 bit up/down counter
ok

5. 2 bit binary -- quadrature encoder
ok

6. Optional index stretcher

Works a little strange but should be ok, basically index out is set by
incoming (filtered) index and cleared when DIVIDE_RATIO input encoder
 counts have occured (either up or down or a mix) As long as only one edge
 is used you will always get a index signal with a minimum width of one
 (divided) count

That sounds almost exactly like what I would need to control the spindles on 
both my little lathe, and on the micro-mill.  Do you have a target price for 
the completed unit?

Question for all of the board makers here though.  I need an opto assembly I 
can use with an encoder wheel I made and put on the lathe.  This wheel was 
made with that bit of python code on the wiki, but with the count cut in half 
 the hole circles scaled down to fit on the back end of the spindle in a 
7x12, so the OD is now 2. 3, all done with a 1/16 mill in a sheet of hard 
alu that is about 16 gauge.  The holes should be very slightly oblong, but 
are not visibly oval to my eye.

I just put a copy of 'genes-encoder.ngc' on my web page if someone wants to 
grab it.  I didn't change any credits, so that is all intact.

Do any of you have either the whole assembly, or the board and a BOM to make 
it?  Or even an nc file to make the board would be nice as I could tweek the 
interruptor locations for a customized really good fit.

Thanks everybody.
 

 I even think we have some CPLD bds we never used that I can send over
 for shipping cost.

Peter Wallace
Mesa Electronics

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


---
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day trial. Simplify your report design, integration and deployment -
 and focus on what you do best, core application coding. Discover what's
 new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-- 
Cheers, Gene
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
The NRA is offering FREE Associate memberships to anyone who wants them.
https://www.nrahq.org/nrabonus/accept-membership.asp

Personally, I like to defiantly split my infinitives.  :-)
 -- Larry Wall in 199708271551.iaa10...@wall.org


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Peter C. Wallace
On Fri, 21 Aug 2009, Gene Heskett wrote:

 Date: Fri, 21 Aug 2009 21:06:16 -0400
 From: Gene Heskett gene.hesk...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Realistic spindle encoder count for parallel port?
 
 On Friday 21 August 2009, Peter C. Wallace wrote:
 OK got it done and it fits in XC9572 we have on little CPLD board but I
 wont be able to test it until Monday

 1. Input digital filter
 ok 15 count filter on a,b,index

 2. Quadrature decoder (quadrature to up/down)
 ok

 3. Up down modulo N counter (for divide  by N)
 ok has 8 selectable DIVIDE_RATIOS via three input signals (jumpers on CPLD
 bd)

 4. 2 bit up/down counter
 ok

 5. 2 bit binary -- quadrature encoder
 ok

 6. Optional index stretcher

 Works a little strange but should be ok, basically index out is set by
 incoming (filtered) index and cleared when DIVIDE_RATIO input encoder
 counts have occured (either up or down or a mix) As long as only one edge
 is used you will always get a index signal with a minimum width of one
 (divided) count

 That sounds almost exactly like what I would need to control the spindles on
 both my little lathe, and on the micro-mill.  Do you have a target price for
 the completed unit?

I have bare CPLD circuit cards that I can send out for shipping cost, the CPLD 
is about ~2.00 its in a 44 lead PLCC. I could make preprogrammed version if 
anyone wants just chips or just post the source if anyone wants to hack it. 
The source is basically just bits and pieces copy-pasted from the HostMot2 
encoder counter with a few added wigglers and twirlers.

for a standalone chip version I'd add a ring or R/C oscillator so it does not 
need a separate clock

I think I only have one assembled CPLD card An I promised that to Steve B

Peter Wallace
Mesa Electronics

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


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-21 Thread Peter C. Wallace
On Fri, 21 Aug 2009, Gene Heskett wrote:

 for a standalone chip version I'd add a ring or R/C oscillator so it does
 not need a separate clock

 Is there room in the cpld for that?

Yes,lots of room left. Currently design uses 48 of 72 cells and could be 
squeezed into 36 (for $1.00 part if needed)

RC osc is only a few cells but current PCB has a 
separate XTAL osc and RC osc (with 74HC14) So I'd need a new PCB for a builtin 
RC osc. Ring osc needs no pins but has less predictable frequency


Design is fairly de-luxe: 15 count input filters, 8 selectable division ratios 
(1 to 255 range) selectable index edge polarity. Lots of squeezing possible, 
but I just did it in the simplest fastest way by copy+paste.


 I think I only have one assembled CPLD card An I promised that to Steve B

 And how much trouble to assemble it, considering I have had a soldering iron
 in hand most of the last 60 years?  Used to the fine point in an XYtronic
 bench iron, thermally controlled of course.

Should not be too hard, no fine pitch parts, smallest is 0805 resistors and 
capacitors, most parts could be dropped (theres a selectable frequency RC osc, 
a push button with debounce, a Xtal osc can (8pin half size) 4 LEDS, jtag 
connector, 2 26 pin I/O connectors etc

With existing filter max encoder count rate is ~1/8 FOSC (FOSC up to 50 MHz or 
so)


 If you make it standalone except for 5V and ground, I want two.  Name the
 ransom  I'll have my bank send a check. :-)


CPLD is 3.3V power but 5V tolerant I/O. Seems to run fine on 2 AA cells or 5V 
with two diode drops...



 Peter Wallace
 Mesa Electronics

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


 ---
 --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day trial. Simplify your report design, integration and deployment -
 and focus on what you do best, core application coding. Discover what's
 new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


 -- 
 Cheers, Gene
 There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
 -Ed Howdershelt (Author)
 The NRA is offering FREE Associate memberships to anyone who wants them.
 https://www.nrahq.org/nrabonus/accept-membership.asp

 There are no threads in a.b.p.erotica,  so there's no  gain in using a
 threaded news reader.
 (Unknown source)


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 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.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Alex Joni
You basicly only care about the index before you start the synchronized 
movement.
It will sit there, and wait for the index.
If it misses one, it will grab the next one (or at least the one it sees).
Each index will still constrain to the same spindle orientation, so the 
thread will not be affected by this.
(of course the above is only valid if you're not missing any A/B counts).
Once the synchronized movement is started it will be synchronized to the A/B 
counts.

Regards,
Alex



 On Wed, 19 Aug 2009 22:30:10 -0500, you wrote:

On Wed, Aug 19, 2009 at 10:11:19PM -0500, Jon Elson wrote:

 you could put in a one-shot chip to stretch the index pulse

I said it once already but I don't think everyone caught it: on a
spindle encoder used for threading and tapping, it doesn't matter
the slightest bit if you miss the index sometimes.

 How many is sometimes?

You certainly must not stretch it longer than one count, whatever
you do.  You would make the cure worse than the problem.

 Why - does it read on both rising and falling edge?

 Steve Blackmore


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Chris Radek
On Thu, Aug 20, 2009 at 12:12:24AM -0500, Jon Elson wrote:

 So, fixing the index pulse to reliably sense that, and 
 completely forgetting the quadrature counting is the only thing that 
 would work.  He would then only use the index pulse, once per rev.

I thought we were talking about dividing down the quadrature to a
lower rate.  I have done this with Jeff's code, posted earlier.  When
we did it, we didn't worry about stretching index.  It worked fine,
because like Alex explains, the only problem with missing some is the
spindle will make an extra turn or two before the threading or tapping
pass starts.

If you are doing one pulse per rev, you sure can't miss any of them,
and in this case you are right - I guess you should stretch them.

(I don't recommend any of this.  Getting a suitable encoder or
suitable hardware to read the existing one is so much better.)

Chris

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Jon Elson
Steve Blackmore wrote:
 On Wed, 19 Aug 2009 22:30:10 -0500, you wrote:

   
 On Wed, Aug 19, 2009 at 10:11:19PM -0500, Jon Elson wrote:

 
 you could put in a one-shot chip to stretch the index pulse 
   
 I said it once already but I don't think everyone caught it: on a
 spindle encoder used for threading and tapping, it doesn't matter
 the slightest bit if you miss the index sometimes.  
 

 How many is sometimes?

   
 You certainly must not stretch it longer than one count, whatever
 you do.  You would make the cure worse than the problem.
 

 Why - does it read on both rising and falling edge?

   
No, it would detect the index true condition whenever it sampled it.  
There is no edge detection in software, it just samples it until it sees 
that the bit is true.
So, if the sampling is too slow, there will be a jitter that could be as 
much as one sampling period.  At 16 KHz, my guess is that this is not 
going to cause a huge
error in threading at any sane threading RPM.  An error of a whole 
degree probably won't make much of a difference on a typical lathe, this 
error would be expected to
be less than that.

Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Jon Elson
Chris Radek wrote:
 (I don't recommend any of this.  Getting a suitable encoder or
 suitable hardware to read the existing one is so much better.)

   
Yes, a slight fudging of the encoder signals to keep within software 
range might be OK, but the extreme case presented by the
OP is so FAR away that it seems like one of those will never work 
situations.  If I remember the numbers right, he is about 4.44
times to slow to track the quadrature counter at 1000 RPM.  His reading 
of losing track at ~200 RPM also indicates that is the right figure.
Some people might be OK with threading at 200 RPM, but once you have 
CNC, there's no need to restrict yourself to that.

Either a hardware encoder counter or a MUCH lower-resolution encoder is 
the solution.  (As a seller of hardware encoder counters, I may be 
biased as to the correct solution to this problem...)

Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Steve Blackmore
On Thu, 20 Aug 2009 12:00:45 -0500, you wrote:

Chris Radek wrote:
 (I don't recommend any of this.  Getting a suitable encoder or
 suitable hardware to read the existing one is so much better.)

   
Yes, a slight fudging of the encoder signals to keep within software 
range might be OK, but the extreme case presented by the
OP is so FAR away that it seems like one of those will never work 
situations.  If I remember the numbers right, he is about 4.44
times to slow to track the quadrature counter at 1000 RPM.  His reading 
of losing track at ~200 RPM also indicates that is the right figure.
Some people might be OK with threading at 200 RPM, but once you have 
CNC, there's no need to restrict yourself to that.

One reason it's far too slow is the totally unrealistic base period.
62500 is way too slow, reading the integrator manual, it probably should
be much nearer 25000. 

Either a hardware encoder counter or a MUCH lower-resolution encoder is 
the solution.  (As a seller of hardware encoder counters, I may be 
biased as to the correct solution to this problem...)

I've the 500 PPR Stegmann and a Heidenhain 125 ppr to try, unfortunately
the 125 is a sinusoidal encoder, maybe the line drivers can sort that,
I'll find out at the weekend.

As for dividing encoder counts, it's a perfectly valid solution. There
are several commercial dividers, the US Digital one pointed out here,
being by far the cheapest. Stegmann even make an encoder with a pulse
divider built in (DRS61 series 1-8192 PPR).

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-20 Thread Jon Elson
Steve Blackmore wrote:
 One reason it's far too slow is the totally unrealistic base period.
 62500 is way too slow, reading the integrator manual, it probably should
 be much nearer 25000. 

   
It depends on the computer.  If it is just a slow CPU, or has a bad 
jitter problem due to some hardware/software
condition, then this may be as good as it can do.  You then have the 
choice to fix the jitter problem, if possible,
upgrade the CPU or the whole machine, or go to a hardware encoder counter.

Jon


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Stephen Wille Padnos
Steve Blackmore wrote:

On Tue, 18 Aug 2009 22:16:48 +0100, you wrote:
  

I'm not happy with the Chinese 1024 pulse encoder, but I've also got an
unused Stegmann DG60L 500 pulse per rev encoder I'm going to test.
Looking at the docs that too only outputs a single quadrature count
index pulse, but it's much better quality and I'm hoping the signals out


from it are cleaner.

Just tried something with a very surprising result. 

PC is dual boot with Windows XP, ran Mach3 at 35kHz Kernel speed and
it's capable of seeing the index pulse and giving an accurate rpm
reading to 1000 rpm! I find it odd that Mach can use it but EMC can't
above 200 rpm? Any ideas?
  

It's probably related to the fact that you are running EMC2 at the 
equivalent of a 16 kHz kernel.  (unless you changed your base period 
from 62500)

- Steve
[snip]

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Stephen Wille Padnos
Steve Blackmore wrote:

On Tue, 18 Aug 2009 22:16:48 +0100, you wrote:
  

I'm not happy with the Chinese 1024 pulse encoder, but I've also got an
unused Stegmann DG60L 500 pulse per rev encoder I'm going to test.
Looking at the docs that too only outputs a single quadrature count
index pulse, but it's much better quality and I'm hoping the signals out


from it are cleaner.

Just tried something with a very surprising result. 

PC is dual boot with Windows XP, ran Mach3 at 35kHz Kernel speed and
it's capable of seeing the index pulse and giving an accurate rpm
reading to 1000 rpm! I find it odd that Mach can use it but EMC can't
above 200 rpm? Any ideas?
  

It's probably related to the fact that you are running EMC2 at the 
equivalent of a 16 kHz kernel.  (unless you changed your base period 
from 62500)

- Steve
[snip]

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Steve Blackmore
On Wed, 19 Aug 2009 16:57:43 -0400, you wrote:

PC is dual boot with Windows XP, ran Mach3 at 35kHz Kernel speed and
it's capable of seeing the index pulse and giving an accurate rpm
reading to 1000 rpm! I find it odd that Mach can use it but EMC can't
above 200 rpm? Any ideas?
  

It's probably related to the fact that you are running EMC2 at the 
equivalent of a 16 kHz kernel.  (unless you changed your base period 
from 62500)

If it's approx half the Mach kernel value, I'd expect it to be able to
see nearer 500 rpm, not just 200?

Worst latency I've managed to get doing several things at once and
running a GL screensaver in a window is 12uS. Pulse diagram for drives
shows a 1uS rise and fall time and a minimum duration of 2.5uS,
direction must lead the rise by 2.5uS or greater.

I'll try dropping the base period some after I've fitted the other
encoder and repeat the test.

The 62500 figure came from stepconf.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Jon Elson
Steve Blackmore wrote:
 Just tried something with a very surprising result. 

 PC is dual boot with Windows XP, ran Mach3 at 35kHz Kernel speed and
 it's capable of seeing the index pulse and giving an accurate rpm
 reading to 1000 rpm! I find it odd that Mach can use it but EMC can't
 above 200 rpm? Any ideas?

   
Mach's dispatch rate can go a lot higher than EMC's, on the same 
hardware, due to the way Art Fenerty built his ring zero driver, it runs 
MUCH closer to the core of the CPU than EMC's rtai kernel modules.  He 
saves very little of the system status to enter his interrupt service 
routine, we have to save a LOT of status for a formal context switch.
We can do a lot more things, and do them in a lot more flexible manner, 
but with all that flexibility comes a reduction of performance (raw 
interrupt service rate).  Really, if you are coming close to the limit, 
you ought to be using some kind of hardware assist for this.  At the 
absolute bottom, you could put in a one-shot chip to stretch the index 
pulse to be at least twice your sample rate, than you should never miss 
a pulse.  This could be a 74HC123 and one resistor, one capacitor.

Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Jon Elson
Steve Blackmore wrote:
 On Wed, 19 Aug 2009 16:57:43 -0400, you wrote:

   
 PC is dual boot with Windows XP, ran Mach3 at 35kHz Kernel speed and
 it's capable of seeing the index pulse and giving an accurate rpm
 reading to 1000 rpm! I find it odd that Mach can use it but EMC can't
 above 200 rpm? Any ideas?
  

   
 It's probably related to the fact that you are running EMC2 at the 
 equivalent of a 16 kHz kernel.  (unless you changed your base period 
 
 from 62500)

 If it's approx half the Mach kernel value, I'd expect it to be able to
 see nearer 500 rpm, not just 200?

   
Art has a LOT of trickery in his driver.  I'll bet he checks for the 
index pulse both at the beginning and the END of his driver, doubling 
the likelihood of catching a short pulse.

Jon
 Worst latency I've managed to get doing several things at once and
 running a GL screensaver in a window is 12uS. Pulse diagram for drives
 shows a 1uS rise and fall time and a minimum duration of 2.5uS,
 direction must lead the rise by 2.5uS or greater.

 I'll try dropping the base period some after I've fitted the other
 encoder and repeat the test.

 The 62500 figure came from stepconf.

 Steve Blackmore
 --

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with 
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

   


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Chris Radek
On Wed, Aug 19, 2009 at 10:11:19PM -0500, Jon Elson wrote:

 you could put in a one-shot chip to stretch the index pulse 

I said it once already but I don't think everyone caught it: on a
spindle encoder used for threading and tapping, it doesn't matter
the slightest bit if you miss the index sometimes.  

You certainly must not stretch it longer than one count, whatever
you do.  You would make the cure worse than the problem.

Chris

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-19 Thread Jon Elson
Chris Radek wrote:
 On Wed, Aug 19, 2009 at 10:11:19PM -0500, Jon Elson wrote:

   
 you could put in a one-shot chip to stretch the index pulse 
 

 I said it once already but I don't think everyone caught it: on a
 spindle encoder used for threading and tapping, it doesn't matter
 the slightest bit if you miss the index sometimes.  

 You certainly must not stretch it longer than one count, whatever
 you do.  You would make the cure worse than the problem.

   
Well, if somebody has a 1000 cycle/rev encoder on the spindle, and is 
using a PC that can only handle a 16 KHz base thread, then he has a 
severe mismatch already.
Most lower-cost encoders have an index that is a couple counts wide, and 
not usually gated on one of the quadrature tracks.  Gated index is a 
feature of some of the higher-priced encoders.  With a 1000 cycle/rev 
encoder giving 4000 quadrature counts/rev, a jitter of a couple counts 
is not going to make much difference, amounting to a few tenths of a 
degree at most.  In this particularly horrible case, at 1000 RPM he is 
getting 4 million counts/minute = 7 counts/second.  With a base 
thread of 16 ms, he can only pick up one in 4 quadrature counts, so he 
is totally sunk.  So, fixing the index pulse to reliably sense that, and 
completely forgetting the quadrature counting is the only thing that 
would work.  He would then only use the index pulse, once per rev.  Not 
a very good solution at all.  Might as well run Mach in that case.


Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Steve Blackmore
On Mon, 17 Aug 2009 22:11:34 -0400, you wrote:

Another approach to quadrature dividing:
http://emergent.unpy.net/projects/01149271333

Needs a Pluto_P board, again too expensive over here.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Alex Joni
Another approach to quadrature dividing:
http://emergent.unpy.net/projects/01149271333

 Needs a Pluto_P board, again too expensive over here.

No it doesn't.
It's supposed to run on an AtTiny. The Pluto-P update is just for a better 
version.
You can also read about http://emergent.unpy.net/projects/01149348342

Regards,
Alex


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Alex Joni

 Needs a Pluto_P board, again too expensive over here.

The shipping for Europe for a Pluto_P is 9.90 EUR.
I don't think that's _that_ excessive...

Granted the total cost is 63.90 EUR delivered vs. $69.90, but that's the 
usual rate over the US prices anyways.

Regards,
Alex


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Leslie Newell

Hi Steve,


Yep - only for threading, but in counter mode can EMC still make
corrections for spindle speed variations?
  


Yes. I am not sure if you can thread with the spindle in reverse using 
counter mode though.


Hopefully this list allows attachments. This circuit uses a 4024 or 
74CHT4024 counter. You can get them from any of the usual suspects such 
as RS, Rapid etc. You may well get away without R1 and C1  as they are 
just noise filtering. It depends on how much noise there is on your 
machine. The input is one line from either the A or B channel of the 
encoder.


Actually I have just had a thought - you will probably also need to 
stretch the index pulse from the encoder. It is likely to be very short 
and at higher speeds EMC won't reliably detect it. Here is an example of 
a pulse stretcher circuit though you would have to change the values to 
suit your setup 
http://www.electronics-lab.com/articles/basics/components/555mono.htm


Les
inline: 4024.gif--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread John Kasunich
Steve Blackmore wrote:
 On Mon, 17 Aug 2009 22:11:34 -0400, you wrote:
 
 Another approach to quadrature dividing:
 http://emergent.unpy.net/projects/01149271333
 
 Needs a Pluto_P board, again too expensive over here.
 

Huh?

That posting is about dividing quadrature, not Pluto.

Actually, I think I linked to the posting that came immediately before 
the one I really wanted.  Look at 
http://emergent.unpy.net/projects/01149348342

There is a schematic, board layout, and source code for a very tiny 
quadrature divider.

John Kasunich

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Stephen Wille Padnos
John Kasunich wrote:

Steve Blackmore wrote:
  

On Mon, 17 Aug 2009 22:11:34 -0400, you wrote:



Another approach to quadrature dividing:
http://emergent.unpy.net/projects/01149271333
  

Needs a Pluto_P board, again too expensive over here.


Huh?

That posting is about dividing quadrature, not Pluto.

Actually, I think I linked to the posting that came immediately before 
the one I really wanted.  Look at 
http://emergent.unpy.net/projects/01149348342

There is a schematic, board layout, and source code for a very tiny 
quadrature divider.
  

Unfortunately, it doesn't help with index.  Many high-end encoders gate 
the index pulse so it's only on for one quadrature phase.  The tiny 
software would need to be changed to extend the index pulse for a full 
output count cycle (it's not obvious to me how to do that with the 
table-driven approach, after 2 minutes of looking at it)

-Steve


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Chris Radek
On Tue, Aug 18, 2009 at 10:19:17AM -0400, Stephen Wille Padnos wrote:

 Unfortunately, it doesn't help with index.

For threading/tapping, it doesn't matter if you sometimes miss the index.

Chris

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Steve Blackmore
On Tue, 18 Aug 2009 10:19:17 -0400, you wrote:


Unfortunately, it doesn't help with index.  Many high-end encoders gate 
the index pulse so it's only on for one quadrature phase.  The tiny 
software would need to be changed to extend the index pulse for a full 
output count cycle (it's not obvious to me how to do that with the 
table-driven approach, after 2 minutes of looking at it)

Your right Steve, the index is only one quadrature phase. At anything
above 200 rpm with the 1024 pulse encoder it's pot luck whether EMC sees
it.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Steve Blackmore
On Mon, 17 Aug 2009 16:54:54 -0700 (PDT), you wrote:


If I get a free bit of time I'll cobble together a quadrature divider, 
basically:

1. Input digital filter
2. Quadrature decoder (quadrature to up/down)
3. Up down modulo N counter (for divide  by N)
4. 2 bit up/down counter
5. 2 bit binary -- quadrature encoder
6. Optional index stretcher

I even think we have some CPLD bds we never used that I can send over for 
shipping cost.

That's very kind of you Peter, I'd appreciate that very much. From
experiments looks like the index stretcher is a must ;)

I'm not happy with the Chinese 1024 pulse encoder, but I've also got an
unused Stegmann DG60L 500 pulse per rev encoder I'm going to test.
Looking at the docs that too only outputs a single quadrature count
index pulse, but it's much better quality and I'm hoping the signals out
from it are cleaner.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Peter C. Wallace
On Tue, 18 Aug 2009, Steve Blackmore wrote:

 Date: Tue, 18 Aug 2009 22:16:48 +0100
 From: Steve Blackmore st...@pilotltd.net
 To: Peter C. Wallace p...@mesanet.com,
 EMC2-Users-List emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Realistic spindle encoder count for parallel port?
 
 On Mon, 17 Aug 2009 16:54:54 -0700 (PDT), you wrote:


 If I get a free bit of time I'll cobble together a quadrature divider,
 basically:

 1. Input digital filter
 2. Quadrature decoder (quadrature to up/down)
 3. Up down modulo N counter (for divide  by N)
 4. 2 bit up/down counter
 5. 2 bit binary -- quadrature encoder
 6. Optional index stretcher

 I even think we have some CPLD bds we never used that I can send over for
 shipping cost.

 That's very kind of you Peter, I'd appreciate that very much. From
 experiments looks like the index stretcher is a must ;)

 I'm not happy with the Chinese 1024 pulse encoder, but I've also got an
 unused Stegmann DG60L 500 pulse per rev encoder I'm going to test.
 Looking at the docs that too only outputs a single quadrature count
 index pulse, but it's much better quality and I'm hoping the signals out
 from it are cleaner.

 Steve Blackmore
 --


I'll have some time at the end of the week and Ill put something together.

I'll also try and make the long index synchronous with the divided Quadrature
this will require the total encoder counts to be evenly divisable by the 
divide ratio. If I fail at that I'll just use a digital one-shot


Peter Wallace
Mesa Electronics

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


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-18 Thread Gene Heskett
On Tuesday 18 August 2009, Peter C. Wallace wrote:
On Tue, 18 Aug 2009, Steve Blackmore wrote:
 Date: Tue, 18 Aug 2009 22:16:48 +0100
 From: Steve Blackmore st...@pilotltd.net
 To: Peter C. Wallace p...@mesanet.com,
 EMC2-Users-List emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Realistic spindle encoder count for parallel
 port?

 On Mon, 17 Aug 2009 16:54:54 -0700 (PDT), you wrote:
 If I get a free bit of time I'll cobble together a quadrature divider,
 basically:

 1. Input digital filter
 2. Quadrature decoder (quadrature to up/down)
 3. Up down modulo N counter (for divide  by N)
 4. 2 bit up/down counter
 5. 2 bit binary -- quadrature encoder
 6. Optional index stretcher

 I even think we have some CPLD bds we never used that I can send over
 for shipping cost.

 That's very kind of you Peter, I'd appreciate that very much. From
 experiments looks like the index stretcher is a must ;)

 I'm not happy with the Chinese 1024 pulse encoder, but I've also got an
 unused Stegmann DG60L 500 pulse per rev encoder I'm going to test.
 Looking at the docs that too only outputs a single quadrature count
 index pulse, but it's much better quality and I'm hoping the signals out
 from it are cleaner.

 Steve Blackmore
 --

I'll have some time at the end of the week and Ill put something together.

I'll also try and make the long index synchronous with the divided
 Quadrature this will require the total encoder counts to be evenly
 divisable by the divide ratio. If I fail at that I'll just use a digital
 one-shot

I can see potential problems with that too.  Related to direction of 
rotation.  Suggestion: latch it on its rising edge, which if the encoder is 
properly timed should give one whole output count time to read it, then let 
the trailing edge of the ports read strobe reset it so you only get it once 
even at creep speeds.

Is that practical?

Peter Wallace
Mesa Electronics

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


---
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day trial. Simplify your report design, integration and deployment -
 and focus on what you do best, core application coding. Discover what's
 new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-- 
Cheers, Gene
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
The NRA is offering FREE Associate memberships to anyone who wants them.
https://www.nrahq.org/nrabonus/accept-membership.asp

Just when you thought you were winning the rat race, along comes a faster 
rat!!


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-17 Thread Steve Blackmore
On Sun, 16 Aug 2009 21:00:31 -0400, you wrote:

Sounds like it is time to go back to your homemade 90
count encoder. If you just intend threading and not a 
rotary axis with positioning, then it should work well.

Hi Steve - Not an option I'm afraid, with the 3 speed belt drive
installed the timing disc hits the belt tensioner arm and there's no
space to fit it any other way.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-17 Thread Leslie Newell
If this is just for threading then you could run in counter mode. That 
would effectively divide the pulse rate by 4. If you still have problems 
then a simple binary counter such as a 74HCT93 can be used to divide one 
channel (counter mode only uses one channel) by 2,4,8 or whatever. 74HC 
series logic chips only cost a few pence.

If you want I can send you a circuit diagram of how to connect up a 
74HCT93. It is dead simple and can even be made by simply soldering a 
few wires directly to the chip.

Les



Steve Blackmore wrote:
 On Sun, 16 Aug 2009 21:00:31 -0400, you wrote:
 
 Sounds like it is time to go back to your homemade 90
 count encoder. If you just intend threading and not a 
 rotary axis with positioning, then it should work well.
 
 Hi Steve - Not an option I'm afraid, with the 3 speed belt drive
 installed the timing disc hits the belt tensioner arm and there's no
 space to fit it any other way.
 
 Steve Blackmore
 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-17 Thread Steve Blackmore
On Sun, 16 Aug 2009 21:03:54 -0700 (PDT), you wrote:


Can you use both encoders at once?
High resolution for low speed and Low resolution for high speed?


You could also do this with the high resolution encoder and a gizmo
like the USdigital divider, only with 2 selectable divide ratios run from a
single I/O bit, say 1/1 and 1/64. This is easily do-able in a $ 1.20 CPLD

A divider would work well, but I'm no programmer and wouldn't know where
to start.

If I can't find a simple solution it looks like I'll have to get another
encoder.

Would you need the index at high speeds?

My normal working range is 600-1200 rpm. Most of my threading is done at
600-1000 rpm, depending on pitch.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-17 Thread Steve Blackmore
On Mon, 17 Aug 2009 23:10:12 +0100, you wrote:

If this is just for threading then you could run in counter mode. That 
would effectively divide the pulse rate by 4. If you still have problems 
then a simple binary counter such as a 74HCT93 can be used to divide one 
channel (counter mode only uses one channel) by 2,4,8 or whatever. 74HC 
series logic chips only cost a few pence.

Yep - only for threading, but in counter mode can EMC still make
corrections for spindle speed variations?

If you want I can send you a circuit diagram of how to connect up a 
74HCT93. It is dead simple and can even be made by simply soldering a 
few wires directly to the chip.

Yes please Les, if nothing else it will get me a temporary solution.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Steve Blackmore
Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
via a parallel port in EMC. Spindle is capable of 3500 rpm. 

My home made encoder had 90, but I've altered the drive system and
fitted a 1024 PPR encoder with index. Output is via differential line
drivers. 

I've changed the scale factor but it starts loosing pulses at 600 rpm or
so?? 

Here's what's in my ini file

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 62500
SERVO_PERIOD = 100

Hal file reads

setp encoder.0.position-scale 360.00
net spindle-position encoder.0.position = motion.spindle-revs
net spindle-velocity encoder.0.velocity = motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable =
motion.spindle-index-enable
net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-index encoder.0.phase-Z

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Luc Claeys
Hi,

First, I assume the 1024 PPR indicates that the resolution of the
encoder is 1024 cycles per revolution as defined in
http://www.motion-control-info.com/encoder_glossary.html
Hence 1024 full AB cycles per revolution.

When using a 1024 PPR encoder, there will be 1024 A and 1024 B pulses
per revolution.
Since the A/B signals are directly read by the PC (via the parallel
port), we have to make sure that every of the 4 phases of each pulse is
sampled at least once by the PC in the time of one pulse.  When pulses
change faster than the PC samples, the PC will not see the changes, or
loose track of the phase relation between the signals, and miss pulses.

To compensate for possible fluctuations and inaccuracy of the phase and
symmetry of the A/B pulses, we have to sample more often, e.g. 8 times
per pulse-cycle (my guess).

When running at 3500 rpm, there are (3500/60) * 1024 = 59733 pulses per
second.
When we want to sample 8 times per such pulse, we have to sample at
least at  59733 * 8 =  477867
or about 480 000 times per second.
That is once every 2.1 microseconds.

Since your BASE_PERIOD = 62500 nanoseconds (62.5 microseconds) the
sampling is about 30 times too low to be safe.

When you keep the BASE_PERIOD = 62500 unchanged, and if you want to
sample 8 times per pulse, the maximum number of pulses per revolution is:

 1 / ((3500/60) * 8 * BASE_PERIOD) =

 1 / ((3500/60) * 8 * (BASE_PERIOD / 10))  = 34

Hence, i think that your encoder should have no more than 34 PPR when
keeping the rest unchanged and when using the safety factor of 8
pulse-reads per pulse (which still gives not too much safety).

So, i am surprised that you can go up to about 600rpm without loosing
pulses.

Can anyone check this, please?

Luc



Steve Blackmore wrote:
 Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
 via a parallel port in EMC. Spindle is capable of 3500 rpm. 
 
 My home made encoder had 90, but I've altered the drive system and
 fitted a 1024 PPR encoder with index. Output is via differential line
 drivers. 
 
 I've changed the scale factor but it starts loosing pulses at 600 rpm or
 so?? 
 
 Here's what's in my ini file
 
 [EMCMOT]
 EMCMOT = motmod
 COMM_TIMEOUT = 1.0
 COMM_WAIT = 0.010
 BASE_PERIOD = 62500
 SERVO_PERIOD = 100
 
 Hal file reads
 
 setp encoder.0.position-scale 360.00
 net spindle-position encoder.0.position = motion.spindle-revs
 net spindle-velocity encoder.0.velocity = motion.spindle-speed-in
 net spindle-index-enable encoder.0.index-enable =
 motion.spindle-index-enable
 net spindle-phase-a encoder.0.phase-A
 net spindle-phase-b encoder.0.phase-B
 net spindle-index encoder.0.phase-Z
 
 Steve Blackmore


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Stephen Wille Padnos
Steve Blackmore wrote:

Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
via a parallel port in EMC. Spindle is capable of 3500 rpm. 
  

It's dependent on your BASE_PERIOD.  You can theoretically count one 
quadrature phase per period, but it's better to have two periods per 
count - gives better noise margin (noise in this case being encoder 
phase issues and latency variations).

My home made encoder had 90, but I've altered the drive system and
fitted a 1024 PPR encoder with index. Output is via differential line
drivers. 

I've changed the scale factor but it starts loosing pulses at 600 rpm or
so?? 
  

Hmmm - you must have a 256 cycle encoder, which gives you 1024 counts 
per rev.  At 10 RPS, that's 10240 counts per second, which is a 
reasonable number for a 16 kHz base thread.  At 3500 RPM you need close 
to 6 counts per second.

I'd guess that your PCs latency is 17k or so (calculated as 
(1/10240-62500ns)/2).  You should check the latency, and see how fast 
you can run the base thread.  You can only count reliably if the counts 
come in slower than BASE_PERIOD+2*latency.  If the latency is actually 
17k, you probably can't run the base period faster than 35000-4 ns, 
which will only increase the top speed to about 1000 RPM, give or take.  
I don't know of any computer that can do 60k counts/sec reliably on the 
parport.

The best thing to do is probably to get a Mesa card, either PCI or 
parallel port connected.  You'll get smoother step generation too.

Hal file reads

setp encoder.0.position-scale 360.00
  

This should now be 4096, unless you have a 256 cycle encoder which is 
1024 phases per rev (in which case it should be 1024).

- Steve


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Ray Henry

You might have a look at 

http://www.usdigital.com/products/interfaces/encoder/converters/edivide/

Something like this would allow you to experiment with speed vs
resolution and still keep the encoder you've got on there.


On Sun, 2009-08-16 at 10:51 +0100, Steve Blackmore wrote:
 Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
 via a parallel port in EMC. Spindle is capable of 3500 rpm. 
 
 My home made encoder had 90, but I've altered the drive system and
 fitted a 1024 PPR encoder with index. Output is via differential line
 drivers. 
 
 I've changed the scale factor but it starts loosing pulses at 600 rpm or
 so?? 




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Jon Elson
Steve Blackmore wrote:
 Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
 via a parallel port in EMC. Spindle is capable of 3500 rpm. 

 My home made encoder had 90, but I've altered the drive system and
 fitted a 1024 PPR encoder with index. Output is via differential line
 drivers. 

 I've changed the scale factor but it starts loosing pulses at 600 rpm or
 so?? 

 Here's what's in my ini file

 [EMCMOT]
 EMCMOT = motmod
 COMM_TIMEOUT = 1.0
 COMM_WAIT = 0.010
 BASE_PERIOD = 62500
 SERVO_PERIOD = 100

   
OK, base period is 62.5 us.  For safety, we should never have encoder 
counts coming faster than twice that period.
So, that is 125 us or 8000 Hz.  Just to pick round numbers, 3600 RPM is 
60 rev/second, or 16.67 ms.  So, we can read no more than 8000 
counts/second, and need to fit that into .01667 seconds.  8000 * .016667 
= 133.  So, you need a 128 or 100 count/rev encoder.  Encoders are 
usually specified as cycles/rev (also written pulses/rev) and that is 4 
x less than the count rate.  So, you need a 25 or 32 cycle/rev encoder!  
That's why people use hardware assist to handle these encoder counting 
chores.

Jon

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Steve Blackmore
On Sun, 16 Aug 2009 10:58:55 -0400, you wrote:


Hal file reads

setp encoder.0.position-scale 360.00
  

This should now be 4096, unless you have a 256 cycle encoder which is 
1024 phases per rev (in which case it should be 1024).

Sorry - It does read 4096, I cut and pasted a copy I've got on this PC
and forgot to edit.

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Steve Blackmore
On Sun, 16 Aug 2009 12:10:50 -0500, you wrote:


OK, base period is 62.5 us.  For safety, we should never have encoder 
counts coming faster than twice that period.
So, that is 125 us or 8000 Hz.  Just to pick round numbers, 3600 RPM is 
60 rev/second, or 16.67 ms.  So, we can read no more than 8000 
counts/second, and need to fit that into .01667 seconds.  8000 * .016667 
= 133.  So, you need a 128 or 100 count/rev encoder.  Encoders are 
usually specified as cycles/rev (also written pulses/rev) and that is 4 
x less than the count rate.  So, you need a 25 or 32 cycle/rev encoder!  
That's why people use hardware assist to handle these encoder counting 
chores.

Looks like a Mesa card may be a good bet, but...

$199 + 22.5% import duty + carriage + 15% VAT =  a lot :(

I wonder how well I can get away with 1 pulse per rev?

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Stephen Wille Padnos
Steve Blackmore wrote:

On Sun, 16 Aug 2009 12:10:50 -0500, you wrote:
  

OK, base period is 62.5 us.  For safety, we should never have encoder 
counts coming faster than twice that period.
So, that is 125 us or 8000 Hz.  Just to pick round numbers, 3600 RPM is 
60 rev/second, or 16.67 ms.  So, we can read no more than 8000 
counts/second, and need to fit that into .01667 seconds.  8000 * .016667 
= 133.  So, you need a 128 or 100 count/rev encoder.  Encoders are 
usually specified as cycles/rev (also written pulses/rev) and that is 4 
x less than the count rate.  So, you need a 25 or 32 cycle/rev encoder!  
That's why people use hardware assist to handle these encoder counting 
chores.



Looks like a Mesa card may be a good bet, but...

$199 + 22.5% import duty + carriage + 15% VAT =  a lot :(
  

You could get the 7i43 instead, which is $89.  It connects to the 
parallel port, which may limit your servo loop rate eventually, but 
otherwise it's the same thing as a 5i20.  Oh, that and the fact it only 
has two I/O connectors instead of 3.

- Steve


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Steve Blackmore
On Sun, 16 Aug 2009 10:48:44 -0500, you wrote:


You might have a look at 

http://www.usdigital.com/products/interfaces/encoder/converters/edivide/

Something like this would allow you to experiment with speed vs
resolution and still keep the encoder you've got on there.

Thanks - Would be good Ray, but the price is prohibitive over here.

$50.95 + 22.5% import duty + $46.98 postage + VAT = $126 (approx) !!

Postage is a killer!!

Do you know of any IC's or circuits that can do the same?

Steve Blackmore
--

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Steve Stallings
Sounds like it is time to go back to your homemade 90
count encoder. If you just intend threading and not a 
rotary axis with positioning, then it should work well.

Steve Stallings 

 -Original Message-
 From: Steve Blackmore [mailto:st...@pilotltd.net] 
 Sent: Sunday, August 16, 2009 8:42 PM
 To: EMC2-Users-List
 Subject: Re: [Emc-users] Realistic spindle encoder count for 
 parallel port?
 
 On Sun, 16 Aug 2009 12:10:50 -0500, you wrote:
 
 
 OK, base period is 62.5 us.  For safety, we should never 
 have encoder 
 counts coming faster than twice that period.
 So, that is 125 us or 8000 Hz.  Just to pick round numbers, 
 3600 RPM is 
 60 rev/second, or 16.67 ms.  So, we can read no more than 8000 
 counts/second, and need to fit that into .01667 seconds.  8000 * 
 .016667 = 133.  So, you need a 128 or 100 count/rev encoder. 
  Encoders 
 are usually specified as cycles/rev (also written 
 pulses/rev) and that 
 is 4 x less than the count rate.  So, you need a 25 or 32 
 cycle/rev encoder!
 That's why people use hardware assist to handle these 
 encoder counting 
 chores.
 
 Looks like a Mesa card may be a good bet, but...
 
 $199 + 22.5% import duty + carriage + 15% VAT =  a lot :(
 
 I wonder how well I can get away with 1 pulse per rev?
 
 Steve Blackmore
 --
 
 --
 
 Let Crystal Reports handle the reporting - Free Crystal 
 Reports 2008 30-Day trial. Simplify your report design, 
 integration and deployment - and focus on what you do best, 
 core application coding. Discover what's new with Crystal 
 Reports now.  http://p.sf.net/sfu/bobj-july 
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Dewey Garrett

I just got one of these encoders and installed on a servo motor:

   http://www.cui.com/adtemplate.asp?invky=490429

   http://amtencoder.com/

The encoder has programmable (48-20-48 ppr) resolution and comes with a kit
that allows mounting on several shaft sizes. 

Available from digi-key, they list a Europe phone no. too.

no afiliation etc  -- but so far it seems to be working fine.


-- 
Dewey Garrett


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Peter C. Wallace
On Mon, 17 Aug 2009, Steve Blackmore wrote:

 Date: Mon, 17 Aug 2009 01:42:02 +0100
 From: Steve Blackmore st...@pilotltd.net
 To: EMC2-Users-List emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Realistic spindle encoder count for parallel port?
 
 On Sun, 16 Aug 2009 12:10:50 -0500, you wrote:


 OK, base period is 62.5 us.  For safety, we should never have encoder
 counts coming faster than twice that period.
 So, that is 125 us or 8000 Hz.  Just to pick round numbers, 3600 RPM is
 60 rev/second, or 16.67 ms.  So, we can read no more than 8000
 counts/second, and need to fit that into .01667 seconds.  8000 * .016667
 = 133.  So, you need a 128 or 100 count/rev encoder.  Encoders are
 usually specified as cycles/rev (also written pulses/rev) and that is 4
 x less than the count rate.  So, you need a 25 or 32 cycle/rev encoder!
 That's why people use hardware assist to handle these encoder counting
 chores.

 Looks like a Mesa card may be a good bet, but...

 $199 + 22.5% import duty + carriage + 15% VAT =  a lot :(

 I wonder how well I can get away with 1 pulse per rev?

 Steve Blackmore
 --

Can you use both encoders at once?
High resolution for low speed and Low resolution for high speed?


You could also do this with the high resolution encoder and a gizmo
like the USdigital divider, only with 2 selectable divide ratios run from a 
single I/O bit, say 1/1 and 1/64. This is easily do-able in a $ 1.20 CPLD

Would you need the index at high speeds?

Peter Wallace
Mesa Electronics

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


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Realistic spindle encoder count for parallel port?

2009-08-16 Thread Peter C. Wallace
On Mon, 17 Aug 2009, Steve Blackmore wrote:

 Date: Mon, 17 Aug 2009 01:42:02 +0100
 From: Steve Blackmore st...@pilotltd.net
 To: EMC2-Users-List emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Realistic spindle encoder count for parallel port?

 On Sun, 16 Aug 2009 12:10:50 -0500, you wrote:


 OK, base period is 62.5 us.  For safety, we should never have encoder
 counts coming faster than twice that period.
 So, that is 125 us or 8000 Hz.  Just to pick round numbers, 3600 RPM is
 60 rev/second, or 16.67 ms.  So, we can read no more than 8000
 counts/second, and need to fit that into .01667 seconds.  8000 * .016667
 = 133.  So, you need a 128 or 100 count/rev encoder.  Encoders are
 usually specified as cycles/rev (also written pulses/rev) and that is 4
 x less than the count rate.  So, you need a 25 or 32 cycle/rev encoder!
 That's why people use hardware assist to handle these encoder counting
 chores.

 Looks like a Mesa card may be a good bet, but...

 $199 + 22.5% import duty + carriage + 15% VAT =  a lot :(

 I wonder how well I can get away with 1 pulse per rev?

 Steve Blackmore
 --

Can you use both encoders at once?
High resolution for low speed and Low resolution for high speed?


You could also do this with the high resolution encoder and a gizmo
like the USdigital divider, only with 2 selectable divide ratios run from a
single I/O bit, say 1/1 and 1/64. This is easily do-able in a $ 1.20 CPLD

Would you need the index at high speeds?

Peter Wallace
Mesa Electronics

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


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users