Indirect Items

I have a scenario where using Indirect Tags would easily solve the programming of faceplates to show detailed information and configuration. I have the concern that the approach could not be the best in terms of data traffic, though.

Let me explain:
I have different datatypes that represent add-on objects that model analog inputs, motors, digital inputs, PIDs, etc. from a Logix controller. Each add-on is a complex structure that contains dozens of tags used for configuration and status. For display purposes I usually need about 4 to 5 tags used in a template to show the basic information. If I click on the template, a faceplate is opened and depending on the complexity of the object, several tags are used in animations, module configuration and alarms.
The problem I see is that since the additional information is only required when the faceplate is opened for the specific instance, if I use SQLTags to represent the whole structure, I am adding overhead to the communication because I am reading tags at a fixed rate from the controller that usually are not active in the display.

Is there a way to make an indirect tag reference but using OPC items instead? That would mean that instead of having a SQLTag under a datatype called ANALOG/AlarmHHEnable I can use a reference such as {Parameter}.AlarmHHEnable where {Parameter} is an OPC item.
The idea is only read the information that is not used frequently when is really required, instead of having regular updates for all the instances that probably won’t be used.

I guess I am asking if there is something similar in concept to SQLBridge OPC Items using Read OPC mode on triggered transactions: data is only retrieved when transaction is active. I would like to accomplish that but only when the tags for the specific instance are active.

I tried to figure out a way to do this using leased scan classes, but since the scan class is defined from the datatype, that would mean that all the instances of that datatype will be activated if there is at least one of the many activated. Or I would have to create as many leased Scan Classes as modules instances.
My other approach was to pass the OPCItemPath and create a script triggered by a timer to periodically update the values, but this requires more programming and have some complexity when used in cases where the control is bi-directional.

Any idea or suggestion :question:

Thanks.

Hi,

Leased scan classes seem to be exactly what you want. Your description of how they work with UDTs isn’t correct- they may be defined at that level, but only the actual tags at any given time that are subscribed (in a window, template, etc, including through indirect addressing) are “leased”.

*Side note: “External” tags do, in fact, work as you described. However, since you’re using UDTs, I know you’re not using external tags.

Anyhow, if you create 1 leased scan class with a slow rate of 0, and a fast rate of whatever you want, and assign all of your udt member tags to that, you should see that it behaves as you want. If you find that more tags are subscribed than expected, we’ll have to see if the tags are actually being subscribed somewhere else as well. You can see how many tags are leased in the status>sqltags page, both in the scan class stats, and the list at the bottom.

Regards,

Thanks Colby,

So it seems that my concern was unfounded. From what you say when tags are managed by a Leased Scan Class, only the active tags would be retrieved from OPC Server at the fast rate. The inactive tags would not be read even if they are attached to the same Scan Class. Is that correct?

If so that is simple a brilliant implementation. I could not figure out that from the description in the manual, though:

[quote][i]Leased

The scan class executes at the fast rate when any of the tags it contains are subscribed and visible in a client window. If no tags are subscribed, the scan class runs at the slow rate.[/i][/quote]

Well gee, I can see how you’d get the wrong idea from that description… :blush:

The thing is, it used to work according to that description, until… 7.3 I believe. However, now days, tag subscriptions/leases are tracked individually, and will work as you want.

Regards,