Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 15:20:33 jrmitchellj . wrote:

> I am working on a Jet JTM-2 (Bridgeport clone from Taiwan).
> Re-fitted with a 3hp 3ph spindle motor, and axis kits for motorizing
> X, Y, & Z from Elrod Machine Works in Arizona.
> Originally was going to build them myself, but thought about the hours
> required, and felt the Elrod kits were well engineered, and worth the
> price!
>
> I do have a few widgets in a pyvcp, but 2/3rds of the space is still
> open, so I would be interested in what you have done.
>
> Ray
>
Ok, two .xml's here, first one is from the GO704, 2nd one is from the pi 
running an old sheldon 11x36.

Put them in the [DISPLAY] section of the .ini file as:
PYVCP   = pyvcp-panel.xml
for the mill
or
PYVCP   = pyvcp-panel-tach-status.xml
for the lathe version.

There's toys you might not need in both, but while you'll have to hook 
them up with 'net' this and 'net' that, both will or should load and 
display by putting then into the ini files, then hooked up in the 
postgui.hal file.  The one for the lathe has tally's for the jog dials 
too. Having i/o to throw away on the lathe, 72 if all used, the 
temptation to add the gingerbread and useful eye candy was 
overpowering. :)  The dials, $20/copy from mpja.com, are handier than 
bottled beer, but in making them work, they are also at least half the 
main .hal file. I run that stuff in a much slower thread, about 100hz in 
deference to the pi's more limited speed, and they work very very well, 
allowing me to dial in the last .0002", more accurate than the lathe is 
with 70 years of use & bed wear on it.  The ball screws are cheap 
Chinese, need the nuts restuffed with balls about a thou bigger etc.  
But it cut the square threads on a $485 Bartlien cut rifled SS barrel to 
convert old meat in the pot from an Ackley-06 to a 6.5 Creedmoor just 
about 6 weeks back. Shoots well so far but I've not worked up a tack 
driver load yet for Hornady's new 143 gr ELD-X bullet either. Really 
long shots don't present themselves here in WV's right up in your face 
hills anyway. The last deer I ate was about 10 feet.

We do have a 1000 yard range about 25 miles from here though. Its 1000 
yard line of sight is actually on top of all the short range stuff, but 
about 100 feet above everything else. Whitehorse is the name they gave 
it.

Thanks again Ray.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 





  
RAISED
2

  "spindle_rpm"
  "Spindle"
  "RPM"
  240
  0
  2750
  500
  100
  0,2250,"green"
  2250,2600,"yellow"
  2600,2750,"red"

  

  

  RAISED
  2
  
"SPWR"
("Helvetica",8)
  
  
"on-led"
"6"
"72"
"green"
"red"
  



  RAISED
  2
  
"FWD"
("Helvetica",8)
  
  
"fwd-led"
"6"
"72"
"green"
"red"
  



  RAISED
  2
  
"REV"
("Helvetica",8)
  
  
"rev-led"
"6"
"72"
"green"
"red"
  

  

 

  

  
"checkbutton1"
"CamSW"
('Helvetica',10)
  
  
"button1"
"CamStor"
('Helvetica',10)
  


  "camactive"
  "6"
  "150"
  "green"
  "red"
	
  
  
  

  

  "button2"
  "CamCtr3"
  ('Helvitica',10)


  "button3"
  "CamCtr4"
  ('Helvetica',10)

  
  
		
  "camcentered3"
  "6"
  "80"
  "green"
  "red"


  "camcentered4"
  "6"
  "80"
  "green"
  "red"

  

  



  

  "align-start"
  "Align Start" 
  ('Helvetica',8)


  "align-enabled"
  "6"
  "225"
  "green"
  "red"

  
  

  

  "align-x"
  "  Align X  " 
  ('Helvetica',8)


  "align-y"
  "  Align Y  " 
  ('Helvetica',8)

  
  
		
  "aligned-to_x"
  "6"
  "99"
  "green"
  "red"


  "aligned-to_y"
  "6"
  "99"
  "green"
  "red"

  

  

  

  
"clear-offset"
" Clear Offsets " 
('Helvetica',8)
  

  






  
RAISED
2

  "spindle_rpm"
  "Spindle"
  "RPM"
  240
  0
  1500
  200
  50
  0,750,"green"
  750,1000,"yellow"
  1000,1500,"red"

  


  

  RAISED
  2
  
