Communication Protocols and Standards [Questions]

I work as an electronics technician with a municipal wastewater plant. I would say I'm somewhat knowledgeable on Ethernet/IP as I tend to understand it more than any other protocol. I would still love to learn more about Ethernet/IP, but what I'm really wanting to learn are terms like Modbus RTU, Modbus TCP, RS-422,RS-232, RS-485. How to configure various converters (fiber to rs-232, serial gateways). I'm always looking to expand my working knowledge of my career and feel like I'm sometimes held back due to other issues that arise. Is there a one stop place I can go to learn about all of these standards, how they work, how to test these protocols? I have heard of software like ModScan, ModSim, etc. I do not know how to use that software and would love to learn how to. Are there diagnostic tools, software, testers that you all are using when helping you diagnose serial related issues ? For instance, when dealing with Ethernet/IP I use Navitek TrendNetworks tester along with Advanced IP Scanner.
 
First and foremost - you need to start making distinction between protocol and transport mediums. Modbus in any variant is a protocol, meaning it is a set of rules of what each bit in a message mean.
And those messages are transmitted over a medium - Ethernet, RS232, RS422, RS485 fiber, etc.
Simple gateways are just devices with configured Ethernet interface on one side (which You know) and configured serial interface on the other. And there are more "active" gateways that can map Modbus devices to memory and act as single device.
For starters, I would suggest to familiarize yourself with serial links RSxxx mentioned above. Those are not necessarily plug-and-play like Ethernet and there some quirks when building links, especially over longer distances.

The only one-stop place is Google, unfortunately. Compiled resourced would most likely be paid (at least I am not aware of freely available ones that cover this range comprehensively).
For RS Standards - look for specifications, for example
https://www.analog.com/en/resources...damentals-of-rs232-serial-communications.html
https://advantech-bb.com/wp-content/uploads/2014/12/RS-422-RS-485-eBook.pdf

For the protocol - there is The Modbus Organization, https://modbus.org/tech.php with many helpful resources.

For device configuration and capabilities - it is the best to look through resources of manufacturers', like Moxa, Advantech, Westermo, etc. Many different solutions are available.

For diagnostics - in my opinion the best is just a PC with USB adapter (lika Moxa UPort 1150), Realterm software (for Windows) and knowledge about what is expected to be happening happen on the link. Oscilloscope comes handy sometimes when looking for inteference or reflections in transmission lines.
 
>Is there a one stop place I can go to learn about all of these standards, how they work, how to test these protocols?

Not that I know of

> RS-422,RS-232, RS-485

These are serial hardware busses. Busses are electrical in nature and just carry bits. Big item is RS-232 is point-to-point, only, whereas RS-485 is multidrop that can have multiple devices, albeit usually multiple slaves and one master.

Some RS-485 references:

RS-485 Basics Series, a Technical White Paper, Texas Instruments
https://www.ti.com/lit/wp/slla545/slla545.pdf?ts=1723012808044

AN-1057 Ten Ways to Bulletproof RS-485 Interfaces,Texas Instruments
https://www.ti.com/lit/an/snla049b/snla049b.pdf

Troubleshoot RS-485 networks, Control Engineering
https://www.controleng.com/articles/troubleshoot-rs-485-networks/

A troubleshooting guide for RS-485, EE Times
https://www.eetimes.com/a-troubleshooting-guide-for-rs-485/

A google search will turn up lots on RS-232.

>Modbus RTU, Modbus TCP,

These are protocols - rules for transferring data. The Modbus protocol uses RS-232 and RS-485 as serial busses, and Ethernet for Modbus/TCP. The rules define who can talk and when, timing, message format, error checks, error messages, An important concept is that Modbus does not define the format of the data in the registers that get transferred in a message. It's up to the application layer (firmware/software) to interpret the data and do something with it. Modbus's role is to transfer bits from one end to the other. Modbus has no clue whether the data is ASCII characters, integer numbers, floating point numbers, date formats or serial numbers, the information Modbus carries is just bits to Modbus.

Modbus is a truly open protocol: the entire Modbus protocol standards are published as part of this web site from the technical resources page at Modbus.org: https://modbus.org/tech.php

The Modbus standards are critically necessary if you're coding for Modbus, but for implementation, here's some Modbus resources:

Chipkin's Modbus for Field Technicians
http://www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf

