- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-31 07:34 AM
Can I have my HMI read via Modbus without PLC connection?
Hi all,
I have a HMIGTO2310. Currently this is connected to a M251 PLC via Modbus TCP and there's an RTU device (it's a PCB board) connected to the HMI via Modbus RS485) to monitor and control our rig. Then, connected to the PLC is the Control Centre (CC) via Modbus TCP looking at all the data from all the systems.
I would therefore say the CC is the Master/Client, and the PLC+HMI+PCB are all Slaves/Servers.
We have another two rigs and have been asked if we can supply two variants of this:
- Remove the PLC and CC connection and just have the HMI talking to the PCB so all data will be manually read from the HMI.
- Remove the PLC but keep the Control Centre connection to the HMI so it can read data directly from the HMI and PCB.
A few questions:
- Are both these setups feasible?
- With the HMI and PCB only setup, how is the Master/Client device determined?
- For the setup with the CC connected to the HMI, can you pass the data from the PCB (which is sending data via the address holding registers) directly to the CC (which may have different addresses)? So can you map the data directly without having some sort of intermediate local variable?
- What if the original setup was kept but instead of the CC being connected to the PLC, it was connected to the HMI, so the HMI would have the CC, PLC, and PCB connections. How would this change things in terms of addressing as currently all the HMI and PCB data is sent via the GVL variables to the PLC which then get sent via the Modbus addresses to the CC.
Cheers in advance 👍🏻
- Labels:
-
Smart Design & Engineering
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-31 10:47 PM
@Yelper85 my initial answers to your questions:
- Probably.
- Presumably the HMI is the master/client since it doesn't have its own registers that the PCB could write too. HMIs are generally always the master/client in a modbus communication setup. You've already said that: "there's an RTU device (it's a PCB board) connected to the HMI via Modbus RS485) to monitor and control our rig" so it seems to be that without the PLC or CC, the relationship doesn't actually change between the HMI and PCB. Unless the HMI isn't directly connected to the PCB via RS485.
- I would think that the CC would have to communicate directly with the PCB in this scenario, but so would the HMI. Assuming that the PCB is the server/slave you would probably need a modbus gateway/device server to sit it front of the PCB to allow multiple clients/masters to connect to it.
- Same answer as 3, but I don't have any experience with global data. Having the CC directly connected to the PCB seems to make the most sense, or you would have to figure out which communication drive to use to read data directly from the HMI, which could be difficult as they generally aren't designed to be clients/slaves. Your experience may vary, but I've only ever programmed the GTO HMIs with video designer, if you're using something else there could be other possibilities (OTE or directly via machine expert).
Overall it seems that both setups should be feasible, but I think we need clarification about the communication paradigm in your existing setup. Or possibly an explanation of why you need alternative setups? This sounds like an xy problem in that you're really trying to solve something else, but asking about it in an indirect way.
You've stated that "I would therefore say the CC is the Master/Client, and the PLC+HMI+PCB are all
Slaves/Servers" but also that that the PLC is connected to the HMI and CC via modbus tcp, the HMI is connected to the PCB by (modbus rtu?) via serial. The master/slave (client/server) relationship really only matters for the the serial connection, and it seems to me that some part of your communication scheme is missing from this description.
I think you should reframe your system description in terms of reading and writing: i.e. the HMI reads holding registers in the RTU PCB and then writes them to the PLC. The HMI and CC both read and write other holding registers in the PLC. That example assumes all modbus communication, but maybe your PCB uses ASCII? And I'm not sure how global variables are shared between the HMI and PLC.
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-05 01:30 AM
Hi @Bosswaffle,
Many thanks for replying, much appreciated.
The alternative setups have been requested by the customer as the one of the rigs doesn't require remote monitoring, but the other does yet has no PLC connection, or at least this is how they want to run if possible, hence the questions. I can see how you may think I was asking an alternative question in an indirect way, but honestly I wasn't 🙂
I should point out that I'm by no means an expert on this, indeed I'm picking this project up from somebody else and learning on the fly at a rapid rate, so I'm happy to be corrected and taught any valuable lessons as that's the only way to improve, plus I don't want to be spouting incorrect information to the customer!
That's interesting about the HMIs as I didn't realise they lack any internal registers. Knowing that, if the CC wants to read data from the HMI, how can this be done without the PLC as an intermediate device if no holding registers exist?
Yes, in both setups the HMI connection to the PCB doesn't change, so as you say from the HMI perspective it's a Master/Client to the PCB which is a Slave/Server, it's that understanding of how the view changes when you add more devices like the PLC and CC, and if this perspective changes depending on where they are placed in the system. I was under the impression that with Modbus there's only ever one Master/Client, and the rest of the devices are Slaves/Servers and that's the only way it will work, but you've said that this really only applies to RTU connections and not TCP which is interesting.
As for connecting the CC to the PCB directly, there's only one port, and that's the RS485 to HMI connection (via RJ45 plug), so physically it can't be connected, but if I'm reading your description correctly this may be achievable if the PCB is connected to a gateway/server to allow multiple connections.
Like you, I've only used GTO HMIs with Vijeo Designer, so we should be able to agree on a viable solution hopefully.
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-06 10:59 AM
I sounds like you need to add the intermediate Modbus gateway so that your CC and HMI can both directly query the PCB for it's information. They would both likely be asking for the same registers or writing to the same registers.
A Modbus gateway with at least one ethernet port and serial ports would seem to be the best fit for you:
- The CC can query via the ethernet port, and the gateway will do the conversion of Modbus TCP to Modbus RTU
- The HMI can query one serial port and the gateway will forward it to the other serial port that the PCB is connected to.
I'm partial to Moxa's MGate line up for this purpose, but lots of other companies make an equivalent product: MGate MB3180/MB3280/MB3480 Series - Modbus TCP Gateways | MOXA
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-13 01:45 AM
So can two or more devices not read/write to the same registers, it's purely 1-2-1?
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-16 01:26 PM
It depends on the communication medium. In general, multiple devices can read/write to the same registers if they can connect to the PLC/PCB/Devie/Slave/Server.
Why 'if'?
- Let's consider Modbus RTU via RS485. In this case RS485 is the medium and Modbus RTU is the protocol. As a serial medium RS485 can only have one master device and ~248 slave devices, this is because the only one device can transmit at a time on a serial bus. So, the master device sends out a message to all slaves and then waits for the appropriate one to transmit back or time out. You can physically add a second master to the RS485 line, but now there will be collisions as they both transmit at the same (or close to) time. This is also why each salve device needs a unique address, so multiple devices don't try to respond at the same time.
- Now let's consider Modbus TCP which uses ethernet as it's medium to transmit the Modbus TCP packets. The "network stack" of any given device can support one or more sockets. each new connection from a different device takes up one of these sockets. Some devices, like your PLC, can probably handle ~4-16 connections (it should be in the documentation). Some devices can only support one TCP socket connection at a time, so they will only communicate with one device at a time, regardless of how many try (generally the first device to open a socket wins in this scenario and stays connected until it closes the connection).
- A modbus gateway simply sits "on top of" a device that needs served up in a different medium or with multiple connections.
- A gateway can change serial protocols (RS232-485)
- convert from TCP to RTU (and vice versa)
- Increase the number of serial connections or TCP sockets available
- i.e. you could have multiple RS485 masters each connected to a port on a gateway and the slave connect to another port, the gateway become the master that communicates with the slave device and then serves up a copy for each master that requested it.
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-21 12:42 AM
Hi @Bosswaffle,
Apologies for the late reply, I've been snowed under with work and this dropped off my radar.
Really appreciate that information, very helpful. I'm going to have a read up on the Moxa MGate you mentioned and draw out some solutions as a picture tells a thousand words 🙂
Link copied. Please paste this link to share this article on your social media post.