"MOTPWR"
("Helvetica",10)
  

Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread jrmitchellj .
I am working on a Jet JTM-2 (Bridgeport clone from Taiwan).
Re-fitted with a 3hp 3ph spindle motor, and axis kits for motorizing X, Y,
& Z from Elrod Machine Works in Arizona.
Originally was going to build them myself, but thought about the hours
required, and felt the Elrod kits were well engineered, and worth the price!

I do have a few widgets in a pyvcp, but 2/3rds of the space is still open,
so I would be interested in what you have done.

Ray

--J. Ray Mitchell Jr.
jrmitche...@gmail.com



The dogmas of the quiet past, are inadequate to the stormy present. The
occasion is piled high with difficulty, and we must rise with the occasion.
As our case is new, so we must think anew and act anew. We must disenthrall
ourselves, and then we shall save our country.*Abraham Lincoln
<http://www.quotationspage.com/quotes/Abraham_Lincoln/>*, *Annual message
to Congress, December 1, 1862*
*16th president of US (1809 - 1865)*

On Tue, Oct 24, 2017 at 9:52 AM, Gene Heskett <ghesk...@shentel.net> wrote:

> On Tuesday 24 October 2017 10:23:13 Peter C. Wallace wrote:
>
> > On Tue, 24 Oct 2017, John Kasunich wrote:
> > > Date: Tue, 24 Oct 2017 08:47:02 -0400
> > > From: John Kasunich <jmkasun...@fastmail.fm>
> > > Reply-To: "Enhanced Machine Controller (EMC)"
> > > <emc-users@lists.sourceforge.net>
> > > To: emc-users@lists.sourceforge.net
> > > Subject: Re: [Emc-users] One final Q re using a dc spindle motor
> > >
> > > On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> > >> On 24 October 2017 at 12:10, Gene Heskett <ghesk...@shentel.net>
> wrote:
> > >>> Correct, except encoder.nn.velocity is fed thru a last 4 edges
> > >>> averager to remove some of the noise in the encoders output. That
> > >>> unforch also affects the spindle to Z phaseing in the G33.1
> > >>> backout.
> > >>
> > >> You might want to filter the velociity, but I see no point in
> > >> filtering the position, which is what G33.1 uses
> > >>
> > >> You could also try using the DPLL timer to take jitter out of your
> > >> encoder sampling. That's a pretty simple setting with the right
> > >> firmware (one that ends in "D" for DPLL)
> > >
> > > I'm pretty sure Gene's "4 edge average" is dealing with mechanical
> > > errors in his homebrew spindle encoder rather then sampling jitter.
> > > The 4 edges mean that it averages over a full quadrature cycle and
> > > thus deviations from proper 90 degree quadrature phasing are
> > > masked.
> > >
> > >  John Kasunich
> > >  jmkasun...@fastmail.fm
> >
> > I have considered capturing a timestamp per quadrature state change (4
> > timestamp registers) then the drivers velocity estimation code could
> > have the option of chosing time deltas from the same quadrature edge
> > as the previous servo thread reading, but usually find I have other
> > things to do...
>
> Chuckle, that old saw about the road to hell comes to mind, Peter.  If
> anything like me, you first have to find a round tuit, and I am still
> looking for the artwork to do that which is not bound up an half a dozen
> copyright claims.
>
> Thanks. When I get these blanket chests finished and stuffed in vehicles
> going west, I'll get back to that project and make you one if I don't
> miss roll call some morning first.
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 10:23:13 Peter C. Wallace wrote:

