Facility Control

 View Only
  • 1.  range constraint problem

    Posted 06-06-2016 15:39
    I have created a range constraint to have a display range from -2200 to +2200 as shown below
    <constraint constraint="30568;34968;-2200;2200;1" id="num.genlockH" constrainttype="INT_STEP_RANGE" percision="0"/>

    I then used this constraint in a spinner box
    <param oid="0x100D" colspan="1" expand="true" fill="both" insets="2,5,2,0" constrainttype="ID_REFERENCE" constraint="num.genlockH" widget="5" width="180" height="20" />

    As I increment from -2200 I get the correct values until I get to zero then the display jumps back to -2200. If I try to enter a positive number (+200) the display again jumps back to -2200 but I get the proper value sent to my board (32968).

    "‹Any ideas on what I am doing wrong?


  • 2.  RE: range constraint problem

    Posted 06-06-2016 17:59
    You wouldn't happen to be using an INT16 parameter for this, would you?
    The way your example is working, it would require an INT32 to work properly as an INT16 can only go from -32768 to + 32767 and the zero-point would be 32768.

    As an aside, is there a reason you are using the ID_REFERENCE to override your constraint? Whenever possible, the constraint built into the parameter should be used and kept up-to-date. The overrides should [I]generally [/I]not be necessary in the UI.


    #DashBoard


  • 3.  RE: range constraint problem

    Posted 06-06-2016 18:32
    Thanks for the answer.

    e are using a OGLML file to fully define the layout in dashboard. The OID descriptions that are sent by the board have minimal information and then the we attach the constraints in the OGLML.
    #DashBoard


  • 4.  RE: range constraint problem

    Posted 06-07-2016 13:56
    If possible, I would strongly recommend making your constraints part of your parameters themselves rather than relying on overrides at the UI layer. There are other aspects of DashBoard that rely on knowing the valid constraints information for parameters.

    Overriding in the UI will work for your panel but will make it difficult for people to use your parameters in any other custom panels, the DashBoard scripting layer, and quite likely, in future features we develop.

    If you have questions about how to achieve that, we would gladly answer them.
    #DashBoard