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.
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.
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.
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:
‘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.
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.