You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 17th, 2012, 09:42 PM   #1
Tim James
Member
United States

Tim James is offline
 
Join Date: Mar 2012
Location: Texas
Posts: 92
External Read/Write Tag Access w/ ControlLogix

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 by Tim James; December 17th, 2012 at 09:47 PM.
  Reply With Quote
Old December 17th, 2012, 10:08 PM   #2
jkerekes
Member
United States

jkerekes is offline
 
jkerekes's Avatar
 
Join Date: Aug 2007
Location: NJ
Posts: 2,179
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.
  Reply With Quote
Old December 17th, 2012, 10:20 PM   #3
Tim James
Member
United States

Tim James is offline
 
Join Date: Mar 2012
Location: Texas
Posts: 92
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.
  Reply With Quote
Old December 17th, 2012, 10:28 PM   #4
jkerekes
Member
United States

jkerekes is offline
 
jkerekes's Avatar
 
Join Date: Aug 2007
Location: NJ
Posts: 2,179
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.
  Reply With Quote
Old December 17th, 2012, 10:57 PM   #5
Tim James
Member
United States

Tim James is offline
 
Join Date: Mar 2012
Location: Texas
Posts: 92
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 by Tim James; December 17th, 2012 at 11:06 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
external tag in the Add ON instruction in Rslogix5000 md.abdullah LIVE PLC Questions And Answers 1 September 29th, 2011 09:32 AM
Saving Tag values in WinCC Flex 2005 markw LIVE PLC Questions And Answers 3 February 21st, 2010 02:05 PM
simodrive 611 Fault sammmy_s LIVE PLC Questions And Answers 7 November 4th, 2008 04:31 AM
fishenguy fishenguy LIVE PLC Questions And Answers 54 November 13th, 2007 09:33 PM
? - access RSView tag device address using VBA or external app? vjasko LIVE PLC Questions And Answers 11 October 23rd, 2007 05:51 PM


All times are GMT -5. The time now is 12:00 AM.


.