On 02/06/2016 11:55 AM, Cecil Thomas wrote:
> M0 (DEBUG, CUTTING #82 TEETH AT #1 DP #85 passes per tooth cut depth 
> #7 on blank with OD #21)
> 
> displays as :
> 
> CUTTING 64.000000 TEETH AT 128.000000 DP 7.000000 passes per tooth 
> cut depth 0.021450 on blank with OD 0.515625
> 
> where   #82 is the number of teeth in the gear
>          #7 is the total depth from crest to root
>          #1 is the calculated Diametrical pitch
>          #85 is the number of cutting passes to make for each tooth
>          #21 is the actual outside diameter of the blank
> 
> The debug statement works perfectly except that all the variables are 
> carried out to several decimal places e.g. the number of teeth comes 
> out as 64.000000.
> 
> I tried rounding the variable before the debug statement but they 
> still come out with trailing zeros.  When I put the round function in 
> the statement it just prints the round function as text and still 
> displays the trailing zeros.
> 
> 
> Is there a simple way to make the debug statement drop the trailing 
> zeros when desired?

Unfortunately not.  Gcode variables are floating-point, not integer, and
the debug output represents them as such.


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to