MODBUS ASCII Protocol Standard / Definition or .NET library?

I have a requirement to connect a Windows PC .NET application with a set of PLC(s) to share event data. The PLC(s) ultimately do the motion control / robotics and the PC does high resolution data acquisition. I digress...

I need a well formed & supported library to establish Modbus data communications over TCP/IP medium. Preferably open source.

Otherwise, I need to find a link to the definition of the Modbus ASCII protocol so I can send the data via a TCP/IP Socket / Terminal. Or a Modbus slave emulator I could use that shows the ASCII Communication as data is sent.

Anybody able to point me in the right direction? I've been searching the forum and internet for a while now. Any suggestions would be greatly appreciated.

Thanks!
 
Take a look at the NModbus C# library here:
https://github.com/NModbus/NModbus

As a general note, though, you are mixing your Modbus terms. Modbus ASCII is a serial-only protocol defined in the Modbus specifications. The other defined serial protocol in the specifications is Modbus RTU, which uses binary encoding instead of ASCII, and is the more commonly used of the two. The Ethernet version of Modbus that is defined in the Modbus specifications is Modbus TCP.

The Modbus specifications can be found here:
https://modbus.org/specs.php

There are other, less commonly used Modbus-based protocols, such as Modbus UDP or Modbus Over TCP, where a standard Modbus RTU (or maybe Modbus ASCII) payload is encoded into a UDP or TCP frame and transmitted over Ethernet. These are not covered by the Modbus specifications, though.

Most likely, if you have an Ethernet device that supports Modbus, it's using the Modbus TCP protocol.

And when moving on to the testing stage, you can use one of these well established Modbus Slave simulators:
 
@jschulze Greatly appreciated! I am new to PLC work (my background is embedded systems / computer engineering). I thought Modbus was a standard with ASCII and RTU variants. Then TCP was describing physical layer (OSI Model). Really appreciate the clarity. My misunderstanding was confounding my research to say the least!

Also very much appreciate you pointing out the library. I think that'll probably do the trick for my project! Thanks!
 
Top