Structuring Control Algorithms Using Grafcet