#15 = 12 ;assign test parameter the number of pockets in the carousel O100 do O110 if [#[5189+#15] EQ #100] ; checks all pockets to see if it contains tool number requested as the new tool # = #15 ; if tool is found in pocket, assigns the next pocket