hey bro. i concerned something. please explain me. -TCP/IP and modbus TCP/IP is the one, right? -what is the limitted distance when we transmit data by this protocol? -and i wanna know what is the framework in this protocol?
Hi Retiel! No, Modbus only supports devices on a same subnet. A router could change IP's but the Client could only be configured to talk with devices on a single subnet. Thanks for watching!
Something's wrong here, there are no trailers in IP or TCP. Can or does ModBus use UDP? Isn't the connection made with the Physical address and not the IP address? What ports does Modbus use?
Security isn't part of modbus - you would need IPSec or application layer security. Modbus is an old protocol (circa 1979) that was originally designed to work over serial cables. Modbus TCP is basically encapsulating the modbus info and sending it over TCP/IP (or UDP/IP). I don't think security was on their radar - when modbus was invented they probably weren't planning to connect to a corporate LAN. It would have just been a bunch of short, local RS-233 cables where security was enforced by restricting physical access (i.e. air-gapped). Depending on what you're trying to build, HTTPS and JSON or XML might be a better option. Modbus is a (still wisely used) legacy protocol, but it's not the only option.
Networking works in layers - do a search for "OSI network layers" for info. Each layer runs on top of lower layers, and oftentimes lower layers can be changed without affecting upper layers. For example, IP packets don't know or care if they're running on Ethernet or PPP or FDDI or whatever. Ethernet is set of layer 1 and 2 protocols. The layer 1 protocols can be anything from coaxial cable, copper twisted pair, cable, or wireless. The layer 2 protocol is mostly (exactly?) the same for each, and allows devices on a local network to identify and send messages to each other. IP is layer 3. It allows devices on different but connected networks to talk to each other. The internet is connected by IP. IP runs on top of Ethernet or one of many different other layer 2 protocols. TCP is layer 4. It runs on top of IP and is used for sending streams of data. A similar protocol - UDP - sends individual messages. Modbus is a higher layer (the OSI model isn't really strictly followed above layer 4). It runs on top of TCP or serial connections. When you create a Modbus TCP message, you create the Modbus packet and send it to your operating system which wraps it in a TCP packet, then an IP packet, then an Ethernet layer 2 packet, then sends it across the wire (or radio waves) in Ethernet layer 1 packets. The receiving end has to decode and unwrap each of these packets to get to the Modbus packet inside.
I wrote all that and then watched a different video and realized you were talking about something completely different, so ignore all I wrote above. Sorry about that.
Explains (all) gateways: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-yAxHDyQG8cU.html Everything you wanted to know about Modbus: www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf
You save my day! Thanks for the info. I'm dealing with holding registers over 40000 but python library doesn't recognize them,just addresses lower than 100. Any idea?
YunliuStorage Stormage IP headers and TCP headers do not have associated trailers. IP headers contain a length field specifying the length of the header and a length field specifying the length of the packet. If you capture IP traffic using Wireshark, you can clearly see that there are no IP or TCP trailers for IP packets. RFC 791 (IPv4 specification) and RFC 793 (TCP specification) do not mention trailers.
There is alot of information in IP and TCP headers, all of which has a role in the workings of the protocols. For example in IP, the destination address is the only piece of data necessary for routing. But the origin address is needed for error reporting (or by transport protocols to establish a connection) and the Time to Live field is used to avoid that a mis routed datagram roams forever in the net.