Here is another way to approach the problem.
Lets start the count as soon as the car enters the wash and makes the photoeye. The Car Length (CL) is the count when the photoeye breaks plus whatever offset you want to put in. The Leading Edge (LE) of the Car is the current count. The Trailing Edge (TE) of the car is the current count minus CL. You should know the position of each operation of the wash in counts. Like the foamer is 200 counts down the chain etc. Set up a limit test using the TE is the lower limit, the LE is the upper limit and the test is the position in counts of the operation you want to perform. When the limit test it true turn on your output. You could do some massaging of the LE and TE to offset when you turn things on and off.
Hope this helps, bit shifts make my head hurt.
Lets start the count as soon as the car enters the wash and makes the photoeye. The Car Length (CL) is the count when the photoeye breaks plus whatever offset you want to put in. The Leading Edge (LE) of the Car is the current count. The Trailing Edge (TE) of the car is the current count minus CL. You should know the position of each operation of the wash in counts. Like the foamer is 200 counts down the chain etc. Set up a limit test using the TE is the lower limit, the LE is the upper limit and the test is the position in counts of the operation you want to perform. When the limit test it true turn on your output. You could do some massaging of the LE and TE to offset when you turn things on and off.
Hope this helps, bit shifts make my head hurt.