> On Tue, 24 Oct 2017, John Kasunich wrote:
> > Date: Tue, 24 Oct 2017 08:47:02 -0400
> > From: John Kasunich <jmkasun...@fastmail.fm>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> > <emc-users@lists.sourceforge.net>
> > To: emc-users@lists.sourceforge.net
> > Subject: Re: [Emc-users] One final Q re using a dc spindle motor
> >
> > On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> >> On 24 October 2017 at 12:10, Gene Heskett <ghesk...@shentel.net> 
wrote:
> >>> Correct, except encoder.nn.velocity is fed thru a last 4 edges
> >>> averager to remove some of the noise in the encoders output. That
> >>> unforch also affects the spindle to Z phaseing in the G33.1
> >>> backout.
> >>
> >> You might want to filter the velociity, but I see no point in
> >> filtering the position, which is what G33.1 uses
> >>
> >> You could also try using the DPLL timer to take jitter out of your
> >> encoder sampling. That's a pretty simple setting with the right
> >> firmware (one that ends in "D" for DPLL)
> >
> > I'm pretty sure Gene's "4 edge average" is dealing with mechanical
> > errors in his homebrew spindle encoder rather then sampling jitter.
> > The 4 edges mean that it averages over a full quadrature cycle and
> > thus deviations from proper 90 degree quadrature phasing are
> > masked.
> >
> >  John Kasunich
> >  jmkasun...@fastmail.fm
>
> I have considered capturing a timestamp per quadrature state change (4
> timestamp registers) then the drivers velocity estimation code could
> have the option of chosing time deltas from the same quadrature edge
> as the previous servo thread reading, but usually find I have other
> things to do...

Chuckle, that old saw about the road to hell comes to mind, Peter.  If 
anything like me, you first have to find a round tuit, and I am still 
looking for the artwork to do that which is not bound up an half a dozen 
copyright claims.

Thanks. When I get these blanket chests finished and stuffed in vehicles 
going west, I'll get back to that project and make you one if I don't 
miss roll call some morning first.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 09:54:23 jrmitchellj . wrote:

> I would thin a 1HP drive should be able to plow through and thread a
> 3.8" hole without much grief, especially in low gear.
>
I have the servo amp current limit set at around 15 amps, and I can hear 
it squeaking as it regulates under a heavy load, and a 3/8"x18 tap is 
that, set for 1/2 turn per peck, it bogs down and the squeak is quite 
audible. The problem is the backgear ratio, its only 2/1. For tapping it 
really ought to be 10/1 if its being asked to turn a 3/8 or a 10mm tap.

> I have not set up my system for low range yet.  Allot to think about
> on that.  Still working on the basic system & bugs.

I just use enough Pgain so it turns the motor up and makes about 90% of 
the requested speed when its in backgear.  That also means the near for 
at-speed has a wide window. Probably too wide but its working. :)

What mill are you working on?, this is a grizzly g0704. Dirt cheap, 
basically a 400 lb table topper on a stand. I needed something to carve 
green and green style box joints in a full 12" (11.4 actually) mahogany 
board for a furniture project x 3 more as I'm making one for each of my 
4 boys.

For that it worked very well, but the mahogany I bought was kiln fried, 
poorly stickered and warped so bad it was impossible to use it for the 
boxes lids. I took a lid back and let it rock on the counter where I 
bought it, and they took about a year to locate some that wasn't warped 
in the kiln.  Once heated, the lignite is set forever so its not 
possible to unwarp it. A nominally 2' x 4' lid rocked about 4" on 
diagonal corners.  Obviously at the price of mahogany, I was not a happy 
camper.  Just that lid was around $90 worth of wood at nearly 8 sq ft.

> I was just thrilled to get the speed indicator and "at speed" signals
> working correctly!

Yes, that does widen the grin. :-)

> Ray

I have some other stuff in an xml file for the right hand window, stuff 
like a soft start tally for the spindle motor psu, otherwise it clears a 
20 amp breaker at power up, two more for spindle direction, and a bunch 
of stuff to run an endoscope camera mounted on the spindle lock ring. 
I'm finding I have to rewrite most of those commands, and I was working 
on that when a short to the data cable blew my 5i25's. So there is work 
yet to be done.

The xml for that gui is pretty much done, and I can send it along if it 
would give you some ideas.  Just ask.

