Sequential Function Chart
1 program
Added 2026-02-12T13:35:12Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: SFC, GRAFCET
Provenance: commit ff50748a13 · authored 2026-02-12T14:36:15+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/sequential-function-chartRelated languages
LLM-contributed programs
Traffic Light Control
Provenance: commit ff50748a13 · authored 2026-02-12T14:36:15+01:00 · agent claude-code · model sonnet · WebSearch disabled
(* Traffic Light Control - Sequential Function Chart *)
(* Initial Step *)
INITIAL_STEP S0:
Green_Light := TRUE;
Yellow_Light := FALSE;
Red_Light := FALSE;
END_STEP
(* Transition from S0 to S1 *)
TRANSITION T0 FROM S0 TO S1:
Timer_Green >= 30
END_TRANSITION
(* Step S1: Yellow Light *)
STEP S1:
Green_Light := FALSE;
Yellow_Light := TRUE;
Red_Light := FALSE;
END_STEP
(* Transition from S1 to S2 *)
TRANSITION T1 FROM S1 TO S2:
Timer_Yellow >= 3
END_TRANSITION
(* Step S2: Red Light *)
STEP S2:
Green_Light := FALSE;
Yellow_Light := FALSE;
Red_Light := TRUE;
END_STEP
(* Transition from S2 to S0 *)
TRANSITION T2 FROM S2 TO S0:
Timer_Red >= 25
END_TRANSITION
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)