Re: [Emc-users] help with spindle speed

2020-01-16 Thread Gene Heskett
On Thursday 16 January 2020 12:42:01 Gene Heskett wrote:

> On Wednesday 15 January 2020 22:59:20 Jon Elson wrote:
> > On 01/15/2020 09:10 PM, Brent Loschen wrote:
> > > In addition to the split pulleys, my "mechanical" concerns
> > > are more along the lines of the heavy duty electrical
> > > contactors clunking every time the fixed speed, 3 phase AC
> > > spindle motor is called to switch back and forth;
> > > increased heat in the motor windings due to those
> > > reversals; and the air powered, mechanical spindle brake
> > > snapping on and off hundreds of times.  Yes it was very
> > > tempting, and yes, I'm sure some of my concerns could be
> > > mitigated, however I feel that this old mill (cira 1985)
> > > just isn't the right tool for the job.
> >
> > OH!  I'm not sure you can do rigid tapping by plug-reversing
> > the motor on mains power.  At our shop, where the mills run
> > off 480 V mains, the plug reversing is so fast you can't
> > even hear it.  I doubt any Z axis could keep up.  But, don't
> > worry about
> > the motor, it can handle this "abuse".  I do rigid tapping
> > using a VFD and analog spindle speed control.  Even with that,
> > I generally reverse the spindle in about 3/4 second, from
> > 1000 RPM forward to 1000 RPM reverse.  That is slow enough
> > for the Z axis to follow.
> >
> > Jon

Spelling correction, tab=tap

> Whereas my G0704 is so fast I had to insert a limit3 to shape the
> turnaround so z could follow. The slowdown is not noticeable and the
> reversal is still around 1/2 second at the speeds I use. But I have to
> be carefull with blind holes, subtracting the overshoot else the tap
> bottoms and breaks. And I've not yet incorporated the gear shift
> effects into that shaping, needed because of the motor armatures
> increased effective mass due to the armatures 2x increase in speed in
> low gear.
>
> A work in progress IOW.  I have some hal code that measures this
> overshoot and displays it in the pyvcp area, both of the turns and the
> actual distance traveled, in the gui in the Sheldon's config, but
> haven't incorporated it into the G0704 yet. Need to get that done, and
> a tool holder made for the lathe to carry a top-hatted tap.
>
> Slowed progress because of the heart attack, but feeling perkier now.
>
> Currently working on the base shoe to install the BXA on the Sheldon,
> its a blond one bigger than the piston post I'll toss.  The base shoe
> is supplied way oversized so it will fit any compound and I need to
> make it fit the spacer where the compound used to live. LinuxCNC is
> its own compound.
>
> Let me describe how the reversal works here in 3 machines. TLM can do
> it too.
>
> 1st, the direction change coming from motion, going to the motor
> controller is blocked by a sample-hold while the limit3 is shaping the
> motor slowdown, decaying to an effectively stopped spindle, which is
> detected by a retriggerable timer timing out which is fed from encoder
> A's pulse.
>
> That timer timing out then refreshes the sample-hold which allows the
> direction signal thru to the motor controller (vfd for the Sheldon),
> and releases the limit3 (which has a mux2 to select zero or set speed
> as input to the limit3) to charge back up to the set speed. With that
> all in front of the spindle PID, and Pgain at 20+ in the G0704, and no
> PID in the Sheldon, letting the vfd do it all, the G0704 is a touch
> more complex.
>
> From that description, you should be able to achieve a reversal that Z
> can follow. It all happens so fast that you aren't aware its being
> dynamically controlled. On the Sheldon, belts squawled until I put new
> linkbelts in it, on the G0704 I can hear faintly, the current limiter
> in the pwm-servo amp I am driving its nominally 1 horse motor to about
> 2x its FLA draw, getting around 2 hp from it for those few
> milliseconds I can hear the limiter chirp.  Been doing the chirp for
> about 4 years now.
>
> Cheers, Gene Heskett


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] help with spindle speed

2020-01-16 Thread Gene Heskett
On Wednesday 15 January 2020 22:59:20 Jon Elson wrote:

> On 01/15/2020 09:10 PM, Brent Loschen wrote:
> > In addition to the split pulleys, my "mechanical" concerns
> > are more along the lines of the heavy duty electrical
> > contactors clunking every time the fixed speed, 3 phase AC
> > spindle motor is called to switch back and forth;
> > increased heat in the motor windings due to those
> > reversals; and the air powered, mechanical spindle brake
> > snapping on and off hundreds of times.  Yes it was very
> > tempting, and yes, I'm sure some of my concerns could be
> > mitigated, however I feel that this old mill (cira 1985)
> > just isn't the right tool for the job.
>
> OH!  I'm not sure you can do rigid tapping by plug-reversing
> the motor on mains power.  At our shop, where the mills run
> off 480 V mains, the plug reversing is so fast you can't
> even hear it.  I doubt any Z axis could keep up.  But, don't
> worry about
> the motor, it can handle this "abuse".  I do rigid tapping
> using a VFD and analog spindle speed control.  Even with that,
> I generally reverse the spindle in about 3/4 second, from
> 1000 RPM forward to 1000 RPM reverse.  That is slow enough
> for the Z axis to follow.
>
> Jon
>
Whereas my G0704 is so fast I had to insert a limit3 to shape the 
turnaround so z could follow. The slowdown is not noticeable and the 
reversal is still around 1/2 second at the speeds I use. But I have to 
be carefull with blind holes, subtracting the overshoot else the tab 
bottoms and breaks. And I've not yet incorporated the gear shift effects 
into that shaping, needed because of the motor armatures increased 
effective mass due to the armatures 2x increase in speed in low gear.

A work in progress IOW.  I have some hal code that measures this 
overshoot and displays it in the pyvcp area, both of the turns and the 
actual distance traveled, in the gui in the Sheldon's config, but 
haven't incorporated it into the G0704 yet. Need to get that done, and a 
tool holder made for the lathe to carry a top-hatted tap.

Slowed progress because of the heart attack, but feeling perkier now. 

Currently working on the base shoe to install the BXA on the Sheldon, its 
a blond one bigger than the piston post I'll toss.  The base shoe is 
supplied way oversized so it will fit any compound and I need to make it 
fit the spacer where the compound used to live. LinuxCNC is its own 
compound.

Let me describe how the reversal works here in 3 machines. TLM can do it 
too. 

1st, the direction change coming from motion, going to the motor 
controller is blocked by a sample-hold while the limit3 is shaping the 
motor slowdown, decaying to an effectively stopped spindle, which is 
detected by a retriggerable timer timing out which is fed from encoder 
A's pulse.

That timer timing out then refreshes the sample-hold which allows the 
direction signal thru to the motor controller (vfd for the Sheldon), and 
releases the limit3 (which has a mux2 to select zero or set speed as 
input to the limit3) to charge back up to the set speed. With that all 
in front of the spindle PID, and Pgain at 20+ in the G0704, and no PID 
in the Sheldon, letting the vfd do it all, the G0704 is a touch more 
complex.

>From that description, you should be able to achieve a reversal that Z 
can follow. It all happens so fast that you aren't aware its being 
dynamically controlled. On the Sheldon, belts squawled until I put new 
linkbelts in it, on the G0704 I can hear faintly, the current limiter in 
the pwm-servo amp I am driving its nominally 1 horse motor to about 2x 
its FLA draw, getting around 2 hp from it for those few milliseconds I 
can hear the limiter chirp.  Been doing the chirp for about 4 years now.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] help with spindle speed

2020-01-15 Thread Gene Heskett
On Wednesday 15 January 2020 22:10:37 Brent Loschen wrote:

> On 1/15/2020 3:22 PM, Gene Heskett wrote:
> > I should probably interject here that with a good high-res encoder,
> > it won't care about the wobbly speed mechanics as long as it keeps
> > on turning under load. The z axis rigid tapping motion is 100%
> > controlled by the spindle position as it turns.  Since the Z is
> > typically the slowest axis, you will have maximum spindle speeds to
> > deal with because Z can't keep up. My G0704 can reverse directions
> > much faster than Z, so I have some hal trickery in the form of a
> > limit3 to shape the reversal decel/accel's into something resembling
> > what the tv folks call a "sine squared" signal, where the peak of
> > the delta in speed matches the zero speed and the z motor _can_ keep
> > up because it has maximum torque at zero speed.  This "shaping" of
> > the reversal of the spindle has almost no effect on the actual
> > reversal times.
> >
> > Hi rez in the encoder allows much higher Pgain in the spindle motors
> > PID, and with the speed being helped by the air drive if its wired
> > up to the high.on.low signals and fast enough in reaction times,
> > rigid tapping should not be a problem. Haveing some experience with
> > split sheeves needing several revs to adjust, I can see that being a
> > problem, but it would be an educational experiment to see how big a
> > problem.
>
> In addition to the split pulleys, my "mechanical" concerns are more
> along the lines of the heavy duty electrical contactors clunking every
> time the fixed speed, 3 phase AC spindle motor is called to switch
> back and forth; increased heat in the motor windings due to those
> reversals; and the air powered, mechanical spindle brake snapping on
> and off hundreds of times.  Yes it was very tempting, and yes, I'm
> sure some of my concerns could be mitigated, however I feel that this
> old mill (cira 1985) just isn't the right tool for the job.
>
This is where all those clunking contacts get replaced with a vfd of 
suitable size. I have a cnc'd 11x56 Sheldon lathe that was in pretty bad 
shape when I paid way more than it was worth, but it was a Sheldon. It 
came with a 3/4 horse 110 volt single phase motor. I went touring the 
local recycle places looking for a stronger 3 phase, finding an air 
compressor recently removed from the local horsepistol during a remodel.

Probably 50 years old. One big tank, two compressors with 1hp 3 phase 220 
volt motors, 50 bucks got all 8 bolts blown off. Ebay supplied a 1.5 hp 
vfd. One motor ran quietly the other had pretty rusty bearings, so I 
ordered up $28 worth of replacement bearings and rebuilt the noisy one, 
the 2nd set went in a drawer.  Its in that lathe now, & I have done some 
rigid tapping with it. With the original v-belts spinning an 8" 4 jaw, 
reversal is silent except for the screaming v belts, like Michelin tires 
on hot blacktop. The vfd gives full 4 quadrant control useing dynamic dc 
braking to stop, and current controls so as not to overstress the motor 
by setting the motors max amperage at low speeds to the FLA on the 
motors nameplate. I was curious a year or so ago so I wrote a program 
that reversed the motor, with the spindle at 400 rpm, every 5 seconds, 
and let it run for an hour.  At the end of that hour it was still 
comfortable to lay a hand on it. That motor will run like that for 
another 100 years if the bearings last.

The motors windings are not being stressed anything like they would be 
with clanking relays doing all that.

The vfd won't last as most of those come with a note that they will need 
the power capacitors replaced at 5 year or so intervals.

As that sort of thing is my cup of tea, I am a CET, thats less of a 
problem than living long enough to need to do it since I am now 85 with 
a parts list thats beginning to look like the 6 million dollar man.

Turn around overshoot I have measured and I do measure it live, its 
displayed in the linuxcnc gui, both in revolutions and in overtravel 
distance the tap travels because of the overtravel of that big chuck at 
400 revs is about 5 turns so if tapping a blind hole, I have to subtract 
that travel from the depth I code to tap.  So generally I tap at slower 
speeds to reduce that overshoot. At 200 revs, the complete turnaround 
time is 1 fat second for a nearly 40 lb chuck.

Tapping is absolutely not a problem. My spindle encoder is watching the 
60 tooth bull gear, so the tap drive that determines where the carriage 
should be gets a fresh reading of where the spindle is in its rotation 
every 1.5 degrees of that rotation.  And while I could use the encoder 
to help govern the speeds, I don't, the vfd does a more than adequate 
job without it. And the computer running the show? Is a raspberry pi 4b.

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)
If we desire respect 

Re: [Emc-users] help with spindle speed

2020-01-15 Thread Jon Elson

On 01/15/2020 09:10 PM, Brent Loschen wrote:



In addition to the split pulleys, my "mechanical" concerns 
are more along the lines of the heavy duty electrical 
contactors clunking every time the fixed speed, 3 phase AC 
spindle motor is called to switch back and forth; 
increased heat in the motor windings due to those 
reversals; and the air powered, mechanical spindle brake 
snapping on and off hundreds of times.  Yes it was very 
tempting, and yes, I'm sure some of my concerns could be 
mitigated, however I feel that this old mill (cira 1985) 
just isn't the right tool for the job.


OH!  I'm not sure you can do rigid tapping by plug-reversing 
the motor on mains power.  At our shop, where the mills run
off 480 V mains, the plug reversing is so fast you can't 
even hear it.  I doubt any Z axis could keep up.  But, don't 
worry about
the motor, it can handle this "abuse".  I do rigid tapping 
using a VFD and analog spindle speed control.  Even with that,
I generally reverse the spindle in about 3/4 second, from 
1000 RPM forward to 1000 RPM reverse.  That is slow enough 
for the Z axis to follow.