> --J. Ray Mitchell Jr.
> jrmitche...@gmail.com
> (818)324-7573
>
>
> The dogmas of the quiet past, are inadequate to the stormy present.
> The occasion is piled high with difficulty, and we must rise with the
> occasion. As our case is new, so we must think anew and act anew. We
> must disenthrall ourselves, and then we shall save our
> country.*Abraham Lincoln
> *, *Annual
> message to Congress, December 1, 1862*
> *16th president of US (1809 - 1865)*
>
> On Tue, Oct 24, 2017 at 5:47 AM, John Kasunich
> 
>
> wrote:
> > On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> > > On 24 October 2017 at 12:10, Gene Heskett  
wrote:
> > > > Correct, except encoder.nn.velocity is fed thru a last 4 edges
> > > > averager to remove some of the noise in the encoders output.
> > > > That unforch also affects the spindle to Z phaseing in the G33.1
> > > > backout.
> > >
> > > You might want to filter the velociity, but I see no point in
> > > filtering the position, which is what G33.1 uses
> > >
> > > You could also try using the DPLL timer to take jitter out of your
> > > encoder sampling. That's a pretty simple setting with the right
> > > firmware (one that ends in "D" for DPLL)
> >
> > I'm pretty sure Gene's "4 edge average" is dealing with mechanical
> > errors in his homebrew spindle encoder rather then sampling jitter.
> > The 4 edges mean that it averages over a full quadrature cycle and
> > thus deviations from proper 90 degree quadrature phasing are
> > masked.
> >
> >   John Kasunich
> >   jmkasun...@fastmail.fm
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in 

Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 08:47:02 John Kasunich wrote:

> On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> > On 24 October 2017 at 12:10, Gene Heskett  
wrote:
> > > Correct, except encoder.nn.velocity is fed thru a last 4 edges
> > > averager to remove some of the noise in the encoders output. That
> > > unforch also affects the spindle to Z phaseing in the G33.1
> > > backout.
> >
> > You might want to filter the velociity, but I see no point in
> > filtering the position, which is what G33.1 uses
> >
> > You could also try using the DPLL timer to take jitter out of your
> > encoder sampling. That's a pretty simple setting with the right
> > firmware (one that ends in "D" for DPLL)
>
> I'm pretty sure Gene's "4 edge average" is dealing with mechanical
> errors in his homebrew spindle encoder rather then sampling jitter.
> The 4 edges mean that it averages over a full quadrature cycle and
> thus deviations from proper 90 degree quadrature phasing are
> masked.
>
>   John Kasunich
>   jmkasun...@fastmail.fm

Thats been my take on it too, John. The encoder wheel is mounted near the 
top of the spindle, on the sleeve the oem encoder for the oem crap 
controllers rpm indicator, and there is nothing there in that design to 
really make it truly concentric, plus at 268 edges, those slots are 
plenty fine, so a 1 thou error from backlash in the machine while 
carving the disk can easily be a 5 to 10 degree quad error. Note helped 
by the OD of the wheel as it has to clear the rest of the stuff under 
the drawbolt. 2.3" IIRC. I note that the average output still contains 
some of the 4 "pole" pattern, just reduced to 1/4 of its former peak to 
peak amplitude. Before the filter, the peak to peak is 50% of the 
average dc output, and that level of noise in the feedback hammers the 
motor around pretty bad since the Pico pwm-servo driver is a full 4 
quadrant driver, taking up the backlash in the gears quite noisily.  
With the filter, its still noticeable at free spinning but quiets quite 
a bit under cutting loads. Add in the very poor quality of the bearings 
in the backgear, and you have a recipe for recommending the wearing of 
30 db rated shooting ear muffs.

Developing the clock for the fifo is done by looking for a diff across 
the first sample/hold, actually a mux2, and when there is a difference 
indicating an edge has passed, then the whole 4 stage fifo is clocked 
one step in the same servo-thread cycle.  That of course is another 
source of timing error because the clocking is done at servo-thread 
intervals.

All rigged for a gain of 1 thru the whole thing.

Thanks John K.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 08:14:25 andy pugh wrote:

> On 24 October 2017 at 12:10, Gene Heskett  wrote:
> > Correct, except encoder.nn.velocity is fed thru a last 4 edges
> > averager to remove some of the noise in the encoders output. That
> > unforch also affects the spindle to Z phaseing in the G33.1 backout.
>
> You might want to filter the velociity, but I see no point in
> filtering the position, which is what G33.1 uses
>
I'll have to dbl-check that, its another error causer if not so, and it 
would solve a problem with the turnaround at the bottom phasing of a 
peck cycle wrapped around G33.1.

> You could also try using the DPLL timer to take jitter out of your
> encoder sampling. That's a pretty simple setting with the right
> firmware (one that ends in "D" for DPLL)

