I couldn't manage to get input2 active/inactive, so I used OEMLED822 (input2 led), then compare it with itself by AND lobe, and, as I told before, it is working now. Here is the brain attached. This brain has to serve zfeed, z down, current tool, and input2 (inductive sensor which tels that tool has reached proper position). This brain has to pause program somehow until toll gets its position, and then continue. this brain is not finished yet, I have problem, because when T>0 and Z<0 and Zfeed=0, if input2=0, then program feeds and wait for input2. It works, but before it stops and wait, z axis lifts up for about 1mm, but sometimes not. Thats the problem, and now i am trying to use dwell instead of feedhold....
Cheers