On Fri, Sep 24, 2010 at 9:38 PM, Jon Elson <[email protected]> wrote:

> Don Stanley wrote:
> >
> > setp mux2.0.in0 [SPINDLE]LOW_GEAR_V_RPM   # 10 volts/350  RPM = 0.0285714
> > setp mux2.0.in1 [SPINDLE]HIGH_GEAR_V_RPM  # 10 volts/3000 RPM =
> 0.00333333
> >   #setp scale.0.offset 0.0
> >   #setp ppmc.0.DAC8.00.scale 300.
> > net spindle-rpm-cmd motion.spindle-speed-out => scale.0.in
> > net spindle-higear  ppmc.0.din.06.in-not => mux2.0.sel
> > net spindle-gain    mux2.0.out => scale.0.gain
> > net spindle-volts   scale.0.out => ppmc.0.DAC8.00.value
> > net spindle-fwd     motion.spindle-forward => ppmc.0.dout.00.out
> > net spindle-rev     motion.spindle-reverse => ppmc.0.dout.01.out
> >
> > Your _io.hal works fine with the Axis Display on my system.
> > That's the sum of my knowledge to this point.
> >
> Are you saying that if you use "my" univstep_io.hal file, you get
> smoothly varying
>
Yes Because you have setp ppmc.0.DAC8.00.scale 500, and that forces
a whole (ones) digit to change with the very smallest input change.

voltages out of the DAC?  If so, that clearly indicates that something
> is getting
> integer-ized in your hal file.
>
> OK, first thing I see is that you have commented out the scale value for
> ppmc.o.DAC8.00.scale
> Why did you do this?  Without a specific value set to that parameter, it
> is allowed to default
> to something - who knows what?  Looking in the code, I see it is
> supposed to default to 1.0,
>
Yes it defaulted to 1. BUT ppmc.0.DAC8.00.value does not accept the
fractional part of the input. That is why the output does not change
until the whole (ones) digit changes.

but maybe for some reason that isn't happening.  Maybe it would be
> better to set it to a known value.
> The driver code sets output voltage to value / scale and then maps the
> magnitude of that onto
> a 0..255 value to send to the DAC.
>
> Looking at the hal components, mux2 and scale are certainly both float
> components.
> I just tested my standard PWM setup (which uses the same driver) and all
> seems to be working
> fine here.  I went up in 50 RPM steps, and the voltage from the DAC went
> up in small
> steps of about 100 mV per step.
>
> Using your value of 0.33666 as the input value to the DAC, and assuming
> the 1.0 default
> of scale works, then you should get (0.336666/10) * 255 rounds up to 9
> as the digital value
> sent to the DAC.  That should come out as (9/255)*10 = 353 mV
>
> Your second value of 0.66999 computes to a digital value of 17, and that
> should give 667
> mV.
>
> Oh, you should check that SSR1 is turned on, even for low spindle
> speeds!  There may be
> some value below which the specified spindle speed is assumed to be
> close enough to
> zero, and the spindle run commands are not turned on.  That will force a
> zero output
> no matter what is sent to the DAC's digital inputs.
>
The SSR outputs are doing correctly.

>
> Jon
>
The following works but any fractional part of the input to
ppmc.0.DAC8.00.value is ignored. I will have to increase the multiplyer and
ppmc.0.DAC8.00.scale to get the whole number to include the fractional part
#######################################################
# Spindle Speed, Direction and Gears
# DAC jumpers = JP1 removed  JP2 horizontal right
# 300 * ppmc.0.DAC8.00.value in to force a whole number
#######################################################
setp mux2.0.in0 [SPINDLE]LOW_GEAR_V_RPM   # 10 volts/350 RPM * 300 =
8.571428
setp mux2.0.in1 [SPINDLE]HIGH_GEAR_V_RPM  # 10 volts/3000 RPM * 300 = 1.0
  #setp scale.0.offset 0.0
setp ppmc.0.DAC8.00.scale 300.
net spindle-rpm-cmd motion.spindle-speed-out => scale.0.in
#net spindle-higear  ppmc.0.din.06.in-not => mux2.0.sel
net spindle-higear  ppmc.0.din.06.in => mux2.0.sel
net spindle-gain    mux2.0.out => scale.0.gain
net spindle-volts   scale.0.out => ppmc.0.DAC8.00.value
net spindle-fwd     motion.spindle-forward => ppmc.0.dout.00.out
net spindle-rev     motion.spindle-reverse => ppmc.0.dout.01.out

Hope this helps
    Don

>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to