That is where the Submit is used. The submit program runs independantly of a robot program. One could say parallel to the robot program. Also submit runs whenever it is started and even runs in the backropund if no robot program is executed.
Plenty examples and discussions on evaluation of $POS_ACT in Submit and its pitfalls can be found using the forum search function.
Fubini
Thank you Fubini! I was totally unaware of the submit program. Works great!