Main.st 729 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. PROGRAM _INIT
  2. Kurve_4 := 0;
  3. END_PROGRAM
  4. PROGRAM _CYCLIC
  5. CASE Kurve_4 OF
  6. 0:
  7. IF gKurve_4.Inputs.Vor_Stopper = TRUE AND gKurve_4.Inputs.Stausensor = FALSE THEN
  8. gKurve_4.Cmd.Stopper := KMD_EINFAHREN;
  9. Kurve_4 := 10;
  10. END_IF
  11. 10:
  12. IF gKurve_4.Status.Stopper = STATUS_EINGEFAHREN AND gKurve_4.Inputs.Nach_Stopper = TRUE THEN
  13. Kurve_4 := 20;
  14. END_IF
  15. 20:
  16. IF gKurve_4.Status.Stopper = STATUS_EINGEFAHREN AND gKurve_4.Inputs.Nach_Stopper = FALSE THEN
  17. gKurve_4.Cmd.Stopper := KMD_AUSFAHREN;
  18. Kurve_4 := 30;
  19. END_IF
  20. 30:
  21. IF gKurve_4.Status.Stopper = STATUS_AUSGEFAHREN AND gKurve_4.Inputs.Stausensor = TRUE THEN
  22. Kurve_4 := 0;
  23. END_IF
  24. END_CASE
  25. END_PROGRAM
  26. PROGRAM _EXIT
  27. (* Insert code here *)
  28. END_PROGRAM