Main Content

makepublic

(To be removed) Convert private group into public group

Support for the OPC Data Access (DA) standard will be removed in a future release. Instead use OPC Unified Architecture (UA). See Version History.

Syntax

makepublic(GObj)

Description

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.

Examples

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

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

Version History

Introduced before R2006a

expand all