1 Array, 20 Projectors and so many lines of code!
Thorleifur
Posts: 58
I am using a EIB/KNX Gateway to monitor 20 rooms each with one 6 button panel. Three buttons on each panel control a projector ( on/off, vga1 and vga2 )
The only thing that is passed on from the CommTec module is one array (lEIB_Value[3000]) which I monitor for button events from the panels (non-amx panels)
I created a Hitachi projector module to handle the IP communications, commmands, responses from the projector and button events. Used it for many projects.
So I ask: What method would you use to minimize the code and utilize the module?
I am kid of blocked here. Of course one could just program each lEIB_Value[x] and what it does, in the main program, but that?s not challenging enough is it
Button 1 Room 1 = lEIB_Value[1]
Button 2 Room 1 = lEIB_Value[2]
Button 3 Room 1 = lEIB_Value[3]
Button 1 Room 2 = lEIB_Value[4]
Button 2 Room 2 = lEIB_Value[5]
Button 3 Room 2 = lEIB_Value[6]
and so on for 18 more rooms.
The only thing that is passed on from the CommTec module is one array (lEIB_Value[3000]) which I monitor for button events from the panels (non-amx panels)
I created a Hitachi projector module to handle the IP communications, commmands, responses from the projector and button events. Used it for many projects.
So I ask: What method would you use to minimize the code and utilize the module?
I am kid of blocked here. Of course one could just program each lEIB_Value[x] and what it does, in the main program, but that?s not challenging enough is it
Button 1 Room 1 = lEIB_Value[1]
Button 2 Room 1 = lEIB_Value[2]
Button 3 Room 1 = lEIB_Value[3]
Button 1 Room 2 = lEIB_Value[4]
Button 2 Room 2 = lEIB_Value[5]
Button 3 Room 2 = lEIB_Value[6]
and so on for 18 more rooms.
0
Comments
This will update automatically one of buttons 1..8 of nButtons if a change or update of EIB table index 1..8 is incoming. To update the buttons on system start or panel online, you may have request the corresponding EIB addresses with the function EIBGet() manually.
Another idea may be just to create a loop, fired every x seconds, to update the 20x3 buttons from the lEIBvalues array. For this you also may have to arrange button channels and EIB table corresponding.
I like this method and am going to try it.
I?ll keep ya?ll posted.