Share variables between two M340 PLC througt Schnider OFS

Join Date
Jun 2008
Location
Sweden
Posts
4
I have a project with 2 M340 PLC's, a OFS OPC server and Vijeo Citect SCADA software.
The SCADA system can read/write variables from each PLC with the variables tags like:
PLC1_Variable_1, PLC1_Variable_2
PLC2_Variable_X, PLC2_Variable_Y

But how do i read a variable from PLC 2 into PLC 1 via the OPC server?

Global data might be an option, but i want to avoid it since i have read that you need to use the same MW in both PLC's.
 
PLC 1 is connected to the OPC via the embedded ethernet port.
PLC 1 also has an NOE modul connected to a PRM master for profibus com with a third PLC

PLC 2 is connected to the OPC via the embedded ethernet port.
PLC 2 also has an NOE modul connected to switch and a bunch of inverters
 
Look if the 2 m340s are on the same network you can use read and write blocks to get specific words to and from each other. But for me the best way of doing it would be getting the noe module on the same network. Then you could do IO scanning
From the embedded ports you cannot do io scanning or global data. Only through the NOE modules you can. From the embedded ports you have to use the read_var write_var function blocks.
 
Any reason why you are using the OFS? Are you writing data to or reading from the plc's via a database of sorts?
 
I agree with Chud, best to use IOScanning or read_var and write_var. Can do read and write var from the embedded port, it's an ok option if you don't have much data to swap but it's more work to set up.

Using the OFS IOServer and Citect just adds several more potential points of failure. You will need to implement a method in the PLCs for detecting if the Citect PC has failed to write variables. With IOScanning, this work is done for you and you just need to monitor a status bit.
 
Using the OFS IOServer and Citect just adds several more potential points of failure..

Agree with that too, we just use Modnet Driver for talking to M340, far better control of what's going on, maybe not the integration you have with OFS, but far less to go wrong.....
 
Don't get me wrong, OFS is a great IOServer. But it's running on a PC, which has some version of Windows installed. Those two items are the most likely points of failure!

If the two PLCs need to talk to each other then they should do so directly. I don't phone up my friend and then ask him to ring my Mother so I can speak to her through him (... although maybe this isn't such a bad idea. ..).

I have seen it done before though. It has caused hassles several times in my experience.
 
As with all the others, I agree the communications model is not optimal passing data through OFS. OFS has a lot of performance enhancements, but they are not needed here. Best to eliminate the middle man and use direct PLC to PLC communications.

Since you have NOEs, IOScanner or global data would both work for you. I am not aware of the limitation that you describe regarding %MW variables having to be the same for global data. Not sure it's worth dealing with multicast for two devices so would suggest IOScanner first.
 
Just a side note when using OFS make sure you enable the option to update the data dictionary in the plc configuration then if you make any online changes in the plc OFS will continue to work correctly
 

Similar Topics

Hi folks. I have a question when networking 2 or more PLCs on how to share variables. The PLCs are M241 or M251 and connected via ethernet with...
Replies
2
Views
3,158
Hi all, I have a problem/question concerning the SoMachine software. I have for the moment a M238 Schneider PLC (but the model is not relevant I...
Replies
3
Views
9,069
I'm using raspberry pi 4b to poll 3 different plcs with modbus tcp and then publish the tag data using mqtt sparkplug b back to my Ignition...
Replies
15
Views
3,447
Hi all, I've got a facility that has multiple VersaViews across the floor. Every time I change the HMI, I've got to load it on each of them. Does...
Replies
0
Views
693
Just wondering if i can make my code look a little nicer and sharing storage bits like below https://imgur.com/a/SMNxOPu does this work or does...
Replies
9
Views
1,578
Back
Top Bottom