I corrected the syntax for the location of the parentheses and it ran fine. The only additional prompts displayed were for the values of #X1 and #Y1.
incorrect #Z1-(ABS#CBDEPTH) correct #Z1-ABS(#CBDEPTH) ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= -----Original Message----- From: Michael Senack [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 10:52 AM To: 'Lauzus, Frederick'; Michael Senack; '[EMAIL PROTECTED]' Subject: RE: [mfg-smartcam] Absolute variable entry I don't know what to say because, everytime it sees ABS in front of the variable #CBDEPTH with or without brackets I get "Error 2568: Expression error in expression" I exited Advance Wire EDM V11.5 and came back in as sometimes it gets mucked up. I look in Macro variables and CBDEPTH is a decimal number with a minus value that I've entered. This is not a complex thing I'm trying here as I want to add more logic and loop the process as per the users requirements. Here is the attached .mcl file for your viewing pleasure. Any other ideas is really appreciated. Thanks -----Original Message----- From: Lauzus, Frederick [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 10:30 AM To: Michael Senack; '[EMAIL PROTECTED]' Subject: RE: [mfg-smartcam] Absolute variable entry I've tried the following variations of the original macro you posted. Neither variation generated any errors. The problem must be related to something outside of the displayed commands. Is there more to this macro? What is the text displayed with the errors? // Variation #1 #X1=0 #Y1=0 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"] // I WANT THIS TO BE ALWAYS A POSITIVE NUMBER PROMPT[TX="Enter the depth of the counterbore.", VN="CBDEPTH"] PROMPT[TX="Enter the hole diameter.", VN="HOLEDIA"] ON_LAYER[LY=15, WP="XY_PLANE", LV=#Z1-ABS(#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-ABS(#CBDEPTH)] ON_LAYER[LY=15, WP="XY_PLANE", LV=#Z2, PT=#Z1-ABS(#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] // Variation #2 #X1=0 #Y1=0 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"] // I WANT THIS TO BE ALWAYS A POSITIVE NUMBER PROMPT[TX="Enter the depth of the counterbore.", VN="CBDEPTH"] #CBDEPTH=ABS(#CBDEPTH) 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] ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= -----Original Message----- From: Michael Senack [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 10:11 AM To: 'Lauzus, Frederick'; Michael Senack; '[EMAIL PROTECTED]' Subject: RE: [mfg-smartcam] Absolute variable entry I tried the following... 1) ARC[DR=0, XC=#X1, YC=#Y1, RA=#CBOREDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2, LV=#Z1-ABS#CBDEPTH] 2) ARC[DR=0, XC=#X1, YC=#Y1, RA=#CBOREDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2, LV=#Z1-ABS(#CBDEPTH)] 3) ARC[DR=0, XC=#X1, YC=#Y1, RA=#CBOREDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2, LV=#Z1-(ABS#CBDEPTH)] and I still keep getting ERROR 2601: Macro error in blah,blah and blah box showing up on that line. Hmmm... -----Original Message----- From: Lauzus, Frederick [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 9:46 AM To: Michael Senack; '[EMAIL PROTECTED]' Subject: RE: [mfg-smartcam] Absolute variable entry There is an ABSOLUTE function in v11.5 with similar syntax as v4.5 #Z3=#Z1-ABS(#CBDEPTH) Math Functions for Macros, from page 80 of the SmartCAM Customization guide Math Operations SmartCAM supports a variety of math operations. Notice that the operators SQR, ABS, SGN, INT,and DMS in the following list are not preceded by the pound sign (#): Operator Meaning + add - subtract * multiply / divide ^ exponential SQR square root ABS absolute value SGN return sign (+/-) INT integer value DMS converts strings of the form DDD.MMSS to decimal ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= � -----Original Message----- From: Michael Senack [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 17, 2000 8:47 AM To: '[EMAIL PROTECTED]' Subject: [mfg-smartcam] Absolute variable entry 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] ======================================================================
CBORE.MCL
Description: Binary data
