HI Tom,
Sorry Tom It's ok but now I have another problem. Please see image.
My function is working without VAR RETAIN but the result is not good.
As example When NbIncrement_Scan =1 the output is equal to input. It's Ok.
But when My NbIncrement_Scan est >1 then the output is equal to zero.
That's why I tried to use VAR RETAIN.
I hope you understand my problem.
Thanks in advance for your help
Best regards