Advice on synchronizing local and remote settings

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
Hello, I am looking for your suggestions for methodologies to sync process setpoints across a local HMI and remote SCADA system.



Background:
There is a local site with a CompactLogix PLC containing process configuration setpoints (integers, bools, reals, etc).


There is a local HMI which allows changing the process setpoints locally.


There is a remote facility with SCADA (Wonderware) connected to a local SLC5/05 PLC, where multiple processes are monitored, including the process discussed above.


Both sites have hardwired internet and static IP addresses. I have already set up the SLC5/05 to read an array of integers from the CLX into a local file, and then write another file of integers back to the CLX into a separate array.
This is working fine - I can send and receive data at both sites.



However, I'm seeking a way to implement synchronization to ensure that if the remote user changes a process value, that change updates local HMI settings, or if a local HMI user changes a process value, it also updates the remote site's value: in other words, all setpoints are accurately displayed at all locations.


MQTT does this by default - the last device to make an update is the "winner" and all other devices receive notification that the change has been made.
Unfortunately we don't have access to MQTT in this instance.


In the past, I have created three copies of the process setpoints on the local process PLC: 1) Active values, 2) HMI values, and 3) Remote values. Then I compare HMI and Remote values to the Active values, to determine whether changes were made, and thus I would know where they came from. Then if changes were made remotely, I can update the Active and HMI copies, and if changes were made in the HMI copy, I can update the Active and Remote copies.


This has worked well in the past, but it is quite complex, requiring multiple subroutines, timestamps, and multiple copies of each process variable.


I am wondering if any of you have suggestions on how you would implement this type of local HMI vs Remote setpoint synchronization to ensure the changes are accurately implemented and displayed no matter whether they are made locally or remotely.


Thanks!
 
How do the devices communicate i.e. how does the HMI get values from the PLC (does the PLC push or does the HMI pull), how does the SCADA get values from the PLC (does it get them direct from the PLC, or from the HMI, and does the SCADA pull or are values pushed to it?

I see one way to do by having copies of the value on each system, and having only one-way "set-and-forget" flows of data.

So on the PLC, you would have the Active value, and a copy of it, Active_last. Information "flow" is toward the Active value, and flow is from the Active_last value. So the HMI or the SCADA write to the Active value, then when the PLC sees the Active and Active_last values are different, it assumes Active has been changed and copies Active_last to Active. Finally the HMI and SCADA read the Active_last value and update their displays of same. The point is that the externals write to Active, but read from Active_last. Is that possible?

The only problem I see is if there is a need to update the widget on the HMI or SCADA that is used to write to Active on the PLC.


Or are the copies even needed? How do the write/display interfaces on the HMI and SCADA work? Do they continuously update the displayed value from the PLC?
 
Is there a good reason the SCADA can't talk to the CLX as well? Rather than going through the 5/05 as an interface?

Then you could just have all the changes occur via the CLX, and just read those back into the 5/05 as confirmation.
 
To reply to your questions:


1. The local HMI directly reads and writes memory locations in the process PLC, and these reads and writes happen immediately upon making changes at the HMI.




2. The remote SCADA reads/writes its data from/to the remote PLC, which communicates every 10-20 seconds with the process PLC, downloading an array of values, then uploading another array of values.


So from your statement it seems like we will need a "compare" function like I mentioned earlier, then take specific actions based on whether the values changed.


Thanks
 
So from your statement it seems like we will need a "compare" function like I mentioned earlier, then take specific actions based on whether the values changed.


You only need one compare, or actually just a MOV, on the process PLC from Active to Active_last. And then everything would flow on the reverse path back to the HMI and the SCADA.

But then there is the SLC/Remote PLC. If that is sending setpoints every 10-20s, it could (i) unwittingly send an obsolete value after an HMI update, or (ii) not know a new value that is read from the PLC is what to use as a new setpoint.

Could the local HMI write to the remote SLC?
 
Yes, exactly. That's why I had two compares: local and remote, to the active values. No the HMI can't write to the remote PLC. The only communication between local and remote PLCs is initiated by the remote PLC. it first receives a block of data, then if successful, it sends another block of data back.
 
Does the current system do this: update setpoint from X.X to Y.Y from local HMI; within 10-20s the SLC updates that same setpoint back to X.X?
 
Also, doesn't the local HMI update its displayed value when the an update from the remote SLC changes it in the local PLC?
 
Not sure I understand your first question.
Second question: the local HMI updates based off any tags we set in the local PLC. So currently it is updating from the Active tags.
 
The only communication between local and remote PLCs is initiated by the remote PLC. it first receives a block of data, then if successful, it sends another block of data back.


Do the values in the received block in any way influence (change) the values in the sent block?
 
Not yet. I haven't got that far. I was trying to determine a better way to do it. But yes, in the end, the incoming data would influence the setpoints, and would also affect the outgoing data (i.e. to publish the setpoints back to the remote).
 
Not sure I understand your first question.
Second question: the local HMI updates based off any tags we set in the local PLC. So currently it is updating from the Active tags.

From the original post:

However, I'm seeking a way to implement synchronization to ensure that if the remote user changes a process value, that change updates local HMI settings, or if a local HMI user changes a process value, it also updates the remote site's value: in other words, all setpoints are accurately displayed at all locations.
So the BLUE is already working, and you want the RED to work as well.
 
Well, sort of. Yes, the local HMI can update instantly based on local PLC tags. But, if the remote site decides to change a value, I want the local HMI to update too, and vice versa: if the local HMI changes a value, I want the remote site to display this change. I also want to be able to change the values from either local HMI or remote and have that change propagate everywhere.
 
So the local PLC code is straightforward:

  • assume any change is a new setpoint
  • make local HMI changes override changes from remote SCADA/SLC.
  • HMI reads from/writes to tag from_HMI
  • SLC reads from/writes to tag from_SLC
  • Active setpoint is in tag activeSP

---[NEQ ]---[MOV ]---[MOV ]---
[SrcA from_HMI] [Src from_HMI] [Src from_HMI]
[SrcB activeSP] [Dst activeSP] [Dst from_SLC]

---[NEQ ]---[MOV ]---[MOV ]---
[SrcA from_SLC] [Src from_SLC] [Src from_SLC]
[SrcB activeSP] [Dst activeSP] [Dst from_HMI]


The key things there are that

  • a change in from_HMI propagates to from_SLC (and back to the remote SLC/SCADA),
  • but if from_HMI does not change, then a change in from_SLC propagates to from_HMI (and back to the local HMI)
I think something similar could be done in the SLC, that reads from_SLC, and also has a from_SCADA, and uses similar logic (changes in from_SLC dominant over change in from_SCADA) to determine the value, tag to_ACTIVE in the SLC, sent back to from_SLC.
 
Last edited:

Similar Topics

I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
7
Views
219
Hi , Where i can find Mitsubishi PLC Card end of line & replacement model details. i am looking for Q02CPU replacement model. Please advice. thanks
Replies
2
Views
131
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
300
Connected Components Help Hi there everyone, I’m recently new to the PLC world and was hoping somebody might steer me in the right...
Replies
3
Views
445
Hello, I'm struggling to learn something on Wonderware, and the distributors are taking days to get through the email chains. I was hoping for...
Replies
1
Views
381
Back
Top Bottom