The 7i90HD has that, and I've enabled it on the pi driving the sheldon, 
but I do not believe the 5i25 has that feature. If so, it would show up 
as a pin IIRC.  But nothing there.  Stuff to check, thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Peter C. Wallace

On Tue, 24 Oct 2017, John Kasunich wrote:


Date: Tue, 24 Oct 2017 08:47:02 -0400
From: John Kasunich <jmkasun...@fastmail.fm>
Reply-To: "Enhanced Machine Controller (EMC)"
<emc-users@lists.sourceforge.net>
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] One final Q re using a dc spindle motor



On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:

On 24 October 2017 at 12:10, Gene Heskett <ghesk...@shentel.net> wrote:


Correct, except encoder.nn.velocity is fed thru a last 4 edges averager
to remove some of the noise in the encoders output. That unforch also
affects the spindle to Z phaseing in the G33.1 backout.


You might want to filter the velociity, but I see no point in
filtering the position, which is what G33.1 uses

You could also try using the DPLL timer to take jitter out of your
encoder sampling. That's a pretty simple setting with the right
firmware (one that ends in "D" for DPLL)


I'm pretty sure Gene's "4 edge average" is dealing with mechanical
errors in his homebrew spindle encoder rather then sampling jitter.
The 4 edges mean that it averages over a full quadrature cycle and
thus deviations from proper 90 degree quadrature phasing are
masked.

 John Kasunich
 jmkasun...@fastmail.fm



I have considered capturing a timestamp per quadrature state change (4 
timestamp registers) then the drivers velocity estimation code could have the 
option of chosing time deltas from the same quadrature edge as the previous 
servo thread reading, but usually find I have other things to do...




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



Peter Wallace
Mesa Electronics

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


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread jrmitchellj .
I would thin a 1HP drive should be able to plow through and thread a 3.8"
 hole without much grief, especially in low gear.

I have not set up my system for low range yet.  Allot to think about on
that.  Still working on the basic system & bugs.

I was just thrilled to get the speed indicator and "at speed" signals
working correctly!

Ray

--J. Ray Mitchell Jr.
jrmitche...@gmail.com
(818)324-7573


The dogmas of the quiet past, are inadequate to the stormy present. The
occasion is piled high with difficulty, and we must rise with the occasion.
As our case is new, so we must think anew and act anew. We must disenthrall
ourselves, and then we shall save our country.*Abraham Lincoln
*, *Annual message
to Congress, December 1, 1862*
*16th president of US (1809 - 1865)*

On Tue, Oct 24, 2017 at 5:47 AM, John Kasunich 
wrote:

>
>
> On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> > On 24 October 2017 at 12:10, Gene Heskett  wrote:
> >
> > > Correct, except encoder.nn.velocity is fed thru a last 4 edges averager
> > > to remove some of the noise in the encoders output. That unforch also
> > > affects the spindle to Z phaseing in the G33.1 backout.
> >
> > You might want to filter the velociity, but I see no point in
> > filtering the position, which is what G33.1 uses
> >
> > You could also try using the DPLL timer to take jitter out of your
> > encoder sampling. That's a pretty simple setting with the right
> > firmware (one that ends in "D" for DPLL)
>
> I'm pretty sure Gene's "4 edge average" is dealing with mechanical
> errors in his homebrew spindle encoder rather then sampling jitter.
> The 4 edges mean that it averages over a full quadrature cycle and
> thus deviations from proper 90 degree quadrature phasing are
> masked.
>
>   John Kasunich
>   jmkasun...@fastmail.fm
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread John Kasunich


On Tue, Oct 24, 2017, at 08:14 AM, andy pugh wrote:
> On 24 October 2017 at 12:10, Gene Heskett  wrote:
> 
> > Correct, except encoder.nn.velocity is fed thru a last 4 edges averager
> > to remove some of the noise in the encoders output. That unforch also
> > affects the spindle to Z phaseing in the G33.1 backout.
> 
> You might want to filter the velociity, but I see no point in
> filtering the position, which is what G33.1 uses
> 
> You could also try using the DPLL timer to take jitter out of your
> encoder sampling. That's a pretty simple setting with the right
> firmware (one that ends in "D" for DPLL)

