Is there an ABSOLUTE command in V11.5 mcl language?

I'm converting a V4.5 .mac macro file to a V11.5 .mcl macro file.
In the V4.5 macro file I used the ABS command in front of the #CBDEPTH
variable because, if you enter a minus number for the CBDEPTH variable it is
changed into a positive number.

Variables
Enter_Val
$#Z3=#Z1-ABS(#CBDEPTH)
@CR

Here is the V11.5 macro file...

PROMPT[TX="Enter the Z_level for the top surface of the counterbore.",
VN="Z1"]
PROMPT[TX="Enter the Z_level for the bottom surface of the counterbore.",
VN="Z2"]
PROMPT[TX="Enter the counterbore diameter.", VN="CBOREDIA"]
PROMPT[TX="Enter the depth of the counterbore.", VN="CBDEPTH"]<-- I WANT
THIS TO BE ALWAYS A POSITIVE NUMBER
PROMPT[TX="Enter the hole diameter.", VN="HOLEDIA"]
//
ON_LAYER[LY=15, WP="XY_PLANE", LV=#Z1-#CBDEPTH, PT=#Z1]
//
ARC[DR=0, XC=#X1, YC=#Y1, RA=#CBOREDIA/2, AS=0, AE=0, SE=2, SS=2, 
    SI=2, SC=2, LV=#Z1-#CBDEPTH]
//
ON_LAYER[LY=15, WP="XY_PLANE", LV=#Z2, PT=#Z1-#CBDEPTH]
//
ARC[DR=0, XC=#X1, YC=#Y1, RA=#HOLEDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2,
LV=#Z2]

I know I can use a WHILE loop to check the variable CBDEPTH and test if it
is less then zero try again but...

Thanks in advance for any suggestions.

Regards,

Michael Senack, X354
Your local friendly neighborhood CNC Programmer


======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to