Ok it makes sense now.
Nw1 : Takes the InputRef position, and adds the high level value, saves value in temp6.
Nw2 : Takes the InputRef position, and substract the low level, saves value in temp7.
Nw3 : If the InputAct is less than temp6, and InputAct is more than temp7, out5 will be high.
It looks like the delay is not being used IN4.
In plain english it looks like fc11 check for sync between reference position and actual position if it is within the limits (nw3) output will be high.
What is the inputAct field device? An encoder, linear transducer? It could be that your field device is messing up somehow, causing the actual position to be outside the limits of reference position. If you have access to a logging application definitely log the reference and position along with the output5 signals and check for any erratic signals in your input.