j0h

blinkPLC_Remote

j0h
May 14th, 2026
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from time import sleep
  2. from fc6a import FC6AMaint
  3. # blink status lED remotely
  4. #https://github.com/Makerspace-Bangor/fc6a/blob/main/src/fc6a.py
  5. plc = FC6AMaint("192.168.1.50")
  6. m = 8010
  7. try:
  8. while True:
  9. plc.write_bit(m, True)
  10. sleep(1)
  11.  
  12. plc.write_bit(m, False)
  13. sleep(1)
  14.  
  15. finally:
  16. plc.write_bit("8010", False)
  17. plc.close()
  18.  
Advertisement
Add Comment
Please, Sign In to add comment