Sync bargraphs on multible panels
bia@jdm.dk
Posts: 20
Hi guys
I have a seies of bargraphs running, to control floorheat valves.
All my touch panels on the project are grouped as ALLTP:
DEV ALLTP[] = {TP1,TP2,TP3,TP4}
This is my code for one of the bargraphs:
LEVEL_EVENT[ALLTP,1] // READ THE LEVEL OF THE BARGRAPH
{
BARGRAPH1 = LEVEL.VALUE // STORE THE LEVEL OF THE BARGRAPH
SEND_LEVEL VAO,1,BARGRAPH1 // UPDATE THE PASSIVE BARGRAPH(1)
}
How do I sync the level on all touch panels - when I change the value on one of them ?
I have a seies of bargraphs running, to control floorheat valves.
All my touch panels on the project are grouped as ALLTP:
DEV ALLTP[] = {TP1,TP2,TP3,TP4}
This is my code for one of the bargraphs:
LEVEL_EVENT[ALLTP,1] // READ THE LEVEL OF THE BARGRAPH
{
BARGRAPH1 = LEVEL.VALUE // STORE THE LEVEL OF THE BARGRAPH
SEND_LEVEL VAO,1,BARGRAPH1 // UPDATE THE PASSIVE BARGRAPH(1)
}
How do I sync the level on all touch panels - when I change the value on one of them ?
0
Comments
Firstly, when whatever device is sending you feedback on the heat level does so, store that in a non-volatile varialbe. Then, send out that value to all TPs whenever it changes, whenever a TP accesses the page/popup showing these values or whenever a TP comes online after being offline.
I personally don't bother updating feedback on panels that are not actively showing something. For example, I update all lighting feedback on a panel when the user selects the lighting mode button. I can then sneak in the feedback for individual ones just prior to them looking at a zone. It happens so fast they don't ever see blank or falses values anyway.
The idea of syncing the fader values is not actually done at the panel level. It happens at the device feedback level.
I programmed a 9 room system over the summer. 9 small conference rooms and a main panel in the lobby that can control and monitor all 9 rooms. The first device must be a virtual then all the panels you want to use for that device follow. This allows you to just update the level of the virtual which will then automatically update to the panels tied to that virtual. Worked like a champ.
Example:
DEFINE_CONNECT_LEVEL(vdvVol,1,dvPnl1,1,dvPnl2,1,dvPnl3,1)
But situation often determines the method. Just figure out what your choices are and pick the best one for the situation.
I would not used any of the connecting or combining functions. I have had strange results with them, especially when devices fall offline. Much of this is left over from the Axcess days.
When a piece of hardware's level changes, send it to all panels (or those on a certain page)
When a panel comes online (or flips to a certain page) send it fresh levels
If I want to send to a specific panel I pass this function the index position of that panel otherwise I send it a constant called "UI_UPDATE_ACTIVE" which equals zero. I have two integer arrays that I use to determine which UI's to send to if I'm going to update all active "on page" UI's.
The first array tracks when a UI goes on and off page. If on page I sent the UI index position to the instance of the device I'm now on page with and then I use an array to hold the UI type which I determine by it's device id when the UI's port 1 comes online. The UI type is just so I can route levels, channels, VT to devices that use them while skipping devices that don't. This changes per controlled device and therefore it is set up specifically for each controlled device for what feedback the UI's need or don't need.
When a UI comes on page I send this function its UI index from another function that loops through all the levels that are needed to bring that panel up to date and when I recevie a level form the device I'm controlling I send the function "0" or the constant "UI_UPDATE_ACTIVE" which sets the parameters for the "for loop" and then will update all "on page" UI's for that device instance. Often there's only one instance of a module running.