Jon


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


Re: [Emc-users] help with spindle speed

2020-01-15 Thread Brent Loschen



On 1/15/2020 3:22 PM, Gene Heskett wrote:

I should probably interject here that with a good high-res encoder, it
won't care about the wobbly speed mechanics as long as it keeps on
turning under load. The z axis rigid tapping motion is 100% controlled
by the spindle position as it turns.  Since the Z is typically the
slowest axis, you will have maximum spindle speeds to deal with because
Z can't keep up. My G0704 can reverse directions much faster than Z, so
I have some hal trickery in the form of a limit3 to shape the reversal
decel/accel's into something resembling what the tv folks call a "sine
squared" signal, where the peak of the delta in speed matches the zero
speed and the z motor _can_ keep up because it has maximum torque at
zero speed.  This "shaping" of the reversal of the spindle has almost no
effect on the actual reversal times.

Hi rez in the encoder allows much higher Pgain in the spindle motors PID,
and with the speed being helped by the air drive if its wired up to the
high.on.low signals and fast enough in reaction times, rigid tapping
should not be a problem. Haveing some experience with split sheeves
needing several revs to adjust, I can see that being a problem, but it
would be an educational experiment to see how big a problem.
In addition to the split pulleys, my "mechanical" concerns are more 
along the lines of the heavy duty electrical contactors clunking every 
time the fixed speed, 3 phase AC spindle motor is called to switch back 
and forth; increased heat in the motor windings due to those reversals; 
and the air powered, mechanical spindle brake snapping on and off 
hundreds of times.  Yes it was very tempting, and yes, I'm sure some of 
my concerns could be mitigated, however I feel that this old mill (cira 
1985) just isn't the right tool for the job.



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


Re: [Emc-users] help with spindle speed

2020-01-15 Thread Gene Heskett
On Wednesday 15 January 2020 13:18:09 Brent Loschen wrote:

> Thanks for your reply Andy, and yes, PWM would be odd choice for the
> BP.  I chose PWM for this "lab" project, because in addition to the BP
> mill, I have a LCNC router with an analog controlled VFD which is next
> in line for a conversion.   Getting an analog controlled PWM to work
> properly seemed the most challenging, and it forces me to dig a little
> deeper into hal.  I feel much of what I learn here is applicable to
> the Bridgeport, even though I won't be using PWM there.
>
> The Bridgeport does have the split sheave/air motor "vari-speed"
> setup.  I've removed the pot used by the BOSS control, and fabricated
> an encoder wheel with I/R sensor that sits inside a 3D printed housing
> which bolts to existing tapped holes in the top of the spindle
> housing.  As much as I would like to have rigid tapping, I feel the
> mechanics of that old BP aren't up to the task, which is why I have
> just a single encoder and no index.

I should probably interject here that with a good high-res encoder, it 
won't care about the wobbly speed mechanics as long as it keeps on 
turning under load. The z axis rigid tapping motion is 100% controlled 
by the spindle position as it turns.  Since the Z is typically the 
slowest axis, you will have maximum spindle speeds to deal with because 
Z can't keep up. My G0704 can reverse directions much faster than Z, so 
I have some hal trickery in the form of a limit3 to shape the reversal 
decel/accel's into something resembling what the tv folks call a "sine 
squared" signal, where the peak of the delta in speed matches the zero 
speed and the z motor _can_ keep up because it has maximum torque at 
zero speed.  This "shaping" of the reversal of the spindle has almost no 
effect on the actual reversal times.

Hi rez in the encoder allows much higher Pgain in the spindle motors PID, 
and with the speed being helped by the air drive if its wired up to the 
high.on.low signals and fast enough in reaction times, rigid tapping 
should not be a problem. Haveing some experience with split sheeves 
needing several revs to adjust, I can see that being a problem, but it 
would be an educational experiment to see how big a problem.

