Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using S7.Net;
  7.  
  8. namespace PLCComunication
  9. {
  10. public class PLCReader
  11. {
  12. Plc plc1 = new Plc(CpuType.S7400, "192.168.0.18", 0, 3);
  13.  
  14. public string GetNumber()
  15. {
  16. plc1.Open();
  17. return plc1.Read("DB302.DBW 140").ToString();
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement