On 28 September 2011 21:14, Karl Cunningham <ka...@keckec.com> wrote:
> I'm writing a user-space program to manage spindle speed on a machine
> with a VFD for the motor, and drive ratios set by belt and gear changes.

This doesn't answer your question, but are you aware that there are
realtime modules available to do the same thing?
(except they don't initiate the gear change, like you seem to be suggesting)

>  From available HAL signals I would like to determine whether a spindle
> speed change is due to the speed override slider in axis, or due to a
> gcode Snnn speed change. I don't want to initiate a belt or gear change
> if it is from override.

I take it checking that testing if the over-ride value is other than
100% isn't the answer?

> The only way I've come up with is to monitor the ratio of
> motion.spindle-speed-out to halui.spindle-override.value. The ratio
> doesn't seem to change when the override is changed, but does with
> programmed speed changes.

Yes, as speed = Svalue * over-ride, dividing by the over-ride leaves
you with just the S-value.

> Should this be evaluated over more than one program cycle to accommodate
> differences in timing between the two signals.

I would be tempted to compare with an "old value" which is only
updated if the difference is more than a certain amount.

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to