External Read/Write Tag Access w/ ControlLogix

Tim James

Member
Join Date
Mar 2012
Location
Texas
Posts
92
When using multiple controller systems I used to using either produced/consumed tags or messaging functions to transfer data between controllers. However, in the later revisions of RSLogix5000 it seems that all controller tags can now be specified as having external 'Read/Write' access.

So as an experiment for a ControlLogix project I am working on with two controllers I was hoping to be able to setup one big user defined data type that I can set up with external 'Read/Write' access so that it can be 'shared' between the two controllers. It will only exist in one controller, but either can read/write to it. The setup between the two controllers is not a simple master/slave style where one controller is always producing data and the other is always consuming (it goes both ways which is why using produce/consumed tags and messaging is tedious).

The problem is that I cannot figure out how to get the user defined data type tag from one controller into the other controller's scope so I can read/write to it. Let's just say controller A has the large user defined data type (REALs, DINTs, BOOLs, other User Defined Types, etc) and controller B is trying to read/write to that data file. The project is setup with the two controllers communicating over ethernet/IP. So within controller B's project, I can see controller A's ethernet communication module and controller A's CPU, but only the ethernet module's automatically generated tags have been pulled into controller B's scope (2 arrays of 17 DINTs, one for input and one for output). There is nothing from the actual CPU of controller A in controller B's tag scope. It seems like there would need to be some sort of import I would need to perform so controller B can generate a tag list for the CPU of controller A (since I defined all these tags and data types manually as I designed the project, they would not be generic to every CPU like the automatically generated module tags).

The project is offline at this point and it is not practical to get both ControlLogix setups side by side. They will not be side by side until the equipment is commissioned months from now. I am wondering if I were able to work with the project while both controllers were networked I may be able to pull controller A's tag list into controller B quite easily. But since that is not an option, I am hoping there is some way to work with the two projects offline so I can import controller A's tag configuration into controller B and then use controller A's internal tags within controller's B scope. Any advice would be appreciated, most of the literature I have found does not refer to the external read/write property that is now assignable to all tags as I think this is relatively recent (rev 20 or maybe 19).
 
Last edited:
I'm not sure i understand your question. The read/write access is just to allow the PLCs tags to be ether visible or invisible to outside devices such as HMIs. This way unnecessary tags aren't polled by he HMI. Comms between CLXs is done with either MSGs or Producer/Consumer.
 
You actually inadvertently mentioned what was in the back of my mind. If the HMI, also communicating over ethernet/IP, can read/write to the controller's tag, why can't another controller? Within RS Factory Talk View, I can pull in the project's offline tag list so I can setup these read/writes. What I am looking for is a way to do the same thing but between two controllers rather than between an HMI and a controller.

Basically, if I go the produce/consumer route, I end up having to do a lot of data file copying, producing, consuming, comparing, overwriting changes, and then re-producing and re-consuming. Either controller can change the data file and both must reflect the changes. And since messaging can't handle user defined data types it is not a very convenient solution either.
 
Of course you can message UDTs. Produce/Consumer is unidirectional. But I don't know what the issue is for you to set up a Produce/Consumer in each direction.
 
I have always been under the impression you could not use the MSG instruction with UDTs, only blocks of standard data types. I'm going to feel pretty dumb if I had that wrong.

Regarding setting up a producer/consumer in each direction, this UDT has operation 'setpoints' that must be adjustable from either HMI. So if A has a produced and consumed tag and B has a produced and consumed tag, I certainly get all the data I need transferred, but I have no idea which data is valid and which isn't (I'm transmitting the old value as well as the new). I have to build in the comparison logic to determine the updated value and to move it into the operational logic. If I only had one UDT that was being shared by both controllers and both HMIs there would be no need to overwrite anything or compare anything. Only one value would ever be written.

The same goes for the MSG instruction, the pain is in detecting the change and then sending the changed UDT to the other controller. Both A and B have a stored values so I have to build in dummy tag duplicates, use them to detect changes, and when changes are detected, transfer the data to the other controller and overwrite all the tags with the new data.

Unless I am missing something painfully obvious, and it wouldn't be the first time, there is no simple way to just have a tag or UDT in controller A alias a tag or UDT in controller B (that would effectively solve my problem, but only if the alias was not biased in a particular direction). I build a user defined function for this purpose that I call 'SYNC'. It basically compares one tag with another, if they don't match it moves the tag with precedent into the other. IF THERE IS NO PRECEDENT (AS IS THE CASE HERE), i.e. any change should be reflected in both locations, it compares each to a dummy tag, and whichever is not equal becomes the tag with precedent. Its value is moved into the other tag and into the dummy tag and it's ready for another comparison.

If controller A's tag changes I want it to overwrite controller B's tag, if B's changes I want it to overwrite A's. Unfortunately, I want to do this with a lot of BOOLs, INTs and REALS.
 
Last edited:

Similar Topics

I am converting our Boiler project to a RX3i. Looking at some of the registers for the HMI I see 100r. It is labeled B_1_GPM (Boiler 1 Gallons Per...
Replies
6
Views
2,621
I am trying to enable an external alarm via computer speakers for Factory Talk Network Distributed Edition. I am using Alarm and Events setup. I...
Replies
7
Views
126
Good evening all! I hope you folks are doing alright today, as I've got a situation that I believe I've come up with a solution to but I wanted to...
Replies
1
Views
391
As the title says, I'm trying to figure out a way to import and export recipe files from an external CF card to a USB drive and vice versa. I've...
Replies
1
Views
435
Hi All, I'm using Studio 5000 ver 30 to modify existing logic that has PID, and I want to be able to use an external/remote source as a setpoint...
Replies
3
Views
607
Back
Top Bottom