I'm pretty sure Gene's "4 edge average" is dealing with mechanical
errors in his homebrew spindle encoder rather then sampling jitter.
The 4 edges mean that it averages over a full quadrature cycle and 
thus deviations from proper 90 degree quadrature phasing are
masked.

  John Kasunich
  jmkasun...@fastmail.fm

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread andy pugh
On 24 October 2017 at 12:10, Gene Heskett  wrote:

> Correct, except encoder.nn.velocity is fed thru a last 4 edges averager
> to remove some of the noise in the encoders output. That unforch also
> affects the spindle to Z phaseing in the G33.1 backout.

You might want to filter the velociity, but I see no point in
filtering the position, which is what G33.1 uses

You could also try using the DPLL timer to take jitter out of your
encoder sampling. That's a pretty simple setting with the right
firmware (one that ends in "D" for DPLL)

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

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 04:45:14 andy pugh wrote:

> On 24 October 2017 at 02:06, Gene Heskett  wrote:
> > So does anyone here have a working spindle "net" stanza that runs it
> > in velocity mode via a PDM signal? One you can post?
>
> The type of spindle and how it is controlled has absolutely no bearing
> on how you do this.
>
> You just need to check that motion.spindle-speed-out-rps is "near"
> hm2_5i25.0.encoder.NN.velocity

Correct, except encoder.nn.velocity is fed thru a last 4 edges averager 
to remove some of the noise in the encoders output. That unforch also 
affects the spindle to Z phaseing in the G33.1 backout. With a long peck 
cycle count, the threads get a bit schloppy. I may take that back out 
but the the gear backlash in the head gets noisy when fed straight thru. 
Very poor quality gears and bearings in the head of this mill. I need to 
take it apart and replace all the bearings with decently precise 
bearings. These ain't them. Roller skate stuff from vfx I suspect.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread Gene Heskett
On Tuesday 24 October 2017 03:18:43 jrmitchellj . wrote:

> Hi Gene.
> Here is the spindle stuff I got working on Sunday.
> Not sure it is exactly what you are looking for, but it may spark some
> ideas for you.
> Also, it may still need some work!
>
> Ray
>
> --J. Ray Mitchell Jr.
> jrmitche...@gmail.com
> (818)324-7573

Thanks a bunch J. Ray

I think I might have mine working, just now.  Yours looks better 
organized than mine, but mine has a "last 4 edges from the encoder" 
averager stanza mixed in. And where you used a lowpass, I used a limit3.

The last 4 edges averager is an attempt to remove some of the noise in 
the encoders output, however it also affects the reverse phasing when 
doing rigid tapping with a G33.1 wrapped in a peck cycle because this 
1hp motor can't drive a tap larger than a 10-32 straight in without 
bogging way down. So bigger holes get peck tapped. Depending on the 
material, from 1/4 turn per peck to as much as a full turn.

It can do the reversal quite rapidly in high back gear, which can get in 
trouble because the Z motor doesn't match its turn around times, so the 
reversal from motion is fed thru a limit3 to make a sin-squared accel 
profile out of the turn around, which in turn allows the Z to keep up as 
max accel is then at zero speed. It can drive a 10mm or 3/8" tap in low 
head gear, but motor inertia affects the turn around time since thats 
e-mv2, or 4x worse at 2x the armature revs. So the limit3 has to be 
restricted even more when in backgear.  If I had a switch on the knob to 
tell hal which gear it was in it would help.

I've got some stuff in there to tally the overshoot at the bottom of that 
peck, basically a way to let me compensate by turning around early, 
after measuring how deep the hole is, and not hit it with the tap. That 
gets expen$ive, cuz then I have to take the workpiece out to the shop 
and rig some edm on the little hf mill to remove the broken tap w/o 
mucking up the threads it did cut. And thats a slow process. :(

I did use a lot of k2 for dielecric fluid when doing edm, but found 
distilled water works even better as it doesn't make as much carbon so 
you can see what you are doing quite a bit longer.

Thanks again Ray, its appreciated.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread andy pugh
On 24 October 2017 at 02:06, Gene Heskett  wrote:
>
> So does anyone here have a working spindle "net" stanza that runs it in
> velocity mode via a PDM signal? One you can post?

The type of spindle and how it is controlled has absolutely no bearing
on how you do this.

You just need to check that motion.spindle-speed-out-rps is "near"
hm2_5i25.0.encoder.NN.velocity

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

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] One final Q re using a dc spindle motor

