When I try using the variable listed in the reference document, most of them so not seem to work.
When I add this code to the Init Tool Change section
:T:<N><TOOL_COMMENT><EOL>
:T:<TOOL_DIAMETER><EOL>
:T:<TOOL_DESCRIPTION><EOL>
The output generated is
(M4.0 X 0.7 TAP)
<TOOL_DIAMETER>
<TOOL_DESCRIPTION>
Only the TOOL_COMMENT seems to work. Do you have to add additional code toe the LIB files to activate these variables?
Is there a variable I can use to extract the current Setup name and Operation name?
Similar Threads:
Try thes syntaxes
<"#3.3T":STOCK_LENGTH>
<"#3.3T":STOCK_WIDTH>
<"#3.3T":STOCK_HEIGHT>
<"#3.4":TOOL_DIAMETER>
For tool description, I never try it
You can try add this to your mill.lib file
*-----------------------------------
:ATTRNAME=TOOL DESCRIPTION
:ATTRTYPE=POST
:ATTREMARK=
:CODETYPE=FORMAT
:WORD_ADDRESS_BEF=|(
:VAR=TOOL DESCRIPTION
:WORD_ADDRESS_AFT=)
:LEFT_PLACES=0
:RIGHT_PLACES=0
:UNITFLAG=NON_CONVERT
:ATTRSPACES=YES
:MODAL=NO
:ATTRUSED=1
:ATTREND
Try replacing these sections in .src file
:SECTION=LINE_LEADIN_MOVE_MILL
:T:C<%COMP-40)><G:1><X!><Y!><Z><F><EOL>
*-------------------------------------------------------------------------------
:SECTION=LINE_LEADOUT_MOVE_MILL
:T:C0<G:1><X!><Y!><Z><F><EOL>
Replace by : (
at the start of .src file change these
LEADING=FALSE
INT_LEADING=FALSE
Thank you for replay, I solved it in this way, for example arc moves: G <"%1LT":ARC_DIR> and as far as I testedd it it looks OK.
Next thing I need to change is "inverting" axis Y and Z, as on machine Z positive is downwards that means Y is "rotated" arround X. This means that my WCS (work coordinate system) is always placed on top-left corner.
Copy this to you .lib file, it should work, you may have to reverse your arc direction to make this works,register are x=24 y=25 z=26
:SECTION=CALC_ENDPOINT(DVAL,DEFAULTVAL,GC,GG,G_GRO UP,MACH,PREV,REGISTER)
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ELSE DVAL=DEFAULTVAL ENDIF
:C: PREV(REGISTER)=MACH(REGISTER)
:C: IF abs_inc=1 THEN MACH(REGISTER)=(DVAL) GOTO1 ENDIF
:C: BUCKET=0
:C: ROUNDOFF(DVAL-MACH(REGISTER),BUCKET,DVAL,G_RIGHT_PLACES,METRIC_O UT)
:C: SETON()
:C: IF ABS(DVAL)<ROUNDING_POINT AND LEADIN=NO AND
:C: LEADOUT=NO THEN
:C: SETOFF()
:C: ENDIF
:C: MACH(REGISTER)=(MACH(REGISTER)+DVAL)
:C1: IF REGISTER=24 THEN RETURN ENDIF
* FLIP SECTION
:C: DVAL=(-DVAL)
this section may have to be modified too, register are I=9 J=10 K=11
:SECTION=CALC_CENTER(DVAL,DEFAULTVAL,GC,GG,G_GROUP ,MACH,PREV,P_REG,REGISTER,AIC)
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ENDIF
:C: IF ATTROVERRIDE=NO THEN DVAL=(DEFAULTVAL-PREV(P_REG)) ENDIF
:C: IF REGISTER=10 OR REGISTER=11 THEN RETURN ENDIF
:C: IF REGISTER=9 THEN
:C: IF working_plane<3 OR working_plane=5 THEN RETURN ENDIF
:C: ENDIF
* FLIP SECTION
:C: DVAL=(PREV(P_REG)-DEFAULTVAL)
and this one too to reverse the Z in drilling cycles
:SECTION=CALC_DEC_REGISTER(DVAL,MACH,DEFAULTVAL,RE GISTER)
:C: IF ATTROVERRIDE=YES THEN DVAL=ATTRDVALUE ELSE DVAL=DEFAULTVAL ENDIF
:C: MACH(REGISTER)=DVAL
* FLIP SECTION
:C: DVAL=(-DVAL)
Vicent
Give me tis error
"Error Primary var: G not foundMETRIC_O UT) SETON() IF ABS(DVAL)<ROUNDING_POINT AND LEADIN=NO AND LEADOUT=NO THEN SETOFF() ENDIF MACH(REGISTER)=(MACH(REGISTER)+DVAL):C1
error 1 at 216 in CALC_ENDPOINT
Syntax error or unrecognized variable name
lane<3
error 1 at 187 in CALC_CENTER
Syntax error or unrecognized variable name"
:C: IF working_plane<3 OR working_plane=5 THEN RETURN ENDIF
Last edited by xesyfish; 03-21-2023 at 10:21 AM.
Hi
For the first error remove de space from
METRIC_O UT) -----> METRIC_OUT)
For second error, my post is build to handle angle head for horizontal work, I have the working_plane variable to handle this, in your case you will have to create your own condition, if you want to always flip it, just remove this line
:C: IF working_plane<3 OR working_plane=5 THEN RETURN ENDIF
Help me
What are you trying to do or what is the problem ?
Hi i try invert axis Y and Z, and arcs J.