Hi! We have 15 Cobalt 9905-MPx on our truck. Each card has 4 Paths of UDX. I am working on a script to change the output resolution of every path on all cards to a specific resolution when we are changing formats for the truck for a new show.
I have been successful in creating a script that will change all 4 paths on 1 card, however I am having trouble getting my script to change multiple cards to work. It seems like the root issue is that the script is going too fast for the cards.
In order to change the resolution on these cards, you first need to select the "Path" parameter, and then change the "Requested Output Format" to a resolution. My theory is that there is not enough time between these two setvalues. We have tried to work around this by nesting the set output resolution within a if/else/break loop that verifies that the path has changed.
We have been staring at this script and have not come up with anything glaring we can find. Was wondering if anyone here with more experience with OGScript can find what we are doing wrong.
Thanks!!
// Switch all paths on multiple Cobalt 9905s to 1080P
// Written by Evan Aaron and Andrew McManus
// 10-28-2022
//OIDs:
// Path Select 0x1300
// Path 1 Custom Name 0x1302
// Path 2 Custom Name 0x1303
// Path 3 Custom Name 0x1304
// Path 4 Custom Name 0x1305
// Requested Output Format 0x1782
// Output Format 0x1783
var _newRES = "1920x1080p 59.94 A";
var ids = ['00:23:02:07:C3:C7<br>Slot 2<br>9905-MPx', '00:23:02:07:C3:C7<br>Slot 6<br>9905-MPx' ] // Store Node IDs of all cards, to be expanded to all 15 cards afer testing
var paths = ['0x1302', '0x1303', '0x1304', '0x1305'] //Store CustomPath Naming OIDs
var curPath = 'START';
for (i=0;i< ids.length; i++) // Iterate over 9905 Cards
{
for (k=0;k< paths.length; k++) // Iterate over each of the 4 paths on 9905s
{
ogscript.debug("K: " + paths[k] + " " + k);
params.getParam(ids[i], '0x1300', 0).setValue(params.getParam(ids[i], paths[k], 0).getValueAsString()); //Get CustomPath name for Path k and set Path select to that path
curPath = params.getParam(ids[i], paths[k],0).getValueAsString();
// Check to see if the Path Select was actually changed
var cont = false;
while(cont == false){
ogscript.debug("SWITCHED PATH: " + params.getParam(ids[i], '0x1300', 0).getValueAsString());
ogscript.debug("CURPATH: " + curPath);
if (params.getParam(ids[i], '0x1300', 0).getValueAsString() != curPath){
ogscript.debug("OUTPUT FORMAT: " + params.getParam(ids[i], '0x1783', 0).getValueAsString())
ogscript.debug(params.getParam(ids[i], '0x1783', 0).getValueAsString() === _newRES)
params.getParam(ids[i], '0x1782', 0).setValue(_newRES); // If the Path was changed, change Requested Output format to 1080P
cont = true;
break;
}
else {
params.getParam(ids[i], '0x1300', 0).setValue(params.getParam(ids[i], paths[k], 0).getValueAsString()); // If the path was not changed, try and change it again
ogscript.debug("ELSE");
}
}
}
}
------------------------------
Evan Aaron
Engineer
Game Creek Video
------------------------------