Had a little think about how you may go about this
-> all programs must be able to run as a solo program
-> assign a # for each datum position for each vice ( use 1-10 for pallet#1 datums, 11-20 for pallet#2 )
-> a variable at the start of the program using the above # to define which pallet to be loaded, and done on which vice and also set the co-ordinate system
-> reset the variable to zero at the end of program
ie
Code:
N1 VC100=1 ( = 1st vice on pallet#1 )
or VC100=12 ( = 2nd vice on pallet#2 ) ( this line deleted if running schedule program )
()
N2 T1 ( pre-stage 1st tool )
N3 IF [ VC100 EQ 0 ] ERR "VARIABLE NOT SET' ( a check that it has been set )
N4 IF [ VC100 GE 1 AND LE 10 ] M201 ( load pal#1 )
N5 IF [ VC100 GE 11 ] M202 ( load pal#2 )
N6 T1 M6 ( load 1st tool )
()
N7 G15 H=VC100
..
VC[VC100]=VC[VC100]+1 ( "broby" will correct me )
VC100=0
M30
% schedule program ( it will need refining )
N1 PSELECT A.MIN, VC100=1
N2 PSELECT B.MIN, VC100=2
N3 PSELECT C.MIN, VC100=3
N4 PSELECT D.MIN, VC100=4
N5 PSELECT B.MIN, VC100=11
N6 PSELECT A.MIN, VC100=12
N7 PSELECT A.MIN, VC100=13
N8 PSELECT A.MIN, VC100=14
N9 GOTO N1
END
For the counting, I'm trying to get the # of the reference vice
so that counting is done by datum position
I'm also assuming you will get the custom macros going
this order save a lot of time at the start of the program
tool pre-select, then pallet change, then tool change ( in blue above)
while tool is pre-selecting, pallet change is also happening, and when complete, toolchange occurs
I hope you get the gist of where I'm heading
Steve