Quote Originally Posted by Chaz View Post
User Manual of Macro(V2.2).pdfCustom macro program instruction.pdf

PAUS100 Pause 100ms
STAF(Unclamp Turret!) ???
OUT+M63;unclamp Trigger Unclamp
WAT+X06;T07,position of unclamp Wait for input X06 to become high
STAF(Rotate & Select Tool!) Display message
OUTPY18RY19 Activate outputs Y18 or Y19 depending on nearest tool rotation direction
CASET1+X00-X01-X02-X03 These are simply a set of CASE statements, and the code simply runs until it gets a match on location
CASET2-X00+X01-X02-X03
CASET3+X00+X01-X02-X03
CASET4-X00-X01+X02-X03
CASET5+X00-X01+X02-X03
CASET6-X00+X01+X02-X03
CASET7+X00+X01+X02-X03
CASET8-X00-X01-X02+X03
OUT-Y18-Y19 Deactivate Y18/Y18 outputs
PAUS50 Pause 50ms
STAF(Clamp Turret!) Display message
OUT-M63;clamp Re-clamp turret
WAT+X07; T08,position of clamp Wait for input X07 to become high
TS(0)=TAIM Tool number on the spindle = value passed by the T command
CURTS=TAIM Current tool set number = value passed by T command
STATUSINFO(Tool Change is Finished!)
PAUS300
DISP Refresh tool status on main interface
RETURN




Explanation.

M63:output for unclamp turret
reset for clamp turret

+T: CW Rotation_Turret
-T: CCW Rotation_Turret


T07: Input, Position of unlock turret
T08: Input for detecting position of lock turret
Now I've seen the programming manual, I've added comments to the code.
Looks like the turret simply spins until there is a location match, so the turret position never actually gets read in out with a tool change command.