EB Pro: Working with two HMI's

To be clear:

  • Buttons HMI1-S1 and HMI2-S1 will both
    • send a constant value of 2 to J2/XT1 when they are depressed, and
    • send a constant value of 0 to J2/XT1 when they are released,
    • And they do that regardless of the current state of the outputs i.e. each HMI does not need to be updated when the other HMI processes button depressed and button released events.
    • The other bits (4 for Q2, 8 for Q3, etc.) in the values sent by HMIx-S1 are always 0,
      • Because the Bistable (Impulse rely; a.k.a. Flip-Flop) ensures those zeros do not affect the outputs other than Q1
  • Likewise buttons HMI1-S2 and HMI2-S2 will both
    • send a constant value of 4 to J2/XT1 when they are depressed, and
    • send a constant value of 0 to J2/XT1 when they are released
  • Etc.
 
I thought that the requirement is for both HMIs to be able to show the same information with regards to the actual status of the Modbus TCP devices. Not sure if the above solution can achieve this. Need to take a closer look.
 
Interesting, but I'm a bit lost too, but have to go into the field and can't study it more right now. A couple points: A switch or button can only trigger one macro, not different ones on touch and release. Though there are two locations for operation, there is normally only one operator, and the probability of simultaneous operations is near nil. The hub should not allow simultaneous messages to the same destination. These circuits are all lighting, nothing critical. If things did get out of whack it should get restored on the next operation. And how will your setup indicate the current status of a circuit on both HMIs?
 
A switch or button can only trigger one macro, not different ones on touch and release.
Then I suggest you look for a different HMI, because responding to different events involving the button is not an unusual feature for HMIs.

Alternate solutions:

  • HMI
    • on button press sends the toggle value (integer with one bit set e.g. 2 for Q1, 8 for Q3, etc.) to J2/XT1,
    • then after short delay it sends a 0 to J2/XT1.
  • Have a separate process that continually sends a 0 to J2/ST1, say around once every second or so.

And how will your setup indicate the current status of a circuit on both HMIs?

It doesn't, because I read this:

We don't care if there's an indication of the actual output state,

But did not notice the followup statement:

we can go by the commanded state and assume the output is such.

That said, I find it hard to believe that an HMI cannot display the state of one or more outputs from the smart relay; if it cannot, then again I suggest trying a different HMI.
 
I am fairly certain it will work as I suggested, but see the Caveat below.

TL;DR

@EngNate (OP) should review and understand the code before using it to ensure it meets their needs, as I am even more certain that I do not fully understand the actual application.

In the end it's all just bookkeeping, as usual, and to be frank, anyone who has not understood what I have been doing up to here is going to have a rough time getting the macros to work. Bookkeeping for once-through logic is easy; automating data synchronization between separate independent devices is not.

That Weintek MT8051iE can execute multiple actions on a single press by using Combo Buttons, which have independent [Lamp] (display) and [Actions] (write via Modbus) functionality. The key takeaway here is that having the HMI continuously read data via Modbus from the Zelio to display the coils' states as "Lamps" is a separate function from writing to the Zelio J2/XT1 word via Modbus, as directed via (re-)Actions triggered by button events (presses).

I configured each Combo Button to execute three actions on each single button press:

  • first, write an integer value to Zelio Holding Register J2/XT1
    • with the one bit set that will toggle the coil corresponding the the HMI button pressed,
    • this is what will cause the Zelio FBD logic to turn the coil/light on or off;
      • Note that the HMI does not know, nor does it need to know, the current state of that coil, because the Zelio FBD logic, specifically the Bistable Impulse Relay FB, takes care of that.
  • second, wait half a second for the Zelio to respond;
  • third, write a integer value of zero to Zelio J2/XT1 (Holding Register 17),
    • this will ensure J2/XT1 will starts from all zeros, so one of the Bistable Impulse relays will trigger on the next button press.
See the image below for configuration details:

  • the 10 red Q1-QA buttons at center-left compose the HMI interface;
  • the two overlapping windows lower-left show the configuration for the Combo Button for Q1;
  • the two overlapping windows upper-right show the configuration for the Combo Button for QA.
I also wrote a quickie (less than fifty lines) Python script to model (emulate) several pieces of the Zelio behavior:

  • the Modbus TCP Slave (using the pyModbusTCP module);
  • the Q1-QA coils;
  • the J2/XT1 word;
  • the logic I attached in Post #30, i.e.
    • CAN (Word-to-bit conversion)
    • Bistable (Impulse relays)
    • this logic allows the HMI to send only the bit for the Zelio coil that is to be changed,
      • without being concerned whether that change is to turn a coil on or turn off.