Introduction to Modbus and Modbus Function Codes, article
https://control.com/technical-articles/introduction-to-modbus-and-modbus-function-codes/

Simply Modbus 'About' Files
http://www.simplymodbus.ca/

Modbus Troubleshooting guide
https://www.integraxor.com/modbus-troubleshooting-guide/

overview of the Modbus Protocol
https://www.fernhillsoftware.com/help/drivers/modbus/modbus-protocol.html

Introduction to Modbus using (National Instruments) Labview
http://www.ni.com/white-paper/7675/en/

Peter Humaj's Modbus client 'spec' overview
https://doc.ipesoft.com/display/D2DOCV22EN/MODBUS+Client#MODBUSClient-drm
 
First and foremost - you need to start making distinction between protocol and transport mediums. Modbus in any variant is a protocol, meaning it is a set of rules of what each bit in a message mean.
And those messages are transmitted over a medium - Ethernet, RS232, RS422, RS485 fiber, etc.
Simple gateways are just devices with configured Ethernet interface on one side (which You know) and configured serial interface on the other. And there are more "active" gateways that can map Modbus devices to memory and act as single device.
For starters, I would suggest to familiarize yourself with serial links RSxxx mentioned above. Those are not necessarily plug-and-play like Ethernet and there some quirks when building links, especially over longer distances.

The only one-stop place is Google, unfortunately. Compiled resourced would most likely be paid (at least I am not aware of freely available ones that cover this range comprehensively).
For RS Standards - look for specifications, for example
https://www.analog.com/en/resources...damentals-of-rs232-serial-communications.html
https://advantech-bb.com/wp-content/uploads/2014/12/RS-422-RS-485-eBook.pdf

For the protocol - there is The Modbus Organization, https://modbus.org/tech.php with many helpful resources.

For device configuration and capabilities - it is the best to look through resources of manufacturers', like Moxa, Advantech, Westermo, etc. Many different solutions are available.

For diagnostics - in my opinion the best is just a PC with USB adapter (lika Moxa UPort 1150), Realterm software (for Windows) and knowledge about what is expected to be happening happen on the link. Oscilloscope comes handy sometimes when looking for inteference or reflections in transmission lines.
Very detailed and thank you for clarifying
 
>Is there a one stop place I can go to learn about all of these standards, how they work, how to test these protocols?

Not that I know of

> RS-422,RS-232, RS-485

These are serial hardware busses. Busses are electrical in nature and just carry bits. Big item is RS-232 is point-to-point, only, whereas RS-485 is multidrop that can have multiple devices, albeit usually multiple slaves and one master.

Some RS-485 references:

RS-485 Basics Series, a Technical White Paper, Texas Instruments
https://www.ti.com/lit/wp/slla545/slla545.pdf?ts=1723012808044

AN-1057 Ten Ways to Bulletproof RS-485 Interfaces,Texas Instruments
https://www.ti.com/lit/an/snla049b/snla049b.pdf

Troubleshoot RS-485 networks, Control Engineering
https://www.controleng.com/articles/troubleshoot-rs-485-networks/

A troubleshooting guide for RS-485, EE Times
https://www.eetimes.com/a-troubleshooting-guide-for-rs-485/

A google search will turn up lots on RS-232.

>Modbus RTU, Modbus TCP,

These are protocols - rules for transferring data. The Modbus protocol uses RS-232 and RS-485 as serial busses, and Ethernet for Modbus/TCP. The rules define who can talk and when, timing, message format, error checks, error messages, An important concept is that Modbus does not define the format of the data in the registers that get transferred in a message. It's up to the application layer (firmware/software) to interpret the data and do something with it. Modbus's role is to transfer bits from one end to the other. Modbus has no clue whether the data is ASCII characters, integer numbers, floating point numbers, date formats or serial numbers, the information Modbus carries is just bits to Modbus.

Modbus is a truly open protocol: the entire Modbus protocol standards are published as part of this web site from the technical resources page at Modbus.org: https://modbus.org/tech.php

The Modbus standards are critically necessary if you're coding for Modbus, but for implementation, here's some Modbus resources:

Chipkin's Modbus for Field Technicians
http://www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf

Introduction to Modbus and Modbus Function Codes, article
https://control.com/technical-articles/introduction-to-modbus-and-modbus-function-codes/

