On 09/28/2011 01:56 PM, andy pugh wrote:
> 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)

I want it to prompt the operator at the right moment to change belt/gear 
in response to a Snnn command, but just limit motor speed and not bother 
him if he's only adjusting the override.

>>   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?

I want to ignore override changes, so far as gear changes are concerned. 
I'll have to limit motor speed to reasonable values, but that's no problem.

>> 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.

That's exactly what I plan to do, but still thought the values might get 
out of sync for a program cycle or two while the override is being 
changed. I'll probably have to do some testing.

Thanks.

Karl

------------------------------------------------------------------------------
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