A .ZIP archive with that script is attached.

There is a video here of the MT8051iE Online Simulation, configured as above and interacting with the Zelio model.

Caveat

One possible deal-breaker in this approach would be if the Zelio Modbus Server cannot handle multiple simultaneous Modbus Clients, which would be surprising but not outside the realm of possibility.
combo_button.png
 
Whoopsie, wait a minute: the Combo Button has a Toggle option for the Set Style of its Set Bit Action.

This means both HMIs, independently and in response to a button press, should be able

  • to read the current state of the Zelio coil via Modbus, and
  • to then toggle the value to On or Off appropriately
without any FBD or other logic in the Zelio whatsoever. I.e. the CAN Word-to-Bit Conversion and Bistable Impulse Relay logic FBs are unnecessary, because it is likely that both HMIs can each display and change the coils directly and independently using the Zelio Modbus Server.
Untitled.png
 
Last edited:
Hmm, well that will be a charm! Thanks for all that work Brian! I've got a few days occupied elsewhere now, so gonna be quiet for a bit, but I'll report back.
 
Whoopsie again.

I am looking at the Zelio help file, and I may have overstated the possibilities in my last post:
Data Exchanges with the Modbus client

The Ethernet extension can exchange eight data words, four clock words and one status word with the Modbus TCP/IP client.
Data
The data exchanged is as follows:

  • Four 16-bit input words, each accessible through the application via J1 to J4 contacts and open to client(s) in read and write modes. For more details, refer to Ethernet Inputs.
  • Four 16-bit output words, each accessible through the application via O1 to O4 contacts and open to client(s) in read mode only. For more details, refer to Ethernet Outputs.
From that it sounds like directly writing to the Q1-QA outputs is a non-stater, Modbus is limited to the J1-J4/XT1 16-bit input words, and then using the CAN FBD instruction to split out the bits from those words. That also means you cannot get the output stats without a CNA Bit-to-Word conversion FB (see below) and using Modbus to read one of the O1-O4/XT1 outputs.

So I guess you are back to either your FBD or mine.
Untitled.png
 
Here is how to configure a MT8051iE HMI button to set its display color by reading a bit from the holding register of a Modbus device, in this case from output word O2/XT1 from the Zelio:
Untitled.png
I also attached the updated Python model of the Zelio to generate that holding register/output word O2/XT1 from the Zelio Q1-Q9 Discrete Outputs.
 
Your FBD will do it, the straight-through CAN Word Bit Conversion; there is no need to use CNA Bit Word Conversion write the output states because they can be read from J2/S1 (%MW17).

Then a toggle switch is all that is needed in the HMIs, which can be configured identically except for their respective IP addresses. Also, I found a help page that claimed the Zelio Ethernet Expansion can handle up to four Modbus TCP Clients.
Untitled.png
 
How do I get two HMI's to mirror each other?

Outputs on a smart relay are controlled from two locations, two HMIs with the same toggle switches. When a switch state is changed on one station it must be reflected on the other. How is it done? I am stuck at: "macro command cannot control a remote HMI". (attempt to use SetData command)

It doesn't look like there can be more than one local HMI. How would you get one to write to another?

Ethernet, connected thru a switch, Easy Builder, Zelio smart relay

I'm muddling through this stuff for the first time. Any direction will be appreciated!

There are different approaches to achieve mirroring of two HMI's, one of which is to use a communication protocol that allows for sharing data between the two HMIs. One common protocol for this purpose is Modbus TCP, which enables data exchange between multiple devices over an Ethernet network.

Here is a high-level overview of the steps you can follow to achieve the desired behavior:

1) Create a register in the smart relay to store the state of each toggle switch.
2) Use the EasyBuilder software to program the smart relay to periodically update the register with the state of the toggle switches in one HMI.
3) Use the EasyBuilder software to program the second HMI to periodically read the register and update its toggle switches based on the state stored in the register.

You may need to experiment with different communication parameters and timing intervals to find the optimal settings that work best for your setup.

Note that the above steps assume that both HMIs are running EasyBuilder software and that the smart relay supports Modbus TCP communication. If your setup uses a different communication protocol or HMI software, the steps may vary.
 
Erik, thanks for your contribution, Alfred and Brian thanks some more. I've got to put some attention to a more time sensitive job, but will be digesting all this over the next few days.

