Safety of machinery — Emergency stop function — Principles for design