Distance sensors for automation processes