Home AMX User Forum NetLinx Studio

COMBINE_DEVICES Question

Greetings,

Are multiple COMBINE_DEVICES statements additive? I mean would

{
COMBINE_DEVICES (vdv,dv1)
COMBINE_DEVICES (vdv,dv2)
COMBINE_DEVICES (vdv,dv3)
}

end up with the same fuctionality as

{
DEFINE_COMBINE (vdv,dv1,dv2,dv3)
}

If so, does

{
UNCOMBINE_DEVICES (vdv)
}

remove all combinations, requiring new combining if desired later on?

And if each dv is combined with the vdv as the dv goes online, is there really any reason to uncombine the vdv when a dv goes offline?

Thanks!

"I didn't just fall off the turnip truck yesterday, it was quite a while ago!"

Comments

  • COMBINE_DEVICES Questions

    I do not believe that COMBINE_DEVICES is additive - namely that each time you specify a COMBINE_DEVICES for a virtual device, the list of real devices specified in the call replace the set of combined devices for the virtual devices. When I add or delete devices from a combined set, I first uncombine the set (which removes them all) and then re-build the set with a combine that includes all of the desired devices.

    UNCOMBINE_DEVICES certainly removes all of the devices from the list and a COMBINE_DEVICES would be needed to re-associate a new device set with the virtual device.

    As for devices going off-line, I generally do not worry about removing them from the combine set when they go offline. Typiclaly, I build a combine set in DEFINE_START and leave the list alone. It might be more efficient from a Netlinx point of view to remove devices from the set that are offline since any action generated to the virtual device in a set is sent to all devices in the set. The Netlinx requirement for the first device in a combine being a virtual device is to solve the problem where the first device might go offline thereby affecting the rest of the devices in the set. Since a virtual device does not go offline, this solves that problem.

    Combining and uncombining devices in an ONLINE event is relatively straightforward but check the Netlinx programming manual for guidelines on combining under BUTTON events. There are situations where the combine/uncombine should be done under the RELEASE and not under the PUSH.

    Hope some of this is helpful.
Sign In or Register to comment.