Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 3.00

You can group devices for logging alarms and this works fine. The problem is grouped devices cannot be opened using DevOpen() on the Group name. It does not give a hardware alarm but if you use ErrSet(1) then -1 will be returned. For example DevOpen("GroupName",0); will fail.  

Device groups are only supported by a subset of the device functions. These functions allow data to be logged to groups of devices. They do not allow data to be read from groups of devices as there would be a clash as to which data was read. As only a subset of the device functions support device groups the DevOpen() function will fail to open a group of devices. If you have error checking on ErrSet(1), then DevOpen will return -1 if you try to open a group of devices. .

You may open a group of devices by either using DevCurr() function in a report which has a group device defined in the report or you may use the GrpOpen() function. You may log data to a group of devices by then using the DevPrint() function For example:

hGrp = GrpOpen("MyGroup", 0);
DevPrint(hGrp, "data to write to group", 1);

The following functions can be used with a group of devices:

DevClose(); // will close all devices in the group

DevHistory(); // will create history on all devices in a group

DevPrint(); // will print to all devices in a group

All the other device functions do not support groups of devices. It is an undefined behaviour if you call other device functions with a group handle.