Logix 5000 Message Config. Question

jkerekes

Member
Join Date
Aug 2007
Location
NJ
Posts
2,362
Just for a verification, since I can.t currently check. I have a Message instruction in a 81E ControlLogix processor. I need to read one element in a UDT tag array, i.e., TagName[1]. In the MSG instruction, the number of elements would be 1, regardless of the number of tags in the UDT, correct? Thanks.
 
No, you cannot read a single array element into your controller.

You will get Error 16#104, with an Error Text of "IOI Syntax Error", a generic error that basically says the data-types structure and/or size are inconsistent.

But there's no reason you can't MOV that array element to another planar tag, and MSG Read that new tag instead.


EDIT : I'll correct that, you CAN read a single element of an array tag, I had tried it with the source array in a Program Scoped tag database. Changing that to a Controller-Scoped tag allowed it to work without errors.

I can't quite remember the syntax for reading Program-Scoped data, get that right and it ought to work.

And yes, the number of elements to read would be 1
 
Last edited:
OK. Maybe I didn't describe it well enough. I need to read one UDT array element from one controller to my controller:

such as Tag1[1] --> Tag2[1]. Those two tags are in different controllers. Both tags are created from the identical UDT.

Are you saying this wont work?
 
I can't quite remember the syntax for reading Program-Scoped data, get that right and it ought to work...

Typically, the syntax to access program scoped tags is Program:programName.TagName, however, I don't think you can access program scoped tags via MSG.
 
OK. Maybe I didn't describe it well enough. I need to read one UDT array element from one controller to my controller:

such as Tag1[1] --> Tag2[1]. Those two tags are in different controllers. Both tags are created from the identical UDT.

Are you saying this wont work?


Are your tags UDTs or just Arrays ?

If plain arrays tags - yes it will work...

I will create a UDT with an array in it to see if that works also....

2020-09-02_151745.jpg
 
I have just tried this with an embedded array within a UDT structure, and it works ok ....

But from your description of the tags, and the way you have written them (e.g. Tag1[1]) I don't think they are UDTs, just Array tags ....

2020-09-02_153512.jpg
 
I just used Tag1 and Tag2 as examples. The actual tags will be array tags defined by a UDT. Its been a while since I've needed to do MSGs. And I just needed a confirmation. Thanks again.
 
I just used Tag1 and Tag2 as examples. The actual tags will be array tags defined by a UDT. Its been a while since I've needed to do MSGs. And I just needed a confirmation. Thanks again.

My tests have disclosed that so long as the data-type of the destination tag or sub-element matches the data-type of the source tag or sub-element, you should be good to go.

But don't get too anal about reading just the one piece of data you need. There would be minimal hit by reading the whole tag, and just using the data you need from it. And if the tag is less than 500 bytes, have you considered using Produced/Consumed data transfer.
 
It's that each element in the array is data from a different controller. The array is a way to organize it. Love to use Produce/Consumed. But messaging was specified.
 
Mention to your customer that produce/consumer would be an easier solution? They may accept your request and make your life easy, unless they need messaging for some other reason.
 
Producer/Consumer isn't necessarily always the answer. There are instances where MSG is the better choice. If you don't need the data constantly updating, then why use up an additional connection, simply read the data when you need it. Plus, you can request more data than the Producer/Consumer model allows.

For an example, if we are handshaking an interface between machines, we'll use producer/consumer. If we have to periodically transfer a recipe between machines, we'll use MSG.
 
Mention to your customer that produce/consumer would be an easier solution? They may accept your request and make your life easy, unless they need messaging for some other reason.

Also mention that Produce/Consumed data can include the specific "Connection Status" element that verifies that the data consumed comes from a connected and running producer, thus guaranteeing its validity. You can MSG Read from another controller in Program Mode, and, without additional safeguards, have no idea whether the data is "iive".
 
Producer/Consumer isn't necessarily always the answer. There are instances where MSG is the better choice. If you don't need the data constantly updating, then why use up an additional connection, simply read the data when you need it. Plus, you can request more data than the Producer/Consumer model allows.

For an example, if we are handshaking an interface between machines, we'll use producer/consumer. If we have to periodically transfer a recipe between machines, we'll use MSG.


Point noted, and a Produced/Consumed "connection" will be a permanent outlay, whereas a MSG connection can be volatile.

There are merits in both methods, and you have to weigh them up. There is no point in using a MSG connection over and above any other method of determining a valid data transfer when it can all be done in one connection "hit".

The data size limit for Produced/Consumed tags is 500 bytes, so some thought into the structure of the data UDT could reap rewards.
 

Similar Topics

I'm trying get information from another same PLC PLC1: CompactLogix 1769-L16ER-BB1B (192.168.0.133) PLC1: CompactLogix 1769-L16ER-BB1B...
Replies
17
Views
1,488
Hey everyone, I think I'm running into a bit of a bottleneck on the amount of messages executing on an L62 ControlLogix (V15.4), and I was hoping...
Replies
9
Views
2,326
AB Logix 5000 Controllers Compact Logix L24ER PLCs Can not use Produced / Consumed (due to network / bandwidth limitations) so this is not an...
Replies
2
Views
3,302
Hey guys, Ok i have a few stud welders at work. I just added the logic to count the cycles on the weld head and after x ammount of cycles the...
Replies
4
Views
4,157
I searched for this problem on some threads , but they were dated in 2013 . When opening a program , and not all my programs , I get the following...
Replies
12
Views
21,780
Back
Top Bottom