deadlykitten
Banned
- Joined
- Aug 5, 2016
hello, i just finished my 1st tool change procedure for the mill ; i did not attached it to a G code ( macro ) yet
actually, i do not know how
availabes syntaxes :
CALL OCHG VC190=active tool VC191=next tool
CALL OCHG VC190=active tool
CALL OCHG VC191=next tool
CALL OCHG
... it moves spindle to right if above senzor
... after "next tool" is prepared, M64 comes in, to avoid magazine "lift up" during cutting
... it handles EMPTY values, in case a variable gets "nill" ? or how would you call it ? kindly !
actually, i do not know how
availabes syntaxes :
CALL OCHG VC190=active tool VC191=next tool
CALL OCHG VC190=active tool
CALL OCHG VC191=next tool
CALL OCHG
... it moves spindle to right if above senzor
... after "next tool" is prepared, M64 comes in, to avoid magazine "lift up" during cutting
... it handles EMPTY values, in case a variable gets "nill" ? or how would you call it ? kindly !
Code:
OCHG
( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ )
( 0 to EMPTY's )
( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ )
IF [ VC190 NE EMPTY ] N1
VC190 = 0
N1
IF [ VC191 NE EMPTY ] N2
VC191 = 0
N2
( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ )
( active tool )
( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ )
IF [ VC190 EQ VTLCN ] NA1 ( if "desired tool" is allready in spindle )
IF [ VC190 NE 0 ] NA2 ( if empty spindle is not desired )
IF [ VTLNN EQ 0 ] NA3 ( if there is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