Jan-Langevad

PLC-FORTH-IDEA-SKELETON-DRAFT

Dec 18th, 2025
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | Source Code | 0 0
  1. \ See for introduction:
  2. \ https://my.ece.utah.edu/~ece3510/Ladder%20Logic%20Fundamentals%20PLC%20tutorial.pdf
  3.  
  4. \ Draft Skeleton only!!!
  5. \ -------------------------
  6. \ PINs etc set up here .................
  7.  
  8. : Ladder_Handler \ A RUNG is just a step (program line) on the ladder
  9.  
  10. Input1? Input2 AND ( --------- comment xzxzxzxzx-----------) IF BuzzerON! THEN \ RUNG1
  11. InputX? InputY OR ( --------- comment lkjhlkhjlk ---------) IF AnyAction THEN \ RUNG2
  12. I1 I2 AND I3 OR I4 AND ( --------- comment lkjhlkhjlk ---------) IF ActionXYZ THEN \ RUNG3
  13. XYZtoHOT? ( --------- comment lkjhlkhjlk ---------) IF HotAlarm! THEN \ RUNG3
  14. \ ................etc....................
  15. \ .......................................
  16. \ .......................................
  17. \ .......................................
  18. \ .......................................
  19. ;
  20.  
  21. : My-PLC
  22. Repeat
  23. Scan_Input \ All REAL inputs are read, On/Off/Value, and mapped before any action!
  24. Ladder_handler \ Set outputs On/Off/Value in MAPPED output
  25. Activate_Output \ Apply output map to REAL outputs
  26. Key? RUN-SWITCH? 0= OR
  27. Until
  28. ;
Advertisement
Add Comment
Please, Sign In to add comment