HMI Pad Forums Old forum Feature Requests (old) Decimal Points in integers

This topic contains 4 replies, has 2 voices, and was last updated by  admin 9 years, 10 months ago. This post has been viewed 1000 times

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19479

    admin
    Keymaster

      G’day,
      thought i might as well put anything i had in my head to good use. I think ti would be great if you could specify a decimal point to be displayed in an Integer. So for example, 400 could either be 4.00, 40.0 or 0.4 by adding a parameter which would allow you to specify how many digits after the decimal point. This could be particularly useful on motor controllers and the like which use integers scaled by 0.1A for example.

      Just a thought anyway.
      Cheers

      #19480

      John
      Keymaster

        Yes, You are right. Actually, we have already this in our ‘to do’ list. We plan to implement this in the form of scaling and formating

        What we think of for a future release is to add full support for ‘formats’ and ‘scaling’. Formats will include display of decimal points on defined places (such as “###.#”). Scaling will allow to represent a value in a range which differs from the original data (for example to represent PLC values from 0 to 500 with a 0 to 100% range and so on) In your example, you would have to scale your data for multiples of tens and then format it in the appropriate way. Formats and Scaling will be available not only for integer values but for all data types.

        Joan
        SweetWilliam, S.L

        #19481

        admin
        Keymaster

          G’day,
          those features sound fantastic. I have the new version (1.3.1) and noticed that these new features have been included. My only question is how do i use them(what syntax do i need to sue in the tag atttributes to get this stuff to work)?

          The lookup table in particular sounds excellent, particularly for drives and the like which give out a fault code.

          Cheers, Daniel

          #19482

          John
          Keymaster

            Apple has approved version 1.3.1 so quickly this time that I have had virtually no time to update the manual, this is how to use them:

            format:=”n.m”;
            scale:={x1,x2,y1,y2};

            Where:

            ‘n’ is the minimum number of characters to be displayed. If the value to be displayed is shorter than this number, the result is padded with blank spaces. The value is not truncated even if the result is larger.

            ‘m’ is the number of digits to be displayed after the decimal point.

            ‘x1′, ‘x2′ are reference raw units as read from the PLC to be used as basis for scaling.

            ‘y1′, ‘y2′ are the corresponding engineering (scaled) units to be used on display

            To tell a Tag that it should display a look-up text instead of the usual value, use the ‘style’ attribute with “lookup” as value. Note that the Tag Label will still be displayed alongside the Lookup Text, so set the label to “” if you do not want to show it.

            INT1, DINT, HR0, label:=”"; style:=”lookup” ;
            INT2, INT, HR2, label:=”"; style:=”lookup” ;
            INT3, INT, HR3, label:=”"; style:=”lookup” ;

            The actual table is given in additional rows in the CSV file is by using a special kind of tag of type LOOKUP (column B) and the index in column C. The text on column D is the Lookup Text.

            alarm1, LOOKUP, 1, This is look-up table at index 1
            alarm2, LOOKUP, 2, This is the second entry in the table so it will show if tag value is 2
            alarm3, LOOKUP, 3, Horn is sounding
            alarm4, LOOKUP, 55, Horn is sounding with Alarm 55

            Lookup numbers do not need to be ordered or contiguous, they can be any number that fits in 16 bits (0 to 65535).

            Version 1.3.2 will also allow for prefixes and suffixes on tag values, so for example you will be able to have ‘%’ or ‘psi’ next to a tag value.

            #19483

            admin
            Keymaster

              Thanks again for the awesome info,
              this is shaping up to be an extremely useful application. Can’t wait to see what you will end up making of it.

              Cheers, Daniel

            Viewing 5 posts - 1 through 5 (of 5 total)

            You must be logged in to reply to this topic.

            Copyright © SweetWilliam, S.L 2009-2013. All rights reserved.
            Science and Technology Park of the University of Girona, Emili Grahit, 91 (NarcĂ­s Monturiol building, Office P3-B03) 17003-Girona. Phone +34972183244