Hi all. I have been searching the internet for old posts and threads that might address my questions. I have not been able to find satisfactory examples or answers- at least not ones I'm happy with.

I am making a single program with multiple sub-programs on my twin turret LU-300 with OSP-P200L. There need to be lots of controls in place to eliminate chances for operator mistakes. I want to write...
1.)tool geometry in X and Z
2.)tool nose radius in X and Z
3.)tool nose radius quadrant for cutter comp (saw some reports that writing this P value is not possible)

4.)limit wear offset to an absolute value of .015"
5.)max tool life management (TLM) numbers in cycles

Writing all this means if anyone ever tries changing a number in one of the appropriate tables it is over-written in the next part cycle. I have tried setting up TLM on Okumas before, and I find it extremely convoluted. I've never been successful with getting it to work. I do not want redundant tooling at this point! That will come after I can get the basics working. I want to set the TLM max counts in a sub, jump back to the main, and count the tool usage in another cycle. The TLM table gets read and finds the expired tool at the start of the next cycle. How do I do this on my okuma? How do I differentiate between T1 on turret A and T1 on turret B? I was wondering if running a unique sub-routine after each G13 and G14 the controller realizes the tools in those subs are for each specific turret. Here's the geometry check sub-routine I want to add the TLM write values in to that would occur after a G14 in the main program. This program attempts to write tool geometry, so if people enter offset data in the geometry table it's immediately overwritten. The program attempts to write tool nose radius (TNR) data. I'd like to write what quadrant/P-value too. I'd like to write the max TLM count here. Will I have to do a messy count with if statements and jumps?

07500
(G14 B lower turret)
(T1 RH DNMG)
VTOFX [1]=1.584
VTOFZ [1]=-1.2550
VDNRX [0101]=.047
VDNRZ [0101]=.047
VTLCN [1]=__________ (write max # of cylces to TLM table)
(T2 WNMG)
VTOFX [2]=0.210
VTOFZ [2]=0.138
VDNRX [0202]=.047
VDNRZ [0202]=.047
VTLCN [2]=__________ (write max # of cylces to TLM table)
(T4 WNMG)
VTOFX [4]=0.323
VTOFZ [4]=0.065
VDNRX [0404]=.047
VDNRZ [0404]=.047
VTLCN [4]=__________ (write max # of cylces to TLM table)
(T5 DNMG)
VTOFX [5]=1.562
VTOFZ [5]=0.130
VDNRX [0505]=.047
VDNRZ [0505]=.047
VTLCN [5]=__________ (write max # of cylces to TLM table)
(T6 Boring Bar)
VTOFX [6]=-1.805
VTOFZ [6]=2.646
VDNRX [0606]=.0156
VDNRZ [0606]=.0156
VTLCN [6]=__________ (write max # of cylces to TLM table)
(T7 RH DNMG)
VTOFX [7]=.871
VTOFZ [7]=0.0
VDNRX [0707]=.047
VDNRZ [0707]=.047
VTLCN [7]=__________ (write max # of cylces to TLM table)
(T8 Boring Bar)
VTOFX [8]=-.838
VTOFZ [8]=2.052
VDNRX [0808]=.0156
VDNRZ [0808]=.0156
VTLCN [8]=__________ (write max # of cylces to TLM table)

TOOL=0
NLOOP TOOL=TOOL+1
IF [ABS[VDTWX[TOOL] GT .015]] NALM1
IF [ABS[VDTWZ[TOOL] GT .015]] NALM1
IF [TOOL LT 9] NLOOP

GOTO NEND

NALM1 VUACM [1]='BTOOL OFST >.015'

NEND RTS