2017-10-24 Thread jrmitchellj .
Hi Gene.
Here is the spindle stuff I got working on Sunday.
Not sure it is exactly what you are looking for, but it may spark some
ideas for you.
Also, it may still need some work!

Ray

--J. Ray Mitchell Jr.
jrmitche...@gmail.com
(818)324-7573


The dogmas of the quiet past, are inadequate to the stormy present. The
occasion is piled high with difficulty, and we must rise with the occasion.
As our case is new, so we must think anew and act anew. We must disenthrall
ourselves, and then we shall save our country.*Abraham Lincoln
*, *Annual message
to Congress, December 1, 1862*
*16th president of US (1809 - 1865)*

On Mon, Oct 23, 2017 at 6:06 PM, Gene Heskett  wrote:

> Greetings everybody;
>
> That new card works but in all my hacking on the hal file, I seem to have
> lost the feedback path to getting a true signal out of the near module
> so the code will actually run once the spindle has been started.
>
> So, I've looked thru the wiki without much luck in finding a good spindle
> velocity servo's 'net' stanza to use as a model.
>
> I know its different from the stepper driver stanza. But although I ran
> pncconf again, it generated the axis(now joint) settings ok, but not the
> spindle stuffs, in particular it just sets's spindle-at-speed true,
> without getting a near module involved, and thats where I am failing.
> Somehow I am not getting any signal to near.speed.in2.
>
> So does anyone here have a working spindle "net" stanza that runs it in
> velocity mode via a PDM signal? One you can post?
>
> I also note that in the pncconf generated ini and hal files it made
> today, there are only [Joint-N] stanza's, no axis assignments other than
> comments.  Did I miss the memo that /all/ of that was deprecated?
>
> I still have some of both in my configs. I can see what needs to be
> changed, so thats just an edit session to fix, and from my understanding
> of how that works, it won't actually change a thing as far as operation
> goes.  More a matter of getting us all on the same page.
>
> Thanks everybody.
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page 
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
#***
#  SPINDLE S
#***

setp   pid.s.Pgain [SPINDLE_9]P
setp   pid.s.Igain [SPINDLE_9]I
setp   pid.s.Dgain [SPINDLE_9]D
setp   pid.s.bias  [SPINDLE_9]BIAS
setp   pid.s.FF0   [SPINDLE_9]FF0
setp   pid.s.FF1   [SPINDLE_9]FF1
setp   pid.s.FF2   [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable=>  pid.s.enable
net spindle-vel-cmd-rps => pid.s.command
net spindle-vel-fb-rps-abs  => pid.s.feedback
net spindle-output<=  pid.s.output

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.pwmgen.00.output-type 1
setp   hm2_5i25.0.pwmgen.00.scale  [SPINDLE_9]OUTPUT_SCALE

net spindle-output  => hm2_5i25.0.pwmgen.00.value
#net spindle-vel-cmd-rps  => hm2_5i25.0.pwmgen.00.value
net spindle-enable  => hm2_5i25.0.pwmgen.00.enable

# ---Encoder feedback signals/setup---

setphm2_5i25.0.encoder.03.counter-mode 0
setphm2_5i25.0.encoder.03.filter 1
setphm2_5i25.0.encoder.03.index-invert 0
setphm2_5i25.0.encoder.03.index-mask 0
setphm2_5i25.0.encoder.03.index-mask-invert 0
setphm2_5i25.0.encoder.03.scale  [SPINDLE_9]ENCODER_SCALE

net spindle-revs <=   hm2_5i25.0.encoder.03.position
net spindle-vel-fb-rps   <=   hm2_5i25.0.encoder.03.velocity
net spindle-index-enable <=>  hm2_5i25.0.encoder.03.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps<=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs<=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm<=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs<=  motion.spindle-speed-out-abs
net spindle-enable <=  motion.spindle-on
net spindle-cw <=  motion.spindle-forward
net spindle-ccw<=  motion.spindle-reverse
net spindle-brake  <=  motion.spindle-brake
net spindle-revs   =>  motion.spindle-revs
net spindle-at-speed   =>  motion.spindle-at-speed
net spindle-vel-fb-rps =>  motion.spindle-speed-in
net spindle-index-enable  <=>  motion.spindle-index-enable