In real time loop do one of the control modules and a safety module program