> I've seen a couple of posts from 
> others who have used various combinations of spindle-at-speed plus 
> others to control the air motor which I hope to leverage.
>
> Brent
>
> On 1/15/2020 3:06 AM, andy pugh wrote:
> > On Wed, 15 Jan 2020 at 03:09, Brent Loschen  
wrote:
> >> The DC motor speed is
> >> currently controlled with a pot wiper on a small PWM driver board.
> >> The goals of this test bed are to show spindle RPM , control the DC
> >> motor with 0-5vdc from the 7i76 , and use knowledge gained to
> >> convert the BP.
> >
> > Are you planning to use a VFD and control spindle motor speed, or
> > use a mechanical variable speed?
> >
> > If you have a 7i76 then using PWM seems a bit odd, as the 7i76 has a
> > built-in digital potentiometer for spindle speed control.
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] help with spindle speed

2020-01-15 Thread Brent Loschen


Thanks for your reply Andy, and yes, PWM would be odd choice for the 
BP.  I chose PWM for this "lab" project, because in addition to the BP 
mill, I have a LCNC router with an analog controlled VFD which is next 
in line for a conversion.   Getting an analog controlled PWM to work 
properly seemed the most challenging, and it forces me to dig a little 
deeper into hal.  I feel much of what I learn here is applicable to the 
Bridgeport, even though I won't be using PWM there.


The Bridgeport does have the split sheave/air motor "vari-speed" setup.  
I've removed the pot used by the BOSS control, and fabricated an encoder 
wheel with I/R sensor that sits inside a 3D printed housing which bolts 
to existing tapped holes in the top of the spindle housing.  As much as 
I would like to have rigid tapping, I feel the mechanics of that old BP 
aren't up to the task, which is why I have just a single encoder and no 
index.   I've seen a couple of posts from others who have used various 
combinations of spindle-at-speed plus  others to control the air motor 
which I hope to leverage.


Brent

On 1/15/2020 3:06 AM, andy pugh wrote:

On Wed, 15 Jan 2020 at 03:09, Brent Loschen  wrote:


The DC motor speed is
currently controlled with a pot wiper on a small PWM driver board. The
goals of this test bed are to show spindle RPM , control the DC motor
with 0-5vdc from the 7i76 , and use knowledge gained to convert the BP.

Are you planning to use a VFD and control spindle motor speed, or use
a mechanical variable speed?

If you have a 7i76 then using PWM seems a bit odd, as the 7i76 has a
built-in digital potentiometer for spindle speed control.





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


Re: [Emc-users] help with spindle speed

2020-01-15 Thread andy pugh
On Wed, 15 Jan 2020 at 03:09, Brent Loschen  wrote:

> The DC motor speed is
> currently controlled with a pot wiper on a small PWM driver board. The
> goals of this test bed are to show spindle RPM , control the DC motor
> with 0-5vdc from the 7i76 , and use knowledge gained to convert the BP.

Are you planning to use a VFD and control spindle motor speed, or use
a mechanical variable speed?

If you have a 7i76 then using PWM seems a bit odd, as the 7i76 has a
built-in digital potentiometer for spindle speed control.

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


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


Re: [Emc-users] help with spindle speed

2020-01-14 Thread Brent Loschen



On 1/14/2020 9:13 PM, Peter C. Wallace wrote:

On Tue, 14 Jan 2020, Brent Loschen wrote:


Date: Tue, 14 Jan 2020 20:06:36 -0700
From: Brent Loschen 
Reply-To: "Enhanced Machine Controller (EMC)"
    
To: "Enhanced Machine Controller (EMC)" 


Subject: [Emc-users] help with spindle speed


Almost a year ago I converted my servo'd Bridgeport/Boss to LinuxCNC 
and it works sooo much better than that old and slow 68000 control 
that I've been reluctant to change anything.  The only remaining todo 
is to convert the spindle speed control from the current mechanical 
switch to machine/digital control, and it's a perfect winter project.


To that end I've set up as a small test bed in the comfort of my home 
with a 5i25/7i76 controlling 3 steppers, 3 home switches, and a PWM 
driven DC motor. I configured LCNC-2.7.14 with pncConf using 
"5i25-internal Data" and "7i76x2 - With one 7i76".  All steppers, 
switches, homing, etc work as expected. I've fabricated a rotary 
encoder with slots and an IR sensor for the motor that outputs +5v 
pulses and verified it with an oscilloscope.  The DC motor speed is 
currently controlled with a pot wiper on a small PWM driver board. 
The goals of this test bed are to show spindle RPM , control the DC 
motor with 0-5vdc from the 7i76 , and use knowledge gained to convert 
the BP.


