Facility Control

 View Only
  • 1.  Routing in custompanels. (syntax error?)

    Posted 05-21-2015 10:35
    Hi,

    I`ve created a custompanel which does a bunch of routing to the switcher input.

    Since then we have recieved a second switcher and now I want to be able to change one parameter to do routing into the second switcher if that is the option selected.

    By setting 'x' (0x4) to the value `24` I should be able to do routing to input 168, 169 and so on... For some reason this doesn`t route anything when adding + 'x' to the task. I've tried both with and without


  • 2.  RE: Routing in custompanels. (syntax error?)

    Posted 05-21-2015 13:53

    The way you have it coded, x is being treated as a String.

    What you're looking for is treating x as a variable. Also, I'm not sure what the data type of param 0x4 is but I assume it is an INT16 or INT32 - it certainly must be for this to work.

    I'm not sure what the 1000 is for but that looks like a syntax issue to me.

    `

    var IPaddress = params.getValue(0x1,0);

    var x = params.getValue(0x4,0);

    rosstalk.sendMessage(IPaddress, 7788, 'LOADSET LaLiga');

    //1000 - Don't know what this is for

    nk.doSwitch(144 + x, 4, 1);

    nk.doSwitch(145 + x, 1, 1);

    nk.doSwitch(146 + x, 5, 1);

    nk.doSwitch(147 + x, 10, 1);

    nk.doSwitch(148 + x, 44, 1);

    nk.doSwitch(149 + x, 46, 1);

    nk.doSwitch(150 + x, 76, 1);

    nk.doSwitch(151 + x, 77, 1);

    nk.doSwitch(152 + x, 68, 1);

    nk.doSwitch(153 + x, 69, 1);

    nk.doSwitch(154 + x, 19, 1);

    nk.doSwitch(155 + x, 20, 1);

    nk.doSwitch(156 + x, 21, 1);

    nk.doSwitch(157 + x, 22, 1);

    nk.doSwitch(158 + x, 74, 1);

    nk.doSwitch(159 + x, 75, 1);

    nk.doSwitch(160 + x, 11, 1);

    nk.doSwitch(161 + x, 12, 1);

    nk.doSwitch(162 + x, 13, 1);

    nk.doSwitch(163 + x, 14, 1);

    nk.doSwitch(164 + x, 15, 1);

    nk.doSwitch(165 + x, 16, 1);

    nk.doSwitch(166 + x, 17, 1);

    nk.doSwitch(167 + x, 18, 1);

    `

    #DashBoard


  • 3.  RE: Routing in custompanels. (syntax error?)

    Posted 06-02-2015 16:05
    Hi James,

    I've removed the "x" marks and it still doesn't work. Yes, 0x4 is a INT32...

    The 1000 is a pause, but for some reason this commentfield removed the coding...

    #DashBoard


  • 4.  RE: Routing in custompanels. (syntax error?)

    Posted 06-04-2015 13:43
    Is it doing any of the switches at all?

    The other common issue is that throttling the switch commands is necessary - doing this many back-to-back without pausing would likely cause some congestion/collisions.

    For debugging purposes, can you remove all but the first switch request?

    #DashBoard


  • 5.  RE: Routing in custompanels. (syntax error?)

    Posted 06-11-2015 14:49

    For testing purposes the button task now looks like this:

    var IPaddress = params.getValue(0x1,0);
    var x = params.getValue(0x4,0);
    rosstalk.sendMessage(IPaddress, 7788, 'LOADSET LaLiga');
    1000
    nk.doSwitch(144 + x, 1, 1);

    When removing x and replacing it with the number 24 it works fine. But when using variable x, which points to and INT32 with the value of 24, it doesn't work. Ideas?


    #DashBoard


  • 6.  RE: Routing in custompanels. (syntax error?)

    Posted 06-11-2015 18:23
    Hi Tobias.

    At this point it might be easier if you just send me your entire *.grid file and let me take a look at everything in context.

    jpeltzer@rossvideo.com

    #DashBoard