Is it not possible to have the HMIs function either simultaneously or alternately as both client and server, thus emulate peer-to-peer communication with each other while working with the smart relays as client/server? I saw a discussion regarding an Arduino project where this was said to be possible just by using different ports. Idea: Both HMIs have a client and a server device and normally are servers. When a switch action occurs on one it changes to a client, executes the required actions on the other devices and then reverts back to server.

What I'm trying to do was already done and worked, and didn't use any COM out from the smart relays. But 1, those HMIs aren't available, and 2, there's no config backup or any other info about it, contact with whodunnit isn't available, so I don't have a clue how it was done. That program was in Schneider's EOTE.

TIA!
 
What I'm trying to do was already done and worked, and didn't use any COM out from the smart relays. But 1, those HMIs aren't available, and 2, there's no config backup or any other info about it, contact with whodunnit isn't available, so I don't have a clue how it was done. That program was in Schneider's EOTE.

If you have an existing program then I would start there and see if that could be ported to the Weinteks. Using the combo buttons to send an ON or OFF state to both the Zelio and the other HMI should not be too complex. The combo buttons and the ability to write a single bit in a word will certainly make it easier.


TL;DR

But what happens if communications are lost?

Say HMI-A updates the Zelio while the cable to HMI-B was disconnected, or the power to HMI-B (or both) was lost.

When HMI-B connects again, or both HMIs recover from a power failure, how will it/they know the correct states? And if someone presses a button on the just-restarted HMI-B before it gets synchronized from HMI-A, then HMI-B might send its incorrect state information to HMI-A, and now we are really off to the zoo.

I don't know a lot about Weintek, so I'm not saying it cannot be done i.e. have HMI-A and HMI-B maintain Zelio output states between themselves and external to the Zelio, but it is going to be far more complex, difficult and error-prone than getting the current state directly from the Zelio. The HMIs are already communicating with the Zelio to write bits in the J2/XT1 word; why not read those data as well?
 
How do I get two HMI's to mirror each other?

Outputs on a smart relay are controlled from two locations, two HMIs with the same toggle switches. When a switch state is changed on one station it must be reflected on the other. How is it done? I am stuck at: "macro command cannot control a remote HMI". (attempt to use SetData command)

It doesn't look like there can be more than one local HMI. How would you get one to write to another?

Ethernet, connected thru a switch, Easy Builder, Zelio smart relay

I'm muddling through this stuff for the first time. Any direction will be appreciated!

One approach to achieve mirroring of two HMIs in this scenario would be to use a centralized controller or a PLC (Programmable Logic Controller) to read the state of the toggle switches on both HMIs and update the outputs of the smart relay accordingly. The HMIs would communicate with the controller or PLC via Ethernet, and the controller or PLC would be responsible for maintaining the state of the system and updating the outputs based on the switch states received from both HMIs.

You can use a communication protocol such as Modbus TCP or Ethernet/IP to facilitate communication between the HMIs and the controller or PLC. The Easy Builder software should have support for these protocols, and the Zelio smart relay likely has built-in support for Modbus or other communication protocols.

Alternatively, if you want to avoid using a separate controller or PLC, you could investigate whether the Zelio smart relay supports a mirroring function, where the state of one output is automatically copied to another output. However, this would only work if the two outputs are physically connected to the same device or load
 
First attachment: HMI button configuration
Second attachment: Macro to update both Zelio and Other HMI
Third attahcment: HMI-local Modbus Server configuration

Untitled.png macro.png ThisHMI_Modbus_Server.png
 

Similar Topics

Hello, I am using Unity pro V15. I have Quantum CPU 671 and Ethernet NOE 77101 configured. I have configured IO scanning on NOE. I have attached...
Replies
5
Views
184
Hi All, I'm new to PLCs and the Industrial Systems field as a whole. Currently I'm working through the exercises for LogixPro and was hoping I...
Replies
2
Views
3,739
This isn't a question but more of a Answer for many people who I know have been thinking about this. We have a Surface Pro that I have got running...
Replies
0
Views
2,259
Hi, I'm new in PLC and I got logixpro 1.61 to learn on it but when I try to send output command it dosen't work with me. for example in I/O...
Replies
4
Views
2,356
Hello all, I am currently facing a problem with a Pro-Face HMI PS5000 project file download. I have tried using GP-ProEX SP1 (4.09.350) and...
Replies
0
Views
31
Back
Top Bottom