• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Multistate instead of numeric

    User help
    2
    7
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      craig
      last edited by

      Hi,
      I've got a variable read from a 2 byte signed register over modbus IP.
      It can only take on values of 1,2,3,4,etc. In mango on the data source screen the type of this point is numeric and I can't change it to multistate.

      I can use the "Range" text renderer and use ranges of 1-1,2-2,etc so the appropriate text is displayed instead of 1 or 2.

      In the graphical view multistate image renderer works as well but some flexibility is lost when the type is numeric instead of multistate. For instance I can't assign the same image to multiple states.

      Should I convert this numeric to a multistate with a meta point or is there someway to assign the data type of this point to multistate?

      Thanks for the help
      Craig

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        The meta point solution would do it, yes. Maybe we can add to the list to allow modbus points to be multistate.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • C
          craig
          last edited by

          Is this as simple as editing com.serotonin.mango.view.text so that

             private static ImplDefinition definition = new ImplDefinition("textRendererMultistate", "MULTISTATE",
                      "textRenderer.multistate", new int[] {DataTypes.MULTISTATE}); 
          
          

          reads

          
             private static ImplDefinition definition = new ImplDefinition("textRendererMultistate", "MULTISTATE",
                      "textRenderer.multistate", new int[] {DataTypes.MULTISTATE, DataTypes.NUMERIC}); 
          
          

          I can't see any downsides...

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            You'd have to make sure the implementation handles a Double value type. It probably only handles Integer. And the configurater would probably need to be updated too.

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • C
              craig
              last edited by

              adding Numeric datatype to the multistate renderer seems like it might be the wrong way to go about it...

              Better to add mango multistate datatype to the modbus data point locator: I think I will add a select option to the pointlocator dialog to select either numeric or multistate when a numeric modbusDataType is specified.

              I suppose I will have to modify the format the blob pointlocator data is stored in as well to store this additional field.

              1 Reply Last reply Reply Quote 0
              • C
                craig
                last edited by

                i've got this working, I'll send it along in a few months when it is properly tested.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post