Facility Control

 View Only
  • 1.  Display Live Data on Dashboard Button

    Posted 02-28-2019 00:26
    Hi All, searched through the forums but couldn't find what I was looking for. Hoping someone can point me in the right direction?

    In short - I am looking to display live data on a dashboard button. The purpose is to inform the operator that a new live statistic is available to display.

    Further details - I have data currently being displayed in my scenes in Xpression via Datalinq and an external XML. The scenes automatically update with the latest data. However I want to prompt the operator by having the text on a dashboard button also update to display the latest stat. I am looking to do this by either accessing the Datalinq XML directly, or if that is impossible, I can access the "Stat Output" text box in the scene which displays the desired stat, and somehow have that text also display in my button.

    Any help would be greatly appreciated!


  • 2.  RE: Display Live Data on Dashboard Button

    Posted 02-28-2019 02:52
    Have you looked at the onchange handler? It may do what you're looking for. I asked about it in relation to monitoring an Ultrix router a couple days ago and @jamespeltzer gave me a couple of code options for using it. I haven't had a chance to implement yet but maybe those code examples will lead you where you need to go.
    #DashBoard


  • 3.  RE: Display Live Data on Dashboard Button

    Posted 02-28-2019 21:07

    You can also use the new XP plugin in dashboard (if you're using a recent DB build, like 8.4 or later and you have the right license on the XP studio dongle).

    With the plugin, you have access to all the published fields of your XP from within you dashboard panel.

    To make a button that changes its text when a published field changes I would do the following:

    1. Create a new panel.
    2. Add your XP to the DashBoard Basic Tree View
    - Click on the green plus, and pick New XPression. Type in the IP Address and give it a name in the next screen. It should now show up in the XPression tree in your basic tree view.


    3. Point your panel (or an abs within the panel) to that XP:
    - In panel builder mode, double click anywhere that is empty.
    - Select the top level abs
    - Configure the openGear or XPression Datalinq connection
    - Select the XP you just added in step 2

    4. That will give you access to all the published fields from your XP. Let's add one to your panel
    -In panel builder mode, select to drop a parameter in the abs.
    -Drag and drop somewhere in your panel to drop the parameter
    -In the parameter popup, you can search for "publish" or for the takeID of the item you care about. That will filter down the parameter to make it easier to find what you want.
    -Pick the one you care about, and you should now see it in your panel.


    5. Create a button, and give it an ID like "buttonToChange"


    6. Double click on the parameter you added, and add the following task to it.
    -- In Visual Logic, you can find the same parameter by searching for the takeID or "publish" in the search bar.
    -- Rename will rename your button to what the published field value is.

    This will only trigger when the value of your published field changes.



    If you prefer to not use Visual Logic, you can use the following ogscript instead:

    ogscript.rename("buttonToChange", params.getValue('xprn.publishedfields.take6102.HOM ESTAT.text', 0));

    That should do it. Any time the published field changes, your button name changes.


    #DashBoard


  • 4.  RE: Display Live Data on Dashboard Button

    Posted 03-04-2019 23:40
    Thank you very much @bgatien, that is exactly the kind of process I was looking for to get this working. I really appreciate the detail in your response, it has worked perfectly.
    #DashBoard