ok, this looks like it works now, I missed the rps/rpm scaling:
http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/sim-spindle
this probably needs a bit of polishing for multiple instances
-m
Am 05.01.2012 um 08:47 schrieb Michael Haberler:
> 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:
>
>
> <0001-sim-try-sim_spindle-component.patch>
>
>
> 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
------------------------------------------------------------------------------
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