Produced And Consumed Tags

MarkNightingale

Lifetime Supporting Member + Moderator
Join Date
Sep 2010
Location
In The VAT Shed
Posts
732
Hi,

I have 2 PLC's, both Compactlogix L45's.

I have got an array of Produced Bools, an array of Produced Reals, and an array of Produced INTS.

From what I have read these tags are updated asynchronous to the scan.

What I need to know is how each array is 'sent' to the other PLC.

Are the Bools sent, and then the Reals and then the INTS, or are they all sent together.

I have some quite complex code with a few strange things happening and all I can put it down to is how the Produced/Consumed tags are being read by the other PLC, and where that PLC is in its scan.

Anybody that can shed some light on the subject it would be appreciated.

Cheers

Mark
 
I don't have a good answer to your question - I'm not sure how or in what order the produce/consume is operated. To avoid these kinds of questions I typically do not make use of the consumed or produced tags directly within my programs. I will have a rung that COP's the working tag to the produced tag on one end and a rung that COP's the consumed tag to a working tag on the other end. That way the data within the tags is only updated once per scan.

I realize that making this change at this point may be extremely difficult depending on how often you reference those tags throughout the program, but it's one possible way to eliminate any issues with timing on the communications.
 
I will have a rung that COP's the working tag to the produced tag on one end and a rung that COP's the consumed tag to a working tag on the other end. That way the data within the tags is only updated once per scan.

MarkNightingale, you should use this process.
It will be a lot of "Find & Replace" but it will guarantee that your data remains constant during your scan.
 
As chavak says, no go with producing a bool array. But you can certainly produce a UDT that has a bool array.

All of the tags are being produced separately based on their own independent RPI as configured at the consume tags. This is configurable down to 1ms intervals. Since the timing is determined by the consumer, any coordination needs to happen at the consumer.

Ideally I would have created a UDT and put all of the tags I needed into the UDT since one produce tag can store up to 500bytes. it is probably too late by now to do this without rewriting the code. At this point using the COP (or better still the CPS) as described above probably makes the most sense, but it will still probably require some reprogramming.

OG
 
Thanks for all the replies.

I'm looking at the PLC code now, and whichever way I decide to go, it's going to mean a big re-write of the code, there are a lot of Produced/Consumed tags.

I think the COP way is the way to go. However I will need to copy these tags before each process is called, so that I know that the DATA being sent to the other PLC is up to date.

The process is quite a complex one and at the moment I think that between each PLC scan, and the timing of the Produced/Consumed tags being sent, I am getting some timing errors.

If anyone else has any ideas it would be appreciated.

Cheers

Mark
 
There are no guarantees that your consumed tags will arrive in the consumer tag database in any pre-described order using Ethernet/IP.

It would be much better to pack the data into a UDT tag, and Produce/Consume that as a single entity, plus it will reduce the number of "connections" you use, and alleviate network bandwidth usage.
 
Just Curious

Wouldn't a Message Allow more control of timing with the process requirement and use the message done bit to acknowledge complete transfer of information?
 
I would create a NEW tag using a UDT that is produced /consumed from the PLC
I would then CPS data from that NEW tag into your existing tags once per scan

This gets you single update per scan for your program. It (depending on UDT size) may also all be refreshed in one update. It will also reduce your produced / consumed connection count from 3 to 1.


Now for your existing sending: Yes it is asynchronous. You have no control over the timing of when the 3 produced tags are being updated - If it was on controlnet then they would be spread apart to even up the communication load. I believe that something similar occurs for ethernet. I would also assume that over ethernet that the order in which the tags are sent could change per power cycle, per network reconnection and due to the scan time ( eg PLC scan of 6 ms, consumed tag has a RPI of 5 ms means that every scan of the PLC the data arrives 1 ms earlier in the scan)
 
( eg PLC scan of 6 ms, consumed tag has a RPI of 5 ms means that every scan of the PLC the data arrives 1 ms earlier in the scan)

Cascade error exists when you don't control how the data enters your system.
1st scan - 1ms early
2nd scan - 2ms early
3rd scan - 3ms early
etc.

But if the data arrives "whenever", and you create a program that will interpret the data when it has a chance to properly read all the data, you will have control over it.

I even go further and create and Input Program (executed before any others) then an Output Program (executed at the very end) for all my onboard IO.
This alleviates issues with Analog outputs jittering too. Because you only write to the Output once, at the very end.
 
Again,

Thanks for all the replies.

It looks like I am going to be forced to go down the CPS instruction route.

I have created the UDT with everything in it I need, and it exceeds the 500 byte limit of the produced tag size limit.

Again thanks for your recommendations.

Cheers

Mark
 
A MSG will handle data-sets larger than 500 bytes, but will be split into multiple packets of 500 bytes size.

These packets can arrive asynchronously in different System Overhead Time-Slice periods, so yes, CPS will be needed to synchronise the data after the message .DN bit is seen.
 

Similar Topics

Hello, I have a pair of redundant 1756-L71 controllers rev 24. These controllers currently have produced and consumed tag interfaces to 3 other...
Replies
2
Views
103
Hi I have been knocking my head against the wall trying to figure out why these two plcs won't talk with Produced and Consumed Tags data. The...
Replies
14
Views
417
Hello all. I have a 1769-L16 that I inserted a 1769-L35E into. I was expecting it to create module defined tags automatically in my controller...
Replies
10
Views
1,756
Hi, Can a tag configured as a Produced or Consumed tag be read or written to with Explicit Messaging? Context: we are retrofitting an AV system...
Replies
9
Views
2,108
Ok, I've setup comms to PLC's that are behind a NAT switch before, but I have not had a PLC behind one NAT switch communicate with a second PLC...
Replies
13
Views
3,323
Back
Top Bottom