Facility Control

 View Only
  • 1.  Custom Button To Swap PGM And Key 2 Sources

    Posted 07-19-2022 16:56
    I'd like to have a button on our custom panel that can somehow recognize what source is being fed into Key 2 and what bus is currently on program, then swap them (so what was in PGM is now the source for Key 2, and what was in Key 2 is now cut onto PGM).

    I've looked at Ogscript and RossTalk commands a little bit, but I'm lost on how to even go about constructing a button like this.

    I apologize in advance if this is a silly question.

    Cheers!

    ------------------------------
    Nick Kubinski
    ------------------------------


  • 2.  RE: Custom Button To Swap PGM And Key 2 Sources

    Posted 07-20-2022 16:02
    Hi Nick
    Which switcher are you looking to do this with? For a Carbonite or Graphite, each bus will be represented by a parameter (MEx PGM, MEx Keyx, etc.). You can write ogScript that gets the values of each of the 2 bus parameters and then swaps their values. The OIDs of these parameters will change depending on which version of which switcher you are using.


    The code generated here would be:
    var BackgroundValue = "";
    var Key2Value = "";
    BackgroundValue = params.getValue('0xE06', 0);
    Key2Value = params.getValue('0xDF9', 0);
    params.setValue('0xDF9', 0, BackgroundValue);
    params.setValue('0xE06', 0, Key2Value);

    If you look at the Buses tab of the Live Assist screen and use the "Param Inspector" feature, you should be able to find the appropriate OIDs for your switcher.

    Cheers
    James

    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 3.  RE: Custom Button To Swap PGM And Key 2 Sources

    Posted 07-21-2022 11:44
    Hi James,
    Thank you very much, that worked brilliantly! 

    Here's the code that I got once I found the correct OIDs:
    var BackgroundValue = "";
    var Key2Value = "";
    BackgroundValue = params.getParam("ip address<br>Slot 0<br>Graphite", '0xE06', 0).getValue();
    Key2Value = params.getParam("ip address<br>Slot 0<br>Graphite", '0xDF7', 0).getValue();
    params.getParam("ip address<br>Slot 0<br>Graphite", '0xDF7', 0, BackgroundValue).setValue(BackgroundValue);
    params.getParam("ip address<br>Slot 0<br>Graphite", '0xE06', 0, Key2Value).setValue(Key2Value);

    ------------------------------
    Nick Kubinski
    ------------------------------