Normally open/closed limit switches in software