scchart rail { input bool second; input bool contact0, contact1; output int track; initial state s1 "station controller" { region "go": initial state init --> running immediate with / track = 60; state running; region "platform": initial state waiting --> slowdown immediate with contact0 / track = 20; state slowdown --> stop immediate with contact1 / track = 0; state stop --> waiting with 5 second / track = 60; }; }