A simple library .NET Core 5.0 for read and write tags Rockwell Control/CompactLogix PLCs.
demo.mp4
PLCDevice plc = new PLCDevice(IPAddress.Parse("10.11.20.181"), 1);
NOTE: We give the IP plc and the CPU slot.
plc.Connect();
NOTE: Currently, we can read type tags BOOL SINT, INT and DINT.
int testBOOL = plc.ReadTag("TEST_BOOL", TAGType.BOOL);
int testSINT = plc.ReadTag("TEST_SINT", TAGType.SINT);
int testINT = plc.ReadTag("TEST_INT", TAGType.INT);
int testDINT = plc.ReadTag("TEST_DINT", TAGType.DINT);
NOTE: Currently, we can write type tags BOOL SINT, INT and DINT.
plc.WriteTag("TEST_BOOL", TAGType.BOOL, 1);
plc.WriteTag("TEST_SINT", TAGType.SINT, 23);
plc.WriteTag("TEST_INT", TAGType.INT, 110);
plc.WriteTag("TEST_DINT", TAGType.DINT, 10990);
plc.Disconect();