Oliver Nicholls
Oliver Nicholls

Reputation: 1441

How does OPC order items?

I'm working on an OPC(DA) server that creates a collection of server items and sends them to an OPC client. Each item has a "name" value that determines the order that the items are displayed in. The name of each item is structured as:

Sites.<SiteID>.CurrentValue

So the data might look something like:

Sites.0001.CurrentValue
Sites.0002.CurrentValue
Sites.0003.CurrentValue
Etc.

Or in a tree format:

Sites:
  0001:
    CurrentValue
  0002:
    CurrentValue
  0003:
    CurrentValue
  Etc.

Since the items are ordered by name and the only variable part of the item name is the site ID, the items are effectively ordered by site ID. The problem occurs when the OPC client displays the items. The order that they're displayed in is totally different:

Sites:
  6219
  13501
  13502
  4000
  4001
  626262
  4002
  4003
  4004
  4005
  4006
  4007
  4008
  0030
  4009
  0200
  79791
  Etc.

I've been trying to infer some kind of logical ordering system that would give this result, but I'm just not seeing anything. I have tried this with several OPC clients (Matrikon, dOPC, KEP) and they are all consistently presenting items in the above order, which leads me to believe there is some kind of universal OPC ordering system, but I've not been able to find anything.

My hope is that, if I can find out how OPC is ordering these items, I can order the items in the OPC server, such that they will get displayed in a logical order in the OPC client.

My server is Advosol-based (I don't have enough reputation to create a new tag).

Upvotes: 0

Views: 410

Answers (0)

Related Questions