Facility Control

 View Only
  • 1.  Dashboard tally

    Posted 04-27-2023 13:50
      |   view attached

    I want to have a dot color that follows a tally from an Acuity.  I have the tally setup in Dashboard services and can see that the ID i want is 14.  I know that I will need to use some OG script to get the tally state, but I have almost no coding experience and don't know how to set up this up.  Is there a way in V logic to do this or can someone give me some example code (hopefully with documentation on the values I need to change.




    ------------------------------
    Josh Udvig
    Production Manager
    MSE
    ------------------------------


  • 2.  RE: Dashboard tally

    Posted 08-09-2023 13:59

    Hi Josh, sorry for the late response.

    The tally service can be interacted with easily via script or parameters can be used out of the tally DashBoard Service device. The first option is more difficult to do without any coding experience. 

    For the second method, the parameters to display any given tally ID in DashBoard does not exist until the first update is received. Due to this, it is better to use the following script to check/force the parameters to exist.

    <api immediate="true">

    function checkAndCreate(tallyID)

    {

             if (params.getParam('params.tallystates.tally' + (tallyID + 1) + '.red_right', 0) == null)

            {

               tallyservice.setTallyState((tallyID + 1), '', false, false, false, false, 0);

            }

    }

    checkAndCreate(1);

    </api>

    Here's a source example for a simple grid that demonstrates a tally view

    <param contextid="db-tally" editable="false" expand="true" height="137" left="48" oid="params.simpletally.tally2.right" showlabel="false" top="41" width="270"/>



    ------------------------------
    Kiran Adhikari
    ------------------------------