From b17fcfeff99cc3125aa343a78526ed369776a2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:38:36 +0200 Subject: [PATCH] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4da0aba..ea49c71 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,8 @@ To see a full list of examples [click here](/Examples). Connecting to a PLC is as simple as ```C# +using MewtocolNet; + using (var plc = Mewtocol.Ethernet("192.168.178.55").Build()) { await plc.ConnectAsync(); @@ -93,6 +95,9 @@ using (var plc = Mewtocol.Ethernet("192.168.178.55").Build()) { - Create a new class that inherits from `RegisterCollection` ```C# +using MewtocolNet; +using MewtocolNet.RegisterAttributes; + public class TestRegisters : RegisterCollection { //corresponds to a R100 boolean register in the PLC @@ -119,7 +124,6 @@ public class TestRegisters : RegisterCollection { - attach an automatic poller by chaining `.WithPoller()` after the register attachment ```C# - TestRegisters registers = null; //setting up a new PLC serial interface and tell it to use the register collection