How to control the UI from the AMX master?
winstonma
Junior Member
Now my situation is.. I have 2 panels controlling 2 rooms (sharing). Both panels can control both room1 and room2.
But I just want to make sure that each room is controlled by 1 room only. So I want panel1 to show up a warning message when room1 is currently controlled by panel2. And allow panel2 to further control room1 (switch the UI to another page) once panel2 is not controlling room1.
Thanks for the help.
But I just want to make sure that each room is controlled by 1 room only. So I want panel1 to show up a warning message when room1 is currently controlled by panel2. And allow panel2 to further control room1 (switch the UI to another page) once panel2 is not controlling room1.
Thanks for the help.
Comments
-
Just track a variable associated with the button push that brings you to the control page. One for each control page and unpon exit (exit button push) of a control page just reset that control page's tracking variable. If variable is set pop up warning, if not page flip.
-
Thanks for the reply. But can you explain it more specific (I am a newbie on AMX)? Thanks
-
i have done similar things like this:
dvMyTps is a dev Array containing your touchpanels,
nMyRoomButtons an array containing your two Channel Codes of the buttons that lead you to the rooms.
nMyExitButton as a button on the room page that is pushed when the user finishes controlling the roomDEFINE_VARIABLE DEV dvTpControllingRoom[2] INTEGER nWhichRoom; DEFINE_EVENT BUTTON_EVENT[dvMyTps, nMyRoomButtons] { PUSH: { nWhichRoom=GET_LAST(nMyChannels) // sets nWhichRoom to 1 or 2 IF(dvTpControllingRoom[nWhichRoom]==0) { dvTpControllingRoom[nWhichRoom]=BUTTON.INPUT.CHANNEL // this is done when there is no conflict } ELSE { // this is done when there is a conflict } } } BUTTON_EVENT[dvMyTps, nMyExitButton] { PUSH: { dvTpControllingRoom[nWhichRoom]=0; } }
are things a little bit clearer? -
Yes thanks but I still have one more question. How can I control the UIs that I'm loading?
For example if there is conflict I will load Page A... otherwise I'll load Page B. How can I do that on Netlinx Master? -
It Depends
It depends on how you did make this sharing? -
Would you state that with more details? Thanks
-
winstonma wrote:Would you state that with more details? Thanks
a send_command to the touchpanel device, I don't know the command, as we use a Library with a function doing this. but it is in a tp programming manual... i can't tell more for the moment -
i used REBUILD_EVENT' example for this:
DEFINE_VARIABLE DEV dvTpControllingRoom[2] INTEGER nWhichRoom; DEFINE_EVENT BUTTON_EVENT[dvMyTps, nMyRoomButtons] { PUSH: { nWhichRoom=GET_LAST(nMyChannels) // sets nWhichRoom to 1 or 2 IF(dvTpControllingRoom[nWhichRoom]==0) { dvTpControllingRoom[nWhichRoom]=BUTTON.INPUT.CHANNEL // this is done when there is no conflict // to flip to DVD page for example SEND_COMMAND dvTPa, "'PAGE-DVD'' } ELSE { // this is done when there is a conflict // to flip to the error page SEND_COMMAND dvTPa, "'PAGE-ERROR'" } } } BUTTON_EVENT[dvMyTps, nMyExitButton] { PUSH: { dvTpControllingRoom[nWhichRoom]=0; } } -
But how do I name that on the User Interface of the DVD in order to get the page loaded?
-
winstonma wrote:But how do I name that on the User Interface of the DVD in order to get the page loaded?
if you use the examplew with
SEND_COMMAND dvTPa, "'PAGE-DVD'" (careful with " and ' !)
in TP4Design you name one page "DVD" and the other page "ERROR". or wasn't that the question?
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
