well, I go for usability, so I take 6% overhead and working over 1% and broken 
any time.

Anyway let's give it a try with your approach:

the sim_spindle.comp didnt compile and needed a bit of polish
I created a sim config to integrate it which 'runs' - speed rampup/rampdown and 
at-speed work fine and G33.1 doesnt block anymore

the g33.1 and G84 cycles to funny things to spindle speed at the end of the 
cycle, so this still needs work

- Michael

ps: cant push to my repo right now, so here as a patch:


Attachment: 0001-sim-try-sim_spindle-component.patch
Description: Binary data



Am 05.01.2012 um 03:19 schrieb Jeff Epler:

> IMO, it's a feature that the most basic sim configurations don't require
> a base thread.
> 
> On my system (2.8GHz AMD), rtapi_app takes ~1% CPU before the change and
> about 6% after.  Admittedly 6% isn't much, but it's worse than 1%.
> 
> Perhaps we should write a simulated spindle that can work without
> requiring a base thread.
> 
> Here's a first stab at this.  I looked at some traces in halscope but
> didn't try any simulated rigid tapping.
> 
> // ---------------------------------------------------------------------
> component sim_spindle "Simulated spindle with index pulse";
> 
> pin in float velocity-cmd "Commanded speed, in revolutions per second";
> pin out float position-fb "Feedback position, in revolutions";
> pin io bit index-enable "Reset position-fb to 0 at the next full rotation";
> 
> license "GPL";
> 
> function _;
> ;;
> #include <rtapi_math.h>
> 
> 
> FUNCTION(_) {
>    double old_position = position;
>    double new_position = position + speed * fperiod;
> 
>    if(index_enable && (floor(old_position) != floor(new_position))) {
>        index_enable = false;
>        if(speed < 0)
>            new_position = new_position - ceil(new_position);
>        else
>            new_position = new_position - floor(new_position);
>    }
> 
>    position = new_position;
> }
> // ---------------------------------------------------------------------
> 
> Jeff
> 
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual 
> desktops for less than the cost of PCs and save 60% on VDI infrastructure 
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to