Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Group name, deadband

More
18 Feb 2016 15:14 #3860 by support
Replied by support on topic Group name, deadband
Hello.

QuickOPC works on a higher level. OPC groups are a mechanism for physically grouping the items mainly for communication efficiency. QuickOPC hides the OPC groups from the API that is exposed to you. QuickOPC manages the groups automatically behind the scenes. Oversimplifying a lot, it basically creates puts items with the same or similar parameters into the same group, and creates new groups when new parameters are needed.

There should be no need to even know about the groups. When you are subscribing to an item, you specify the parameters that you require for that item subscription. Some parameters are completely "useless" - for example, the group name has no significance to how things work.

"Deactivating" can be done either via unsubscribing, or by calling ChangeSubscription/ChangeMultipleSubscriptions and specifying a new update rate as Timeout.Infinite (-1).

Note that for efficiency, if you have more items, it is highly recommended that you assemble the items and parameters upfront, and then make a call to SubscribeMultipleItems, instead of calling SubscribeItem in a loop. Here is an example:
partial class SubscribeMultipleItems
        {
            public static void Main()
            {
                using (var easyDAClient = new EasyDAClient())
                {
                    easyDAClient.ItemChanged += easyDAClient_ItemChanged;
 
                    easyDAClient.SubscribeMultipleItems(
                        new[] {
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Random", 1000, null), 
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Trends.Ramp (1 min)", 1000, null), 
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Trends.Sine (1 min)", 1000, null),  
                            new DAItemGroupArguments("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 1000, null)
                        });
 
                    Console.WriteLine("Processing item changed events for 1 minute...");
                    Thread.Sleep(60 * 1000);
                }
            }
 
            // Item changed event handler
            static void easyDAClient_ItemChanged([NotNull] object sender, [NotNull] EasyDAItemChangedEventArgs e)
            {
                Console.WriteLine("{0}: {1}", e.Arguments.ItemDescriptor.ItemId, e.Vtq);
            }
 

More examples are in the solution with examples that comes with the product (for C#, or VB.NET). The above example only specifies the update rate but no deadband. If you look at the documentation of the DAItemGroupArguments (opclabs.com/files/onlinedocs/QuickOpc/Latest/Reference/Quick...733-c6c5-7d18-05680744e95c.htm), you will find more constructors, or settable properties, that allow you to specify the deadband as well (it is one level further down - under the GroupParameters property of the DAItemGruopArguments).

I hope this helps.

Please Log in or Create an account to join the conversation.

More
18 Feb 2016 14:05 #3859 by tmouslih
Hallo,

today we've tried to Change the tags Group Name and deadband.
Here are a short C#-Code how we subscribe an OPC TAG in the application.

EasyDAClient.EnableNetApiClient = true;

// create new DAClient

_easyDaClient = new OpcLabs.EasyOpc.DataAccess.EasyDAClient();
. . . .
fullTag = string.Format("{0}.{1}.{2}.{3}", item.PLC.Channel, item.PLC.Device, item.PLC.DB, item.TAG.TAGname);

_easyDaClient.SubscribeItem("",_ServerClass,fullTag,_UpdateRate, easyDaClient_ItemChanged)


questions are:

How is it possible to define Groups with group names and TAG names, set the update and deadband rate correctly and subcribe it?

How can we activate and deactivate a group during run time?

Have you a demo application, where we can see this functionality?

Thank you.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.047 seconds