COMBINE_DEVICE and selective use
Yendrek
Posts: 2
Helo,
I'm new here and in my project I use 4 panels, I connect them with vdvTP and function COMBINE_DEVICE. sometimes i need selective one panel, which I want to use (ex.dvTP2) what can i do to work only this panel when i use function BUTTON_EVENT. i don't want to use function UNCONBINE_DEVICE.
sorry for ma english, i'm beginer
Yendrek.
I'm new here and in my project I use 4 panels, I connect them with vdvTP and function COMBINE_DEVICE. sometimes i need selective one panel, which I want to use (ex.dvTP2) what can i do to work only this panel when i use function BUTTON_EVENT. i don't want to use function UNCONBINE_DEVICE.
sorry for ma english, i'm beginer
Yendrek.
0
Comments
One way to accomplish what you want is to make an array of touch panels and use GET_LAST instead of the COMBINE_DEVICE routine. For example:
Thank you for your reply. I know the solution you suggest, but my problem is
that I use about 600 functions of BUTTON EVENT for all the panels
alltogether and the convenient way is to use the function vdvTP (as below)
Code:
DEFINE_DEVICE
dvTP1 = 10001:1:0
dvTP2 = 10002:1:0
dvTP3 = 10003:1:0
dvTP4 = 10004:1:0
vdvTP = 33001:1:0
DEFINE_COMBINE (vdvTP,dvTP1,dvTP2,dvTP3,dvTP4)
DEFINE_VARIABLE
DEV dvTPs[] = {dvTP1,dvTP2,dvTP3,dvTP4}
DEFINE_EVENT
BUTTON_EVENT[vdvTP,1]
{
PUSH:{....}
}
..
...
....
BUTTON_EVENT[vdvTP,600]
{
PUSH:{....}
}
BUTTON_EVENT[dvTPs,700] {
PUSH: {
INTEGER index
index = GET_LAST(dvTPs)
//If the user pushed button 1 on dvTP2 then index = 2
}
}
and then the solution, you gave me, doesn't make it possible to call
selectively only one concrete panel, for example dvTP2.
Is there any solution to achieve a selective call together with the function
COMBINE_DEVICE?
Best regards,
Yendrek
What about this one:
IF you have done a combine (DEFINE_COMBINE for static or COMBINE_DEVICES for dynamic combining) the master only will see the 1st device in the Combine list. The only exception is the ONLINE and OFFLINE, which will also work for every device in a combine list.
ON[dvTP2,10] //direct
ON[dvTPs[2],10] //indexing through the TP array
Or as Marc pointed out you can use BUTTON.INPUT.DEVICE - assuming dvTP2 fired of the EVENT:
I use GET_LAST(dvTPs) when I want to know the actual index into the array. For example let?s say I want to keep track of what each TP is controlling at the present time and store it in a structure. I might use the following scenario:
Nope, if the devices are combined then any action to either vdvTP or any of the dvTPx will act on all the devices in the combine, except as Marc pointed out, the ONLINE and OFFLINE events.
ie:
Define_device:
dvTPW = 128:1:0 (* AMX AXD-CV10 DEVICE #1 *)
dvTPW1 = 129:1:0 (* AMX AXD-CV10 DEVICE #2 *)
dvWTP = 226:1:0 (* HTML PANEL DEVICE #1 *)
dvWTP1 = 227:1:0 (* HTML PANEL DEVICE #2 *)
Define_variable:
DEV dvTP[]={dvTPW,dvWTP}
DEV dvTP1[]={dvTPW1,dvWTP1}