Hi Igor;
I use the following Hal logic to maintain the spindle speed (S setting)
and direction when in Hi or Low gear on my Bridgeport. A micro switch
lets EMC2 know when the spindle is in low gear and the logic selects a
different scale and direction, so fwd is still fwd in low gear.
You should be able to tweak the assignments for your need.
My spindle speed is controlled by Pico USC DAC but you can ignore
that. If the logic seems complicated, drawing it out helped me visualize
the design.
.ini
[SPINDLE]
LOW_GEAR_V_RPM = 26.589
HIGH_GEAR_V_RPM = 3.177
.hal
# Spindle Speed, Direction and Gears
#The following corrects direction and speed for Bridgeport 2 speed gear head
# DAC jumpers = JP1 removed JP2 horizontal right
# 1000 * ppmc.0.DAC8.00.value in to force a whole number
setp mux2.0.in0 [SPINDLE]LOW_GEAR_V_RPM # 10 volts/358 RPM * 1000 = 27.933
- 4.811% = 26.589
setp mux2.0.in1 [SPINDLE]HIGH_GEAR_V_RPM # 10 volts/3072 RPM * 1000 =
3.2552 - 2.40% = 3.177
#setp scale.0.offset 0.0
setp ppmc.0.DAC8.00.scale 1000.
net spindle-rpm-cmd motion.spindle-speed-out => scale.0.in
net spindle-higear ppmc.0.din.06.in => mux2.0.sel and2.0.in1 and2.3.in1
net spindle-logear ppmc.0.din.06.in-not => and2.1.in1 and2.2.in1
net spindle-fwd motion.spindle-forward => and2.0.in0 and2.2.in0
net spindle-rev motion.spindle-reverse => and2.1.in0 and2.3.in0
net or-0-in0 and2.0.out => or2.0.in0
net or-0-in1 and2.1.out => or2.0.in1
net or-0-out or2.0.out => ppmc.0.dout.00.out
net or-1-in0 and2.2.out => or2.1.in0
net or-1-in1 and2.3.out => or2.1.in1
net or-1-out or2.1.out => ppmc.0.dout.01.out
net spindle-gain mux2.0.out => scale.0.gain
net spindle-volts scale.0.out => ppmc.0.DAC8.00.value
Hope this helps
Don
On Wed, Dec 29, 2010 at 4:58 PM, Igor Chudov <[email protected]> wrote:
> On Wed, Dec 29, 2010 at 3:54 PM, andy pugh <[email protected]> wrote:
>
> > On 29 December 2010 21:27, Igor Chudov <[email protected]> wrote:
> >
> > > Right now I do not control my spindle speed from EMC at all. I do it by
> > > buttons that are electrical in nature, but are actuated by hand. The
> mill
> > > has a variable speed drive and I change speed by pressing buttons that
> > run
> > > an air motor.
> >
> > Interesting. I suspect you could drive that with the window comparator.
> > http://www.linuxcnc.org/docview/html/man/man9/wcomp.9.html
> > Using the .over and .under pins to operate the air valves.
> >
> >
> That's a great idea. I thought of something like that, but did not know
> that
> there was a component.
>
>
> > > Do you have gearchange implemented anywhere?
> >
> > Not at the moment, I have a 20-gear milling machine, and anticipate
> > using the expanded multi-gear variant of the gearchange component.
> >
> >
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users