Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \ See for introduction:
- \ https://my.ece.utah.edu/~ece3510/Ladder%20Logic%20Fundamentals%20PLC%20tutorial.pdf
- \ Draft Skeleton only!!!
- \ -------------------------
- \ PINs etc set up here .................
- : Ladder_Handler \ A RUNG is just a step (program line) on the ladder
- Input1? Input2 AND ( --------- comment xzxzxzxzx-----------) IF BuzzerON! THEN \ RUNG1
- InputX? InputY OR ( --------- comment lkjhlkhjlk ---------) IF AnyAction THEN \ RUNG2
- I1 I2 AND I3 OR I4 AND ( --------- comment lkjhlkhjlk ---------) IF ActionXYZ THEN \ RUNG3
- XYZtoHOT? ( --------- comment lkjhlkhjlk ---------) IF HotAlarm! THEN \ RUNG3
- \ ................etc....................
- \ .......................................
- \ .......................................
- \ .......................................
- \ .......................................
- ;
- : My-PLC
- Repeat
- Scan_Input \ All REAL inputs are read, On/Off/Value, and mapped before any action!
- Ladder_handler \ Set outputs On/Off/Value in MAPPED output
- Activate_Output \ Apply output map to REAL outputs
- Key? RUN-SWITCH? 0= OR
- Until
- ;
Advertisement
Add Comment
Please, Sign In to add comment