Andy, this is REALLY AWESOME.

I just totally LOVE this mailing list!

I will definitely try to get it to work, I figure a 10 second timeout should
do it.

To use it, I would

- instantiate this comp
- connect its motor-pos-cmd input to motor-pos-cmd of the corresponding pid
- connect the comp's current-in input to the output of the PID
- Connect the current-out output to the DAC

Right?

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i

On Thu, Mar 3, 2011 at 1:45 PM, andy pugh <bodge...@gmail.com> wrote:

> On 3 March 2011 16:53, Jon Elson <el...@pico-systems.com> wrote:
>
> > I STILL don't like it.  You need a HAL component that looks at commanded
> > position
> > (comes from axis.8.motor-pos-cmd, I think) and compares current to last
> > position.
>
> Whilst also not liking it, this custom HAL component would do the
> trick: (It needs to be compiled with comp --install timeout.comp)
>
> component timeout """Reduces motor command to a predetermied value after a
> certain number of seconds of no axis motion""";
>
> pin in float position-command-in "link to motor-pos-cmd";
> pin in float current-in "link to the PID output";
> pin out float current-out "link to the DAC";
> param rw float timeout = 10 "timeout in seconds";
> param rw float default-current = 0 "current output after timeout";
> variable float old_pos;
> variable float t = 0;
> function _;
> license "GPL";
> author "Andy Pugh";
>
> ;;
>
> FUNCTION(_){
>    if (old_pos != position_command_in){
>        t = timeout;
>    }
>    else {
>        t -= fperiod;
>    }
>
>    if (t < 0){
>        current_out = default_current;
>    }
>    else {
>        current_out = current_in;
>    }
>
>    old_pos = position_command_in;
> }
>
>
>
> --
> atp
> "Torque wrenches are for the obedience of fools and the guidance of wise
> men"
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to