This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Convert private group into public group




makepublic(GObj) makes the dagroup object GObj public. Public groups allow you to share data configuration information across multiple OPC clients. Use the GroupType property to check whether a group is public.

Public groups on a server cannot have the same name. If you attempt to call makepublic on a private group with the same name as an existing public group, you get an error.

After you make a group public, you cannot add items to that group or delete items from that group. You must ensure that a group contains the required items before making the group public.

Not all OPC data access servers support public groups. If you try to make a public group on a server that does not support public groups, you get an error. To verify that a server supports public groups, use the opcserverinfo function on the client connected to that server: Look for an entry 'IOPCPublicGroups' in the 'SupportedInterfaces' field.

Use the clonegroup function to create a private group from a public group.


Create a group on a local server and make the group public:

da = opcda('localhost', 'Dummy.Server');
grp = addgroup(da, 'MakepublicEx');
itm1 = additem(grp, 'Device1.Item1');
itm2 = additem(grp, 'Device1.Item2');

Introduced before R2006a

Was this topic helpful?