Home AMX User Forum AMX General Discussion

Room Configuration

Hi,
Looking for the best ways to control the following system.

We have 6 Touch panels and 1 NI4000 processor controlling 5 rooms with different room configurations.

Tp6 is for selecting the room configuration only.

single rooms control 1 projector, 1 screen, 1 switcher, 1 dvd, 1 tuner, lights and blinds

I am using tp arrays to determine which panel was pressed and then run a function to operate the projector and screen on the single room config. When rooms 1+2 are single and 3+4+5 are combined tp 5 controls the combined room. when 1+2 are combined and 3+4+5 are single tp 2 controls the combined room. tp2 and 5 control when the room is split 1+2 combined and 3+4+5 combined and finally tp5 controls the full room.

Should I determine which button is pressed depending on the room config and run a different function or have different "if" statements in the function to determine which config the room is in?

Regards,

Noel

Comments

  • drewdbdrewdb Posts: 14
    If your rooms have relays that show the open or closed states of each room, you could have variables like: Block1_Joined and Block2_Joined. these will be true or false. in the button event for the room 2 panel you could do a switch case.

    Button_Event[devPanel2, btnSystemControls]
    {
    Push:
    {
    //Var
    Stack_Var Integer nIdx;
    Stack_Var Integer nChannel;
    nChannel = 0;
    //Get Channel
    nIdx = Get_Last(btnSystemControls);
    nChannel = btnSystemControls[nIdx];
    [devPanel,nChannel] = 1;
    Switch(Block1_Joined)
    {
    Case True:
    {
    Switch(nChannel)
    {
    Case 1 : { f_System_On_Join(); }//System On
    Case 2 : { f_Select_Pres_Mode_Join(); }//Select Presentation Mode
    Case 3 : { f_Select_VC_Mode_Join(); }//Select VC Mode
    Case 4 : { f_Show_Mode_Page_Join(); }//Show Mode Page
    Case 5 : { f_Show_Computer_Join(); }//Show Computer Page
    }
    }
    Case False:
    {
    Switch(nChannel)
    {
    Case 1 : { f_System_On(); }//System On
    Case 2 : { f_Select_Pres_Mode(); }//Select Presentation Mode
    Case 3 : { f_Select_VC_Mode(); }//Select VC Mode
    Case 4 : { f_Show_Mode_Page(); }//Show Mode Page
    Case 5 : { f_Show_Computer(); }//Show Computer Page
    }
    }
    }
    }
    }

    Or you could have the switch case in each individual function.
Sign In or Register to comment.