Stupid question- machines do as they're told... or do they?
I can't figure this out and its probably something simple.
I have just upgraded my centroid M-50 control's PC so I could run version 8.21 of the control software which allows full advanced macro that I didn't have before. I'm very familiar with macro on Haas, but am still figuring out the little syntax quirks on the centroid.
Here's the problem in the program (only relevent lines shown):
#110=-.138 ; Target depth
#103=.015 ; rough step-down
;
#110=ABS[#110] ; set #110 to positive value
#111=[(#110/#103)-(#110MOD#103)] ; # of rough steps
At this point, #111 should be a whole number representing the number of loops to step down for a subroutine. BUT, the control returns a "divide by 0" error on the line setting #111. How is .015 a 0?!!? I don't get it.
I've tried using a different variable #, getting rid of the mod statement, getting rid of the division statement etc. This thing really just wont divide by .015!
And BTW- the parameter for floating point error is set to ignore past 6 decimal places and the floating point error never seems to be less than 8 places. (Default is no floating point correction)
PLEASE HELP before I punch this thing!
Also, if anybody knows if there's a way to view the value of variables or get to some kind of table that shows them, that would be very helpful as I cannot find anything about that in the software manual.