Facility Control

 View Only
  • 1.  XPression Control From Parameter.

    Posted 01-31-2018 23:42
    Hello,

    I have an integer parameter and a button that brings a TakeID Online in Expression. What i would like to do is have the integer parameter set this TakeID, and am wondering how to accomplish this.


  • 2.  RE: XPression Control From Parameter.

    Posted 02-01-2018 15:41

    Here is an example that ties a numeric parameter to the XPresssion take command:

    <abs contexttype="opengear">
       <meta>
          <lookup id="hosts">
             <entry key="XPression.scriptport">false</entry>
             <entry key="XPression.color">-1145302</entry>
             <entry key="XPression.port">7788</entry>
             <entry key="XPression.host">params.getValue('XPression_IPAddress', 0)</entry>
             <entry key="XPression.scripthost">true</entry>
             <entry key="XPression.devicetype">XPression</entry>
          </lookup>
          <params>
             <param access="1" constraint="0.0;100000.0;0.0;100000.0;1" constrainttype="INT_STEP_RANGE" name="Take ID" oid="Take_ID" precision="0" type="INT32" value="0" widget="spinner"/>
             <param access="1" maxlength="0" name="XPression_IPAddress" oid="XPression_IPAddress" type="STRING" value="192.168.1.150" widget="default"/>
          </params>
       </meta>
       <param expand="true" height="57" left="19" oid="Take_ID" top="17" width="207"/>
       <button buttontype="push" height="64" left="234" name="Take" style="bg#FA0505;" top="16" width="194">
          <task tasktype="ogscript">
    
    
    /*! block id=1037,1038 !*/
    rosstalk.sendMessage(params.getValue('XPression_IPAddress', 0), parseInt(ogscript.getPrivateString('hosts', 'XPression.port')), "TAKE " + params.getValue('Take_ID', 0) + ":" + (1 -1) + ":" + 1);
    /*!!
     &lt;block id="1037" type="XPression_xpression_take" x="292" y="22" w="243" color="#ee862a" TAKEID="ID:1038" BUFFER="1" LAYER="1" /&gt;
    &lt;block id="1038" type="param_Take ID (Take_ID)[0]" x="18" y="24" w="243" SET="" /&gt;
    !!*/
    /*!!&lt;checksum&gt;bbb099390c8844a363985161320221d3&lt;/checksum&gt;!!*/</task>
       </button>
       <label height="51" left="21" name="XPression IP: " style="txt-align:east" top="104" width="112"/>
       <param expand="true" height="59" left="136" oid="XPression_IPAddress" top="102" width="292"/>
    </abs>

    #DashBoard


  • 3.  RE: XPression Control From Parameter.

    Posted 02-01-2018 17:37
    Thanks, that worked perfectly.
    #DashBoard


  • 4.  RE: XPression Control From Parameter.

    Posted 02-01-2018 18:11
    We aim to please :)
    #DashBoard