Simply Modbus 'About' Files
http://www.simplymodbus.ca/

Modbus Troubleshooting guide
https://www.integraxor.com/modbus-troubleshooting-guide/

overview of the Modbus Protocol
https://www.fernhillsoftware.com/help/drivers/modbus/modbus-protocol.html

Introduction to Modbus using (National Instruments) Labview
http://www.ni.com/white-paper/7675/en/

Peter Humaj's Modbus client 'spec' overview
https://doc.ipesoft.com/display/D2DOCV22EN/MODBUS+Client#MODBUSClient-drm

Thank you,
That really helps alot
 
First and foremost - you need to start making distinction between protocol and transport mediums. Modbus in any variant is a protocol, meaning it is a set of rules of what each bit in a message mean.
And those messages are transmitted over a medium - Ethernet, RS232, RS422, RS485 fiber, etc.
Simple gateways are just devices with configured Ethernet interface on one side (which You know) and configured serial interface on the other. And there are more "active" gateways that can map Modbus devices to memory and act as single device.
For starters, I would suggest to familiarize yourself with serial links RSxxx mentioned above. Those are not necessarily plug-and-play like Ethernet and there some quirks when building links, especially over longer distances.

The only one-stop place is Google, unfortunately. Compiled resourced would most likely be paid (at least I am not aware of freely available ones that cover this range comprehensively).
For RS Standards - look for specifications, for example
https://www.analog.com/en/resources...damentals-of-rs232-serial-communications.html
https://advantech-bb.com/wp-content/uploads/2014/12/RS-422-RS-485-eBook.pdf

For the protocol - there is The Modbus Organization, https://modbus.org/tech.php with many helpful resources.

For device configuration and capabilities - it is the best to look through resources of manufacturers', like Moxa, Advantech, Westermo, etc. Many different solutions are available.

For diagnostics - in my opinion the best is just a PC with USB adapter (lika Moxa UPort 1150), Realterm software (for Windows) and knowledge about what is expected to be happening happen on the link. Oscilloscope comes handy sometimes when looking for inteference or reflections in transmission lines.
I have a few different options, in my office, very similar to the Moxa UPort 1150 that both you and David have mentioned. Is there something special about that Moxa one that other USB serial adapters don't offer ?
 
> that other USB serial adapters don't offer ?

Generic USB/serial adapters that are not specifically designed with firmware to handle Modbus will have problems with Modbus RTU because of timing delay issues after the packet is finished
. Gateways and adapters should be chosen for stated Modbus functionality. If the specs do not state "Modbus RTU" it's generic and is likely to have problems.

I would expect most, if not all, Moxa products would be Modbus compatible.
 
I would expect most, if not all, Moxa products would be Modbus compatible.
It is irrelevant to talk about compatibility between Modbus (DNP3, CompoNet, PLCLink or any other protocol) and Moxa (or any other interface). Moxa and others are electrical interfaces and completely don't care what data they are transmitting/receiving.
The only differences between devices wiil be: what electrical interfaces it supports (what RS...), quality and terminals. Many cheap Chinese interfaces are difficult to work with - starting with driver installation. Down the road it goes worse.
Piece of advice based on days wasted - If You want to diagnose or play with RS networks, You need to be sure that your interface and cabling works properly. I strongly recommend using some devices of some respectable manufacturer.

Gateways and adapters should be chosen for stated Modbus functionality. If the specs do not state "Modbus RTU" it's generic and is likely to have problems.
OP asked about converters, not gateways. Those are completely different devices. Gateways are useful mostly when adapting serial Modbus RTU (beware of Modbus ASCII lurking in the dark sometimes) to Modbus/TCP. It is out of the box solution, but not the only one available.
There are also devices helping extend links over long distances - for example serial to fiber and back (regular media-converters), serial port servers that have functinality of wrapping serial frames in TCP packets and back to access serial devices over Ethernet by Modbus capable software, and more.

Don't assume that if something has "Modbus RTU" on its label, it will work out of the box. Specification is one thing, but real life is another — and they often don't align. There is a lot of trial and error when trying to commision Modbus and other buses. For example devices loosely adhering to the requirement of 3.5 char of silence between Modbus RTU frames, slow slaves needeing 50ms (or more) for a response, poor quality of transmission medium, reflections or long distances. All things matter and there is no silver bullet that will make Your life easy.
 
Top