Combining Devices, Levels, and Channels
85
NetLinx Programming Language Reference Guide
The 6 examples in the program below demonstrate the use of
COMBINE_CHANNELS
and
UNCOMBINE_CHANNELS
:
PROGRAM_NAME='CombineChannelsExample'
DEFINE_DEVICE // common devices for all examples below
dvTP = 128:1:0
dvREL10 = 301:1:0
dvIO10 = 310:1:0
vdvControl = 33000:1:0
// example of combining a DEVCHAN set to a virtual [DEV,CHAN] pair
DEFINE_VARIABLE
DEVCHAN dc1[] = {{dvIO10,1},{dvREL10,1},{dvTP,1}}
DEFINE_EVENT
BUTTON_EVENT[dvTP,11] // combine_channels 1
{
RELEASE:
{
COMBINE_CHANNELS (vdvControl,1,dc1)
}
}
BUTTON_EVENT[dvTP,12] // uncombine_channels 1
{
RELEASE:
{
UNCOMBINE_CHANNELS (vdvControl,1)
}
}
BUTTON_EVENT[vdvControl,1] // this will work when the combine_channels above is
invoked
{
PUSH:
{
TO[BUTTON.INPUT]
}
}
// example of combining individual DEVCHANs to a virtual [DEV,CHAN] pair
DEFINE_VARIABLE
DEVCHAN dc2[] = {{dvIO10,2},{dvREL10,2},{dvTP,2}}
DEFINE_EVENT
BUTTON_EVENT[dvTP,13] // combine_channels 2
{
RELEASE:
{
COMBINE_CHANNELS (vdvControl,2,dc2[1],dc2[2],dc2[3])
}
}
Continued
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...