cancel
Showing results for 
Search instead for 
Did you mean: 

Plant Connectivity Subscriptions

Former Member
0 Kudos

Hi Everybody,

I have a scenario I am hoping to get some help with.

I have a large number of status tags, 100+, that I would like to subscribe to in Plant Connectivity.  These status tags will be one of the following values: 0,1,2,3,4.  Each time one of these status tags change I would like to send a notification message to my MII system.  However the issue is that I need to know which of the status tags generated the notification message.  I was hoping to be able to send the status tag address (e.g. device1.tag1) as part of the notification message output, but I don't see a way to do that on my current PCo version.  I know that something like this will be possible with a large amount of manual configuration/work, but I want to do this as efficiently as possible. I have looked at some of the aliasing options but that doesn't seem to offer me much help.  Does anybody have any thoughts on how to do this efficiently?

Does PCo have any options to subscribe to a wildcarded tag? (e.g with 1 subscription item subscribe to device1.tag1 and device2.tag1 by using *.tag1)

Also is there a maximum/recommended number of subscription items per Plant Connectivity Agent? And a maximum/recommended number of notification messages per PCo Agent?

I am currently running PCo version 2.1.6.3, but if a newer version would help me do this more efficiently I will upgrade.

Sorry for the number of questions in this post, but I will reward points for any help!

Thanks,

Justin

Accepted Solutions (1)

Accepted Solutions (1)

former_member202228
Active Participant
0 Kudos

Hi Justin,

Define an agent to the OPC datasource. Make sure you see all the status tags values changing.

Then create one notification per monitored tag (100 plus if needed, I have one with 180 items defined and is working fine). For each of the notifications you create, use a "generic transaction" which gets the device name as a parameter, and the status as reported by PCo. The notification output can be modified to include the device name (if the tags are not already named as such).

Usually I'm asking the shop-floor control guys to name the tags according to "machine_statustag" naming convention or at least create them within different PLC topics (directory structure on the PLC level) in a data concentrator PLC.

Since you need to access an OPC server and get the actual data from it, you don't need to  use aliases. However, you can "rename" the PLC tags by defining a PCo Alias, mapping the flat-names in the OPC server with what you need for status reporting (i.e "machine_statustag" like)

Another option is to create one agent per machine .. but you'll need a lot of ports open and sometimes it needs a lot of horsepower to run 200+ windows services. If you run out of ports or resources, yo can install PCO on two machines and split the tags accordingly.

Efficiency wise, you can create Aliases/Agents for PCo in an XML editor, or even in Excel (and saveas XML), then import them. One note though: when importing XML files, PCo creates the Agents instead of updating them.

Former Member
0 Kudos

Thanks for the reply.

However I was hoping to avoid creating a seperate notification message or agent for each tag.  Are there any other ways to do this?

former_member196557
Active Contributor
0 Kudos

Justin,

You can do this:

  • Create your MII transaction with a Transaction variable of type XML.
  • Set up an MII Destinationn to connect to your MII server instance.
  • Set up an OPC Source agent and in the Settings tab, set the Update rate to the minimum frequency you need to be notified of changes in any of the tags.
  • Set up an Agent Instance against the OPC Server Source Agent above, and subscribe to all of the notification tags you need to notify.  Edit the PCo subscription item name so that it will be unique for your requirements (i.e., machine1_status, machine2_status). 
  • Set up a single notification and set its trigger to Always.  This will fire the notification if any of the subscription items changes.
  • Add each of the subscription items to the Output tab of the notification.  After you add all the tags, click on Test Notification delivery and click Save Sample to save the contents of the notification message.  Edit the saved document and paste the contents into the value of the MII transaction input XML variable you created above.
  • Add an instance of the MII Destination to the notification and point it to the MII transaction you created.
  • In your transaction, get the value of the Transaction input variable and use a For-Each action to examine the Values node  of the notifcation message; there will be a node tag with the tagname and value for each of the tags you monitor in PCo that have changed status, and process each one as required.

It is still a bit of work but less than setting up 100+ separate notifications.

- Steve

Former Member
0 Kudos

Thanks for the idea.

This would work but is stateful and we would need to track the current state of each status_tag to know what is changing. This also might not be the most efficient method from a Mii standpoint.  We are very concerned with performance, and adding a for each statement to my Mii transaction is not something that I want to do at this time.

Answers (0)