On Wednesday 07 April 2010, Andy Pugh wrote:
>On 7 April 2010 03:00, Gene Heskett <[email protected]> wrote:
>> Sounds like your math needs a mod function.  It would drive it to the
>> next index only, I think.
>
>Yes, that ought to work too (though I would prefer that the gear
>didn't move at all when the tooth count was altered).
>I was all set to do it this way, then failed to find a "mod" function
>in HAL either.
>
Well, it seems to me that you would have to have an index position for both 
motions.  Then it should do the mod result move to get to its own index when 
the index of the driven axis is triggered.  That would at least put the 
zeroeth tooth in a constant position, which because of keyway cuts and such, 
might be a desirable thing.

>I think I might look at writing my own function.

Some languages use the % sign as a mod function.  If its not there, then I 
suppose it can be cobbled up in 4 or 5 lines of gcode by a loop that 
subtracts the count for a full turn from the present position count until it 
either goes below zero, or is less than the full turn count.  But I babble a 
lot too.  ;-) 


-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

"The trouble with doing something right the first time is that nobody 
appreciates how difficult it was."
-- Walt West

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to