On Wed, Aug 15, 2007 at 10:31:49PM +0200, Sven Mueller wrote:
> Hi.
> 
> 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

Jeff

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