Facility Control

 View Only
Expand all | Collapse all

Crosspoints Status

  • 1.  Crosspoints Status

    Posted 04-05-2022 13:23
    Hello guys,

    I´d like to close a crosspoint in the Ultrix, and after that, I´d like to see the status of this closed crosspoint be showed in a label. For example, I created a button called ''dest1_src1", running the take crosspoint task, so when I hitted this button, a crosspoint is closed. I´d like to see in the label (parameter) a message saying '' source 1 and destination 1''. In nutshell, I want to monitoring the crosspoints through a display. 

    Follow our settings in attach.

    Thanks,

    ------------------------------
    João victhor Mariano
    ------------------------------


  • 2.  RE: Crosspoints Status

    Ross Staff
    Posted 04-06-2022 05:59
    Hi João 
    The visual logic block your probably looking for is Set Parameter Value. You can then select your text by the value in the parameter. See method 1 in the example below. I have included method two as an idea on how you could push your idea on and select the destination from a dropdown list and output not only the current name but also a way of selecting your destination number using the value as an output. 

    note both these methods would work independently of your ultrix. If a change happens directly on your ultrix the correct information may not be correctly displayed on your panel. You may want to find the OID (parameter) directly in the ultrix instead to display. 
    <abs contexttype="opengear" id="_top" keepalive="false" style="">
       <meta>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="Method1" oid="Method1" precision="0" type="INT32" value="1" widget="label">
                <constraint key="1">Dest 1</constraint>
                <constraint key="2">Dest 2</constraint>
                <constraint key="3">Dest 3</constraint>
                <constraint key="4">Dest 4</constraint>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="Selector 1" oid="Selector_1" precision="0" type="INT32" value="4" widget="combo">
                <constraint key="1">Dest 1</constraint>
                <constraint key="2">Dest 2</constraint>
                <constraint key="3">Dest 3</constraint>
                <constraint key="4">Dest 4</constraint>
             </param>
             <param access="1" maxlength="0" name="OUTPUT" oid="OUTPUT" type="STRING" value="4.0" widget="label"/>
             <param access="1" maxlength="0" name="Selected " oid="Selected_" type="STRING" value="Dest 4" widget="label"/>
          </params>
       </meta>
       <abs height="672" left="54" style="bg#lightdivider;" top="129" width="1014">
          <label header="true" height="98" left="49" name="METHOD 1" style="txt-align:center" top="25" width="415"/>
          <button buttontype="push" height="174" left="46" name="Dest 1" top="153" width="263">
             <task tasktype="ogscript">/*! block id=1000 !*/
    params.setValue('Method1', 0, 1);
    /*!!
     &lt;block id="1000" type="param_setvalue" x="177" y="118" w="318" PARAM="[root, Params for New%20CustomPanel5.grid, Not In Menu, Method1 (Method1)]" VALUE="1" /&gt;
    !!*/
    /*!!&lt;checksum&gt;7b209dd672bc10d2ad91273c18c528db&lt;/checksum&gt;!!*/</task>
          </button>
          <button buttontype="push" height="174" left="336" name="Dest 2" top="153" width="263">
             <task tasktype="ogscript">/*! block id=1001 !*/
    params.setValue('Method1', 0, 2);
    /*!!
     &lt;block id="1001" type="param_setvalue" x="505" y="216" w="318" PARAM="[root, Params for New%20CustomPanel5.grid, Not In Menu, Method1 (Method1)]" VALUE="2" /&gt;
    !!*/
    /*!!&lt;checksum&gt;e4b5d7cbbfd64546a7a90132f154b033&lt;/checksum&gt;!!*/</task>
          </button>
          <param expand="true" height="157" left="85" oid="Method1" style="size:Big;" top="389" widget="label" width="609"/>
       </abs>
       <abs height="654" left="1146" style="bg#orange;" top="139" width="858">
          <label header="true" height="106" left="85" name="Method 2" style="txt-align:center;" top="19" width="431">
             <task tasktype="ogscript"/>
          </label>
          <button buttontype="push" height="195" left="271" name="Select" top="212" width="274">
             <task tasktype="ogscript">
    
    
    /*! block id=1003,1009 !*/
    params.setValue('OUTPUT', 0, params.getValue('Selector_1', 0));
    /*! block id=1007,1008 !*/
    params.setValue('Selected_', 0, params.getValueAsString('Selector_1', 0));
    /*!!
     &lt;block id="1003" type="param__top&amp;amp;OUTPUT (OUTPUT)[0]" x="358" y="10" w="243" SET="ID:1009" /&gt;
    &lt;block id="1009" type="param_getvalue" x="10" y="10" w="318" PARAM="[root, Params for New%20CustomPanel5.grid, Not In Menu, Selector 1 (Selector_1)]" /&gt;
    &lt;block id="1007" type="param__top&amp;amp;Selected  (Selected_)[0]" x="358" y="102" w="243" SET="ID:1008" /&gt;
    &lt;block id="1008" type="param_getstringvalue" x="10" y="102" w="318" PARAM="[root, Params for New%20CustomPanel5.grid, Not In Menu, Selector 1 (Selector_1)]" /&gt;
    !!*/
    /*!!&lt;checksum&gt;d22fb11991ab23ab9f228d68bffdb77f&lt;/checksum&gt;!!*/</task>
          </button>
          <param expand="true" height="127" left="23" oid="Selector_1" top="217" width="211"/>
          <param expand="true" height="110" left="601" oid="OUTPUT" style="bg#buttonbg;" top="263" width="217"/>
          <param expand="true" height="98" left="588" oid="Selected_" style="bg#buttonbg;fg#red;size:Bigger;" top="417" width="233"/>
       </abs>
    </abs>
    


    ------------------------------
    Jack Horry
    Product Manager
    DashBoard, Interstellar, PowerPlay, Lightning
    Ross Video | Living Live
    ------------------------------



  • 3.  RE: Crosspoints Status

    Posted 04-06-2022 12:41
    Hello,

    Thanks for the panel, I could copy the code and paste into my custom panel. However, I still have questions unsolved.

    Just to be clear, I´d like to set a label that monitos the changes occured in the soft panel of Ultrix. 



    So, everytime that a diiferent source closed a crosspoint with a differente destination I´d like to receive this status. I developed a panel which have a similiar operation, but I need to press a button (called ''status'') to the label listen this information. It´s not a automatic process. 

    You´ll find the code of my panel below:

    <abs contexttype="opengear" id="_top" keepalive="false" style="">
    <meta>
    <params>
    <param access="1" constraintstrict="false" constrainttype="STRING_STRING_CHOICE" maxlength="0" name="label" oid="label" type="STRING" value="1.0" widget="text-display">
    <constraint key="1">src1</constraint>
    <constraint key="2">src2</constraint>
    <constraint key="3">src3</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="choice" oid="choice" precision="0" type="INT32" value="0" widget="default">
    <constraint key="0">off</constraint>
    <constraint key="1">on</constraint>
    </param>
    </params>
    </meta>
    <meta>
    <context contexttype="opengear" id="Ultriscape.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape"/>
    <context contexttype="opengear" id="Ultrix.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix"/>
    </meta>

    <button buttontype="push" height="43" id="01" left="119" name="src1" top="96" width="122">
    <task tasktype="ogscript">


    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,1 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 1);

    </task>
    </button>
    <button buttontype="push" height="42" id="02" left="118" name="src2" top="157" width="124">
    <task tasktype="ogscript">
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,2 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 2);

    </task>
    </button>
    <param expand="true" height="47" id="display_ultrix" left="301" oid="label" top="214" widget="text-display" width="179"/>

    <button buttontype="push" height="43" id="01" left="120" name="src3" top="222" width="122">
    <task tasktype="ogscript">
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,3 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 3);

    </task>
    </button>
    <simplegrid contexttype="opengear" height="38" left="323" objectid="50199493011&lt;br&gt;Slot 2&lt;br&gt;MC1-MK" objecttype="MC1-MK" rows="1" top="99" width="50">
    <param element="0" expand="true" oid="0x1310" showlabel="false" widget="13"/>
    </simplegrid>
    </abs>


    Thanks, 






  • 4.  RE: Crosspoints Status

    Ross Staff
    Posted 04-13-2022 17:48
    Hi João,

    Have a go with the panel code below. I thought you'd prefer to use the real source name from the Ultrix so removed your old label and replaced it with a simpler one then added some ogscript called "DestListener" to write to it. It will overwrite the label with the source name when there's a change of the dest input status. There's also some subscription stuff under the ultrix context but that's just to keep it lightweight by minimising the info from the Ultrix.

    <abs contexttype="opengear" id="_top" keepalive="false">
    <meta>
    <params>
    <param access="1" maxlength="0" name="SourceName" oid="SourceName" type="STRING" value="Cam 2" widget="label"/>
    </params>
    </meta>
    <meta>
    <ogscript handles="onload" name="DestListener" targetid="_top">var destIndex=0;
    var levelIndex=0;

    /* First time SourceName label set*/
    ogscript.debug('First time SourceName set');

    var sourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var sourceName = params.getParam("Ultrix.1", 'params.sources.' + sourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, sourceName);

    /*Listener for future changes*/
    ogscript.debug('Creating listener');

    var oidString = 'params.statusByDestination.' + destIndex + '.inputstatus';

    var paramObj = params.getParam('Ultrix.1',oidString, 0);

    var listenerObj = paramObj.addParamListener( function(param, changedIndex)
    {

    ogscript.debug('xpt change callback');

    if (changedIndex == levelIndex)
    {
    ogscript.debug('Level is of interest, updating SourceName label');

    var newSourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var newSourceName = params.getParam("Ultrix.1", 'params.sources.' + newSourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, newSourceName);
    }

    }, true);</ogscript>
    </meta>
    <meta>
    <context contexttype="opengear" id="Ultriscape.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape"/>
    <context contexttype="opengear" id="Ultrix.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix" subscriptions="true">
    <meta>
    <subscription oids="params.statusByDestination,params.sources"/>
    </meta>
    </context>
    </meta>
    <button buttontype="push" height="43" id="01" left="119" name="src1" top="96" width="122">
    <task tasktype="ogscript">var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,1 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 1);</task>
    </button>
    <button buttontype="push" height="42" id="02" left="118" name="src2" top="157" width="124">
    <task tasktype="ogscript">var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,2 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 2);</task>
    </button>
    <button buttontype="push" height="43" id="01" left="120" name="src3" top="222" width="122">
    <task tasktype="ogscript">var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
    panelid = 1999;
    }
    var levString = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" + "";
    var levels = levString.split(",");
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    for (i = 0; i &lt; levels.length; i++) {
    multi1.setValue('params.statusByDestination.' + (1 - 1) + '.inputstatus',levels[i] - 1,3 - 1);
    }
    multi1.execute();

    params.setValue('label', 0, 3);</task>
    </button>
    <simplegrid contexttype="opengear" height="38" left="323" objectid="50199493011&lt;br&gt;Slot 2&lt;br&gt;MC1-MK" objecttype="MC1-MK" rows="1" top="99" width="50">
    <param expand="true" oid="0x1310" showlabel="false" widget="13"/>
    </simplegrid>
    <param expand="true" height="43" left="322" oid="SourceName" style="bg#27305D;" top="271" width="187"/>
    </abs>

    ------------------------------
    Daniel Bailey
    Solutions Architect
    Ross Video
    ------------------------------



  • 5.  RE: Crosspoints Status

    Posted 04-14-2022 09:56
    Hello Daniel,

    Thank you so much for your time. The panel is better than before, and the label you´ve developed is more logic than mine. 

    However, to the panel works as we want, when a crosspoint is closed in the Ultrix´s soft panel, the label should show me the source name (how it´s already working at this moment) and the GPIO move from low status to high automatically, without need press any button. Do you think it´s possible? 

    Thanks, 





  • 6.  RE: Crosspoints Status

    Ross Staff
    Posted 04-14-2022 11:14
    Hi João,

    Yes that should be fine, once you've got your code to control the GPIO you could drop it into the param listener callback function. If there are only a few then you could just quickly drop it in like this:

    var listenerObj = paramObj.addParamListener( function(param, changedIndex)
    	{
    
    	ogscript.debug('xpt change callback');
    	
    	if (changedIndex == levelIndex)
    	{
    		ogscript.debug('Level is of interest, updating SourceName label');
    
    		var newSourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    		var newSourceName = params.getParam("Ultrix.1", 'params.sources.' + newSourceIndex + '.name', 0).getValue();
    		params.setValue('SourceName', 0, newSourceName);
    
    		/* Update GPIO */
    		
    		if (newSourceIndex == 0}
    		{
    			/*turn on GPIO 0*/
    			/*turn off all GPIO except 0*/		
    		}
    		else if (newSourceIndex == 1)
    		{		
    			/*turn on GPIO 1*/
    			/*turn off all GPIO except 1*/		
    		}
    		else if (newSourceIndex == 2)
    		{		
    			/*turn on GPIO 2*/
    			/*turn off all GPIO except 2*/		
    		}
    		else
    		{		
    			/*turn off all GPIO*/		
    		}
    
    	}
    ​ }, true);


    ------------------------------
    Daniel Bailey
    Solutions Architect - Hyperconverged Solutions
    Ross Video
    ------------------------------



  • 7.  RE: Crosspoints Status

    Posted 04-14-2022 16:30
    Hi Daniel,

    I am working with João on this project and I trying to do the same thing with another card (TES-8643). But I am having problems with the GPIO Override.


    Here are the changes I made on the panel code to use the TES card:

    <abs contexttype="opengear" id="_top" keepalive="false">
    <meta>
    <params>
    <param access="1" maxlength="0" name="SourceName" oid="SourceName" type="STRING" value="PGM SW-1" widget="label"/>
    </params>
    <context contexttype="opengear" id="TES-8643.1" objectid="50199493011&lt;br&gt;Slot 12&lt;br&gt;TES-8643" objecttype="TES-8643"/>
    </meta>
    <meta>
    <ogscript handles="onload" name="DestListener" targetid="_top">var destIndex=0;
    var levelIndex=0;

    /* First time SourceName label set*/
    ogscript.debug('First time SourceName set');

    var sourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var sourceName = params.getParam("Ultrix.1", 'params.sources.' + sourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, sourceName);

    /*Listener for future changes*/
    ogscript.debug('Creating listener');

    var oidString = 'params.statusByDestination.' + destIndex + '.inputstatus';

    var paramObj = params.getParam('Ultrix.1',oidString, 0);

    var listenerObj = paramObj.addParamListener( function(param, changedIndex)
    {

    ogscript.debug('xpt change callback');

    if (changedIndex == levelIndex)
    {
    ogscript.debug('Level is of interest, updating SourceName label');

    var newSourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var newSourceName = params.getParam("Ultrix.1", 'params.sources.' + newSourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, newSourceName);
    }

    }, true);</ogscript>
    </meta>
    <meta>
    <context contexttype="opengear" id="Ultriscape.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape"/>
    <context contexttype="opengear" id="Ultrix.1" objectid="Ultrix-50201609001&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix" subscriptions="true">
    <meta>
    <subscription oids="params.statusByDestination,params.sources"/>
    </meta>
    </context>
    </meta>
    <simplegrid contexttype="opengear" height="38" left="323" objectid="50199493011&lt;br&gt;Slot 12;br&gt;TES-8643" objecttype="TES-8643" rows="1" top="99" width="397">
    <param expand="true" oid="0x1310" showlabel="false" widget="13"/>
    </simplegrid>
    <param expand="true" height="43" left="432" oid="SourceName" style="bg#27305D;" top="163" width="187">
    <task tasktype="ogscript">/*! block id=1011,1010,1009,1012 !*/
    if (params.getValueAsString('SourceName', 0) == "PGM SW-1")
    {
    params.getParam('TES-8643.1', '0x1310', 0).setValue(0);
    } else {
    params.getParam('TES-8643.1', '0x1310', 0).setValue(1);
    }
    /*!!
    &lt;block id="1011" type="if" x="495" y="57" w="268" INPUT1="ID:1010" OPERATION="equals" INPUT2="PGM SW-1" TRUE="ID:1009" FALSE="ID:1012" IGNORE="" /&gt;
    &lt;block id="1010" type="param_getstringvalue" x="56" y="56" w="318" PARAM="[root, Params for Painel_TES.grid, Not In Menu, SourceName (SourceName)]" /&gt;
    &lt;block id="1009" type="param_setvalue" x="939" y="125" w="318" PARAM="[root, TES-8643 (Frame MCR slot 12), Config, GPIO Override, Level (0x1310)]" VALUE="0" /&gt;
    &lt;block id="1012" type="param_setvalue" x="831" y="272" w="318" PARAM="[root, TES-8643 (Frame MCR slot 12), Config, GPIO Override, Level (0x1310)]" VALUE="1" /&gt;
    !!*/
    /*!!&lt;checksum&gt;f5c62e3f9b168a0715c6797dbb3518be&lt;/checksum&gt;!!*/</task>
    </param>
    <label height="35" left="454" name="GPIO Overide" style="txt-align:center" top="43" width="127"/>
    </abs>

    Would my problem be the objectid=50199493011? How can I find the objectid of the TES card's GPIO Override?
    Could you help me on how to make the right changes to use it with the other board?

    Thanks in advance,
    Giovani Costa

    ------------------------------
    Giovani Costa
    Support technician
    Alliance Technologies
    ------------------------------



  • 8.  RE: Crosspoints Status

    Ross Staff
    Posted 04-15-2022 16:50
    Hi Giovani,

    I assume got the TES context into your panel by using "Add Device from basic tree" in the visual logic, unfortunately I don't have a TES card to test against but I can say that the object ID you have identified isn't the problem if that's how you got it. This is the object ID of the context, you should think of this as the ID of the device, this would be unique to that device within your panel. The parameter oid you would control will be the same across all devices of the same type.
    so if we look at getParam we see it's defined like this:
    params.getParam (Context ID, OID, Index);
    The context ID is the id in your panel for the specific device. Next is the OID which is the parameter within the device. That parameter is what you need, I believe that 0x1310 is the wrong oid.

    e.g in my example I used this line to get some info from the ultrix

    var sourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();

    if I tidy it to just look at the getParam and get rid of the variables I have:

    params.getParam("Ultrix.1", 'params.statusByDestination.0.inputstatus', levelIndex)

    Ultrix.1 - is the context. When I tested the panel above in my system I edited the object id for the Ultrix.1 context to match the ultrix in my system, then I changed it back to yours before posting but I left the oid of the param the same 'params.statusByDestination.0.inputstatus'.

    params.statusByDestination.0.inputstatus - is the oid of the parameter, it's the same in every ultrix and looks at the dest 0 input status . This is what you will need to find for the GPIO control on your TES card.



    ------------------------------
    Daniel Bailey
    Solutions Architect - Hyperconverged Solutions
    Ross Video
    ------------------------------



  • 9.  RE: Crosspoints Status

    Posted 12-07-2023 03:00

    @Daniel Bailey

    I'm attempting to use this code for a similar project but have run into a couple issues I'm hoping you can help with. For context, this is to add crosspoint status to a custom Dashboard panel for a 2U Ultritouch.

    When I first load the panel it will retrieve the correct source name for the given destination (destIndex 15 in my case), but will not update when new crosspoint changes are made (from that panel or from others). Any idea why the listener wouldn't be working or the label isn't being changed? I just realized you wrote some debug into the code, so I'll have to check that and see if I'm getting any responses on the listener.

    Secondarily, any issues you can think of with setting this up several times on the same panel to monitor multiple destinations? I attempted to write new variable names for a second instance (copy and paste the code, then modify the variable names) and the second instance wouldn't work at all; I'm guessing I missed updating a few names along the way, but wanted to confirm this should even be possible.

    My coding skills are pretty modest; I'm doing my best to deconstruct/reconstruct the panel where needed, but I could definitely be doing some things wrong.



    ------------------------------
    Garrett Strudler
    Freelancer
    OR, United States
    ------------------------------



  • 10.  RE: Crosspoints Status

    Ross Staff
    Posted 12-12-2023 06:58

    Hi Garrett,

    I've just tried running this against the latest Ultrix code and all seems to be working correctly. I also tried changing the dest indices and running a couple of instances on the same dashboard instance, both were working correctly. If you'd like to drop your panel code in here I'll have a look at it and try running it in my system.

    Thanks

    Dan



    ------------------------------
    Daniel Bailey
    Solutions Architect - Hyperconverged Solutions
    Ross Video
    ------------------------------



  • 11.  RE: Crosspoints Status

    Posted 12-14-2023 18:32

    Hi @Daniel Bailey, sorry for the delay. Here's what I've got currently for a single listener along with some buttons that trigger salvos. The listener gets the correct source upon launching the panel the first time on the Ultritouch, but does not track changes after that.

    <abs contexttype="opengear" gridaspect="true" gridheight="285" gridwidth="1920" keepalive="false" objectid="Ultrix-50295026006&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix" subscriptions="true" touch="true" virtualheight="259" virtualwidth="1743">
       <meta>
          <context contexttype="opengear" id="Ultriscape.1" objectid="Ultrix-50295026006&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape" subscriptions="false"/>
          <context contexttype="opengear" id="Ultrix.1" objectid="Ultrix-50295026006&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix" subscriptions="true"/>
          <context contexttype="opengear" id="Carbonite.1" objectid="Carbonite 00:0F:9B:04:EF:46&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" subscriptions="false"/>
          <context contexttype="opengear" id="Ultritouch Device.1" objectid="Ultritouch-827F21C666&lt;br&gt;Slot 0&lt;br&gt;Ultritouch Device" objecttype="Ultritouch Device" subscriptions="true">
             <meta>
                <subscription oids="open.file"/>
             </meta>
          </context>
       </meta>
       <button buttontype="push" colspan="1" fill="both" height="110" id="BCAST" left="400" name="&lt;html&gt;&lt;center&gt;WEB+REC:&lt;br/&gt;BROADCAST&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#red;" top="64" weightx="1.0" weighty="1.0" width="110">
          <task tasktype="ogscript">/*! block id=1001 !*/
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    multi1.setValue('params.salvostatus.' + 0 + '.active', 0,1);
    multi1.execute();
    /*!!
     &lt;block id="1001" type="Ultrix.1_ultix_recallsalvo" x="74" y="98" w="243" SALVO="0" /&gt;
    !!*/
    /*!!&lt;checksum&gt;8b90217e6b9717223da582daefb76898&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="110" id="FOH" left="600" name="&lt;html&gt;&lt;center&gt;WEB+REC:&lt;br/&gt;FOH&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#red;" top="64" weightx="1.0" weighty="1.0" width="110">
          <task tasktype="ogscript">/*! block id=1001 !*/
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    multi1.setValue('params.salvostatus.' + 1 + '.active', 0,1);
    multi1.execute();
    /*!!
     &lt;block id="1001" type="Ultrix.1_ultix_recallsalvo" x="74" y="98" w="243" SALVO="1" /&gt;
    !!*/
    /*!!&lt;checksum&gt;ba312e458ee0218764eafd58e7e9a0de&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="110" id="SLIDES" left="800" name="&lt;html&gt;&lt;center&gt;WEB ONLY:&lt;br/&gt;SLIDES&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#orange;" top="64" weightx="1.0" weighty="1.0" width="110">
          <task tasktype="ogscript">/*! block id=1001 !*/
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    multi1.setValue('params.salvostatus.' + 2 + '.active', 0,1);
    multi1.execute();
    /*!!
     &lt;block id="1001" type="Ultrix.1_ultix_recallsalvo" x="74" y="98" w="243" SALVO="2" /&gt;
    !!*/
    /*!!&lt;checksum&gt;0439d11218973fc6dbee221c956c7b64&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="110" id="SS4" left="1000" name="&lt;html&gt;&lt;center&gt;WEB ONLY:&lt;br/&gt;SWITCHER SS4&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#orange;" top="64" weightx="1.0" weighty="1.0" width="110">
          <task tasktype="ogscript">/*! block id=1001 !*/
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    multi1.setValue('params.salvostatus.' + 3 + '.active', 0,1);
    multi1.execute();
    /*!!
     &lt;block id="1001" type="Ultrix.1_ultix_recallsalvo" x="74" y="98" w="243" SALVO="3" /&gt;
    !!*/
    /*!!&lt;checksum&gt;04610868417e19e22e23a13d5ff98e8c&lt;/checksum&gt;!!*/</task>
       </button>
       <ext baseurl="file:/Users/verendus/Documents/Ross%20Video/SmartScope%20Control.grid" bottom="9" id="SCOPES" left="1620" name="SCOPES" objectid="SmartScope%20Control.grid" style="bdr#panelfg;bg#purple;bdr:line;" top="10" width="100"/>
       <button buttontype="push" colspan="1" fill="both" height="110" id="SCREENS" left="100" name="&lt;html&gt;&lt;center&gt;SCREENS:&lt;br/&gt;NORMAL&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#selectbg;" top="64" weightx="1.0" weighty="1.0" width="110">
          <task tasktype="ogscript">/*! block id=1001 !*/
    var panelid = ogscript.getString("Ultrix.1" + "_panelID");
    if (panelid == null) {
      panelid = 1999;
    }
    var multi1 = params.createMultiSet("Ultrix.1");
    multi1.setValue('params.statusByDestination.0.lockowner',0,panelid);
    multi1.setValue('params.salvostatus.' + 3 + '.active', 0,1);
    multi1.execute();
    /*!!
     &lt;block id="1001" type="Ultrix.1_ultix_recallsalvo" x="74" y="98" w="243" SALVO="3" /&gt;
    !!*/
    /*!!&lt;checksum&gt;04610868417e19e22e23a13d5ff98e8c&lt;/checksum&gt;!!*/</task>
       </button>
       <meta>
          <params>
             <param access="1" maxlength="0" name="SourceName" oid="SourceName" type="STRING" value="WEB PGM" widget="label"/>
          </params>
       </meta>
       <meta>
          <ogscript handles="onload" name="DestListener" targetid="_top">var destIndex=15;
    var levelIndex=0;

    /* First time SourceName label set*/
    ogscript.debug('First time SourceName set');

    var sourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var sourceName = params.getParam("Ultrix.1", 'params.sources.' + sourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, sourceName);

    /*Listener for future changes*/
    ogscript.debug('Creating listener');

    var oidString = 'params.statusByDestination.' + destIndex + '.inputstatus';

    var paramObj = params.getParam('Ultrix.1',oidString, 0);

    var listenerObj = paramObj.addParamListener( function(param, changedIndex)
    {

    ogscript.debug('xpt change callback');

    if (changedIndex == levelIndex)
    {
    ogscript.debug('Level is of interest, updating SourceName label');

    var newSourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var newSourceName = params.getParam("Ultrix.1", 'params.sources.' + newSourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, newSourceName);
    }

    }, true);</ogscript>
       </meta>
       <meta>
          <context contexttype="opengear" id="Ultriscape.1" objectid="Ultrix-50295026006&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape" subscriptions="false"/>
          <context contexttype="opengear" id="Ultrix.1" objectid="Ultrix-50295026006&lt;br&gt;Slot 0&lt;br&gt;Ultrix" objecttype="Ultrix" subscriptions="true">
             <meta>
                <subscription oids="params.statusByDestination,params.sources"/>
             </meta>
          </context>
       </meta>
       <param expand="true" height="43" left="480" oid="SourceName" style="bg#27305D;txt-align:center;" top="200" width="150"/>
       <label height="24" left="422" name="Current:" style="txt-align:west" top="208" width="65"/>
    </abs>



    ------------------------------
    Garrett Strudler
    Freelancer
    OR, United States
    ------------------------------



  • 12.  RE: Crosspoints Status

    Ross Staff
    Posted 12-15-2023 08:10

    Hi Garrett,

    It may be as simple as ensuring that the Ultrix has been added as a connected device in the Ultritouch.

    If that alone doesn't solve it then try this version, there are 3 things to be aware of:

    1. I'm using IP addresses in the context to avoid any issue that the Ultritouch could be having with the node ID as this seemed to cause me issues some time in the past 
    2. this is for an Ultrix FR5, for an FR1 or FR2 you'll need to delete the trailing "-5ru" in the context of the Ultrix

    <context contexttype="opengear" id="Ultrix.1" objectid="10.75.6.100:5254&lt;br&gt;Slot 0&lt;br&gt;Ultrix-5ru" objecttype="Ultrix" subscriptions="true"

    3. I've used RossTalk commands in the salvo buttons as I tend to find this more robust. "GPI 01" is the RossTalk command for salvo 1. These also target the frame by the IP address so you'll need to set the right IP there too.

    <abs contexttype="opengear" gridaspect="true" gridheight="285" gridwidth="1920" keepalive="false" touch="true" virtualheight="303" virtualwidth="2039">
       <meta>
          <params>
             <param access="1" maxlength="0" name="SourceName" oid="SourceName" type="STRING" value="Program" widget="label"/>
          </params>
          <context contexttype="opengear" id="Ultriscape.1" objectid="10.75.6.100:5254&lt;br&gt;Slot 1&lt;br&gt;Ultriscape" objecttype="Ultriscape" subscriptions="false"/>
          <context contexttype="opengear" id="Ultrix.1" objectid="10.75.6.100:5254&lt;br&gt;Slot 0&lt;br&gt;Ultrix-5ru" objecttype="Ultrix" subscriptions="true">
             <meta>
                <subscription oids="params.statusByDestination,params.sources"/>
             </meta>
          </context>
          <context contexttype="opengear" id="Carbonite.1" objectid="Carbonite 00:0F:9B:04:EF:46&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" subscriptions="false"/>
          <context contexttype="opengear" id="Ultritouch Device.1" objectid="Ultritouch-827F21C666&lt;br&gt;Slot 0&lt;br&gt;Ultritouch Device" objecttype="Ultritouch Device" subscriptions="true">
             <meta>
                <subscription oids="open.file"/>
             </meta>
          </context>
          <ogscript handles="onload" name="DestListener" targetid="_top">var destIndex=15;
    var levelIndex=0;
    
    /* First time SourceName label set*/
    ogscript.debug('First time SourceName set');
    
    var sourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var sourceName = params.getParam("Ultrix.1", 'params.sources.' + sourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, sourceName);
    
    /*Listener for future changes*/
    ogscript.debug('Creating listener');
    
    var oidString = 'params.statusByDestination.' + destIndex + '.inputstatus';
    
    var paramObj = params.getParam('Ultrix.1',oidString, 0);
    
    var listenerObj = paramObj.addParamListener( function(param, changedIndex)
    {
    
    ogscript.debug('xpt change callback');
    
    if (changedIndex == levelIndex)
    {
    ogscript.debug('Level is of interest, updating SourceName label');
    
    var newSourceIndex = params.getParam("Ultrix.1", 'params.statusByDestination.' + destIndex + '.inputstatus', levelIndex).getValue();
    var newSourceName = params.getParam("Ultrix.1", 'params.sources.' + newSourceIndex + '.name', 0).getValue();
    params.setValue('SourceName', 0, newSourceName);
    }
    
    }, true);</ogscript>
       </meta>
       <button buttontype="push" colspan="1" fill="both" height="129" id="BCAST" left="468" name="&lt;html&gt;&lt;center&gt;WEB+REC:&lt;br/&gt;BROADCAST&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#red;" top="75" weightx="1.0" weighty="1.0" width="128">
          <task tasktype="ogscript">/*! block id=1008 !*/
    rosstalk.sendMessage("10.75.6.100", 7788, "GPI 00\r\n", null);
    /*!!
     &lt;block id="1008" type="ogscript_sendtcpstring" x="167" y="371" w="318" HOST="10.75.6.100" PORT="7788" STRING="GPI 00\r\n" CALLBACK="null" /&gt;
    !!*/
    /*!!&lt;checksum&gt;323760aa03500d8f9020eab963730b88&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="129" id="FOH" left="702" name="&lt;html&gt;&lt;center&gt;WEB+REC:&lt;br/&gt;FOH&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#red;" top="75" weightx="1.0" weighty="1.0" width="128">
          <task tasktype="ogscript">/*! block id=1008 !*/
    rosstalk.sendMessage("10.75.6.100", 7788, "GPI 01\r\n", null);
    /*!!
     &lt;block id="1008" type="ogscript_sendtcpstring" x="167" y="371" w="318" HOST="10.75.6.100" PORT="7788" STRING="GPI 01\r\n" CALLBACK="null" /&gt;
    !!*/
    /*!!&lt;checksum&gt;f8369a68e9ebb268f96baea27a9efc16&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="129" id="SLIDES" left="936" name="&lt;html&gt;&lt;center&gt;WEB ONLY:&lt;br/&gt;SLIDES&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#orange;" top="75" weightx="1.0" weighty="1.0" width="128">
          <task tasktype="ogscript">/*! block id=1008 !*/
    rosstalk.sendMessage("10.75.6.100", 7788, "GPI 02\r\n", null);
    /*!!
     &lt;block id="1008" type="ogscript_sendtcpstring" x="167" y="371" w="318" HOST="10.75.6.100" PORT="7788" STRING="GPI 02\r\n" CALLBACK="null" /&gt;
    !!*/
    /*!!&lt;checksum&gt;0e6d9b948f9e0b141dc068c784ed9326&lt;/checksum&gt;!!*/</task>
       </button>
       <button buttontype="push" colspan="1" fill="both" height="129" id="SS4" left="1170" name="&lt;html&gt;&lt;center&gt;WEB ONLY:&lt;br/&gt;SWITCHER SS4&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#orange;" top="75" weightx="1.0" weighty="1.0" width="128">
          <task tasktype="ogscript">/*! block id=1008 !*/
    rosstalk.sendMessage("10.75.6.100", 7788, "GPI 03\r\n", null);
    /*!!
     &lt;block id="1008" type="ogscript_sendtcpstring" x="167" y="371" w="318" HOST="10.75.6.100" PORT="7788" STRING="GPI 03\r\n" CALLBACK="null" /&gt;
    !!*/
    /*!!&lt;checksum&gt;61ec73e5fa4719d353678ade6e654aa8&lt;/checksum&gt;!!*/</task>
       </button>
       <ext baseurl="file:/Users/verendus/Documents/Ross%20Video/SmartScope%20Control.grid" bottom="10" id="SCOPES" left="1895" name="SCOPES" objectid="SmartScope%20Control.grid" style="bdr#panelfg;bg#purple;bdr:line;" top="12" width="117"/>
       <button buttontype="push" colspan="1" fill="both" height="129" id="SCREENS" left="117" name="&lt;html&gt;&lt;center&gt;SCREENS:&lt;br/&gt;NORMAL&lt;/center&gt;&lt;/html&gt;" rowspan="1" style="bdr#panelfg;bdr:line;bg#selectbg;" top="75" weightx="1.0" weighty="1.0" width="128">
          <task tasktype="ogscript">/*! block id=1008 !*/
    rosstalk.sendMessage("10.75.6.100", 7788, "GPI 03\r\n", null);
    /*!!
     &lt;block id="1008" type="ogscript_sendtcpstring" x="167" y="371" w="318" HOST="10.75.6.100" PORT="7788" STRING="GPI 03\r\n" CALLBACK="null" /&gt;
    !!*/
    /*!!&lt;checksum&gt;61ec73e5fa4719d353678ade6e654aa8&lt;/checksum&gt;!!*/</task>
       </button>
       <param expand="true" height="51" left="562" oid="SourceName" style="bg#27305D;txt-align:center;" top="234" width="175"/>
       <label height="28" left="493" name="Current:" style="txt-align:west" top="243" width="76"/>
    </abs>
    



    ------------------------------
    Daniel Bailey
    Solutions Architect - Hyperconverged Solutions
    Ross Video
    ------------------------------



  • 13.  RE: Crosspoints Status

    Posted 12-18-2023 21:14

    Great, thank you for this. Thanks for the update on the salvos as well; they have been intermittent in use, and oddly enough I was just talking to someone else (Jason Tait) about salvos from Dashboard and he also recommended using the RossTalk GPI command instead.

    Took me a while to figure out why I still was not getting name updates and I ended up just commenting out the line looking for changedIndex and now it works. This is on an FR2 so I don't know if something is different enough to the FR5 that the variables ahead of it were causing it to not read the same as levelIndex and therefore the rest of the code wasn't running. In this case I really only care about the video level (level 1 on the Ultrix, level 0 in the code) so having it always looking at that should suffice.



    ------------------------------
    Garrett Strudler
    Freelancer
    OR, United States
    ------------------------------