Facility Control

 View Only
  • 1.  Dashboard button release

    Posted 10-25-2015 22:12
    Hi everyone,

    I'm looking for a solution to release buttons on a crosspoint in dashboard when I select an alternate input - would this be based around choice constraints? I understand logically how it can be done, i'm just not so familiar with the required syntax. Does someone have an example panel or code to demonstrate?

    many thanks.


  • 2.  RE: Dashboard button release

    Posted 10-26-2015 15:55

    Hi Andy.

    I'm going to need to clarify a few things from you before I can properly answer your question.

    1. What are the buttons in DashBoard that you're trying to "release" (what do they do)?

    2. When you say "release", are you talking about switching the state of a toggle button?

    3. So you would like to change the state of these buttons based on state changes from the router?

    The NK Router custom panel scripting and tags is somewhat basic. To add parameters to one of these panels, you need to jump through a few hoops to create an NK custom panel that also contains an internal data source (they are two different types of custom panels but, luckily for us, they can be nested).

    Here are some basics that might help get you started:

    `
    One

    Two

    Three

    Four


    var statChangeEvent = event;

    ogscript.debug('CHANGED SOURCE: ' + statChangeEvent.getSrcAddress());

    ogscript.debug('CHANGED DEST: ' + statChangeEvent.getChangedOutput());

    ogscript.debug('LEVEL MASK: ' + statChangeEvent.getChangedLevels());

    ogscript.debug(this.getValue());

    `

    #DashBoard


  • 3.  RE: Dashboard button release

    Posted 10-26-2015 21:43
    Thanks James, its actually for crosspoints on a Carbonite frame, and yes I'm wanting to change the toggle state based on the state of the frame - I'm assuming the same logic applies? I'll play around with the above and see what I come up with.

    cheers.

    #DashBoard


  • 4.  RE: Dashboard button release

    Posted 10-28-2015 15:57
    Hi Andy.

    It's a bit of a different approach when dealing with a Carbonite as a Carbonite is already a DashBoard Connect device. You have access to parameters for the selected crosspoint on each ME and can attach tasks to those parameters to run scripts as desired.

    This means you can avoid the nested contexts where there was an internal data source and an nk-router data source. You should just be able to point the entire panel at the Carbonite. You also can add additional parameters to the panel the same way you see in my example.

    Good luck! If you run into a few snags, just post again and we'll try to get you sorted out.

    #DashBoard


  • 5.  RE: Dashboard button release

    Posted 11-04-2015 00:36
    Thanks James. Using your example above, how would I insert task strings into individual toggle buttons and have them toggle according to other selections in the group?

    Example:

    Key="0" I want to execute rosstalk.sendMessage('192.168.0.3',24610,"DoEvent=15");

    Key="1" I want to execute rosstalk.sendMessage('192.168.0.3',24610,"DoEvent=16"); and have the toggle status of key 0 change as per your example above. Whenever I add task in dashboard, it attaches the string to all the buttons.

    Hopefully that makes sense.

    many thanks.

    #DashBoard


  • 6.  RE: Dashboard button release

    Posted 11-04-2015 14:58

    If it's a radio toggle button parameter, you can do a switch or an if statement inside of your task.

    `
    switch (this.getValue())

    {

    case 0:

    rosstalk.sendMessage('192.168.0.3"²,24610,"�DoEvent=15"³);

    break;

    case 1:

    rosstalk.sendMessage('192.168.0.3"²,24610,"�DoEvent=16"³);

    break;

    }

    `

    #DashBoard


  • 7.  RE: Dashboard button release

    Posted 11-04-2015 14:59

    And now with fixed quotes:

    `

    switch (this.getValue())

    {

    case 0:

    rosstalk.sendMessage('192.168.0.3',24610,'DoEvent=15');

    break;

    case 1:

    rosstalk.sendMessage('192.168.0.3',24610,'DoEvent=16');

    break;

    }

    `

    #DashBoard