PROGRAM _INIT Kurve_2 := 0; END_PROGRAM PROGRAM _CYCLIC CASE Kurve_2 OF 0: IF gKurve_2.Inputs.Vor_Stopper = TRUE AND gKurve_2.Inputs.Stausensor = FALSE AND gMerker_Stop_an_Kurve2 = FALSE THEN gKurve_2.Cmd.Stopper := KMD_EINFAHREN; Kurve_2 := 10; END_IF 10: IF gKurve_2.Status.Stopper = STATUS_EINGEFAHREN AND gKurve_2.Inputs.Nach_Stopper = TRUE THEN Kurve_2 := 20; END_IF 20: IF gKurve_2.Status.Stopper = STATUS_EINGEFAHREN AND gKurve_2.Inputs.Nach_Stopper = FALSE THEN gKurve_2.Cmd.Stopper := KMD_AUSFAHREN; Kurve_2 := 30; END_IF 30: IF gKurve_2.Status.Stopper = STATUS_AUSGEFAHREN AND gKurve_2.Inputs.Stausensor = TRUE THEN Kurve_2 := 0; END_IF END_CASE END_PROGRAM PROGRAM _EXIT (* Insert code here *) END_PROGRAM