My first goal was to simply show the RPM on the Pyvcp spindle speed 
panel, so in addition to the 3 stepgens, I also enabled encoder 0 in 
pncConf by selecting the "i/o connector 3" tab, and changed the 
"unused Spindle Encoder 0" dropdown to "Spindle Encoder 0".  I then 
attached the output of my encoder to TB3 pin 7, which according to 
the 7i76 manual, should be ENCA+.   Got no RPM indication on the 
panel, so I verified that I had pulses on TB3-7 with my scope.  Next 
I did a dmesg and saw that encoder #0 had been instantiated on Port 
3-13, and checked my .hal file to make sure that 
encoder.00.counter-mode was set to 1, (as I only have an A input). I 
then looked at the hal configuration and put a watch (also halmeter) 
on a number of pins associated with spindle and encoder to ensure 
machine was homed, spindle was enabled, and to look for any changes 
on hm2_5i25.encoder.00.input-a, but nothing. Toggling the home 
switches, and the axis spindle enable button showed that my pin 
watches were working as expected, and that the spindle was truly 
enabled. All good.  I'm to the point where I'm wondering if TB3 pin 7 
is the correct input, or if I should be using a different 7i76 input 
pin.
I'm somewhat of a hal newby, and although I feel I understand the 
basics, I have a lot more to learn.  Thanks in advance for any help 
you can offer. Hal and ini files attached.



Brent





Is the 7I76's encoder input set for Single ended inputs?
If not, you will not get any signal from a single ended source
That solved it Peter!  I checked the field power jumpers before I 
installed the 5i25, but never went back and changed the spindle jumpers.

Thanks Again!


Peter Wallace
Mesa Electronics


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




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


Re: [Emc-users] help with spindle speed

2020-01-14 Thread Peter C. Wallace

On Tue, 14 Jan 2020, Brent Loschen wrote:


Date: Tue, 14 Jan 2020 20:06:36 -0700
From: Brent Loschen 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: [Emc-users] help with spindle speed


Almost a year ago I converted my servo'd Bridgeport/Boss to LinuxCNC and it 
works sooo much better than that old and slow 68000 control that I've been 
reluctant to change anything.  The only remaining todo is to convert the 
spindle speed control from the current mechanical switch to machine/digital 
control, and it's a perfect winter project.


To that end I've set up as a small test bed in the comfort of my home with a 
5i25/7i76 controlling 3 steppers, 3 home switches, and a PWM driven DC motor. 
I configured LCNC-2.7.14 with pncConf using "5i25-internal Data" and "7i76x2 
- With one 7i76".  All steppers, switches, homing, etc work as expected. 
I've fabricated a rotary encoder with slots and an IR sensor for the motor 
that outputs +5v pulses and verified it with an oscilloscope.  The DC motor 
speed is currently controlled with a pot wiper on a small PWM driver board. 
The goals of this test bed are to show spindle RPM , control the DC motor 
with 0-5vdc from the 7i76 , and use knowledge gained to convert the BP.


My first goal was to simply show the RPM on the Pyvcp spindle speed panel, so 
in addition to the 3 stepgens, I also enabled encoder 0 in pncConf by 
selecting the "i/o connector 3" tab, and changed the "unused Spindle Encoder 
0" dropdown to "Spindle Encoder 0".  I then attached the output of my encoder 
to TB3 pin 7, which according to the 7i76 manual, should be ENCA+.   Got no 
RPM indication on the panel, so I verified that I had pulses on TB3-7 with my 
scope.  Next I did a dmesg and saw that encoder #0 had been instantiated on 
Port 3-13, and checked my .hal file to make sure that encoder.00.counter-mode 
was set to 1, (as I only have an A input). I then looked at the hal 
configuration and put a watch (also halmeter) on a number of pins associated 
with spindle and encoder to ensure machine was homed, spindle was enabled, 
and to look for any changes on hm2_5i25.encoder.00.input-a, but nothing. 
Toggling the home switches, and the axis spindle enable button showed that my 
pin watches were working as expected, and that the spindle was truly enabled. 
All good.  I'm to the point where I'm wondering if TB3 pin 7 is the correct 
input, or if I should be using a different 7i76 input pin.
I'm somewhat of a hal newby, and although I feel I understand the basics, I 
have a lot more to learn.  Thanks in advance for any help you can offer. Hal 
and ini files attached.



Brent





Is the 7I76's encoder input set for Single ended inputs?
If not, you will not get any signal from a single ended source

Peter Wallace
Mesa Electronics


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