Jeff Epler schrieb:
> On Wed, Aug 15, 2007 at 10:31:49PM +0200, Sven Mueller wrote:
>>
>> Due to the way our machine drives the axes, we would like to turn off
>> the amplpifiers when no axis moves (even when the spindle is on), since
>> the steppers get really hot if they don't move but are driven at full
>> current.
> [...]
> 
> The following component can be added to an emc 2.1 system with
> "sudo comp --install change_detect.comp", and has an output which is
> TRUE when the input is changing.
> 
> component change_detect;
> pin in float in;
> pin out bit out "TRUE if \\fBin\\fR changed since the last run; FALSE 
> otherwise";
> pin out bit out_not "FALSE if \\fBin\\fR changed since the last run; TRUE 
> otherwise";
> option data float;
> function _;
> ;;
> MODULE_LICENSE("GPL");
> FUNCTION(_) {
>     float temp = in;
>     if(data != temp) { out = 1; out_not = 0; }
>     else { out = 0; out_not = 1; }
>     data = temp;
>  }
> 
> its behavior when the input is a square wave or a sine wave:
>     http://emergent.unpy.net/files/sandbox/change-detect-1.png
>     http://emergent.unpy.net/files/sandbox/change-detect-2.png

Hmm, that certainly is an interesting component. However, I see a timing
issue here:
change_detect goes true if the input changed compared to the last input.
Let's say that this allows me to configure hal so that I have a pin go
true as soon as the direction pin or the step (clock) pin changes. How
does that help me to enable the amplifiers (very shortly) before any
axis starts to move and only disable it again shortly after it stopped
moving? I fail to see the necessary logic/connections needed to achive
that. Especially since the change_detect ping goes false again as soon
as the input doesn't change anymore. Which input pin/signal do you
suggest to feed into change_detect?

TIA and best regards,
Sven

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to