Your valve takes 150s to fully open/close, in the example 1/10 of a second is used to measure valve position, so its position will be between 0 and 1500. In the PID loop 1500 will be max output (fully opened valve).
PID output is compared to register that contains virtual position. If PID output is higher than virtual position you open the valve to make this two values equal. While PLC output for opening the valve is active you increment virtual position register every 100ms, while PLC output for closing is active you decrement the same register every 100 ms (SB7). So virtual position changes every time you open/close the valve.
I don't know how better to explain this concept but the example is very good. It has solved problems for dead band (valve won't move for values less than 1 second) and end positions (in position 0 and 1500 PLC output for opening/clossing remains active for extra 2 minutes to be sure it's in the right position).
Before I started using this method I made some logic that opened and closed valve based on the error. It used pause and active time, if temperature is much lower than setpoint - open valve for, let's say, 3 seconds every 30 seconds, if it's few degrees under open for 1s every 45 seconds, +/-0.5 degrees around setpoint don't do anything. This could be made functional but it always oscillated.
Some PLC manufacturers have function block for three point valve control, maybe it could be implemented in VisiLogic in the future, just a sugestion . It makes life much simpler in these situations.