Download ScadaMobile 2_1_1

Transcript
ScadaMobile
!
3.1.6 Look-up Tables
The Look-up table feature allows a variable to pick up a text string from a previously entered list based on current variable value
and display said text instead of the tag value.
To have a Row display a look-up text instead of the usual value, use the 'style' attribute with "lookup" or "picker" as value
style = "lookup" ;
style = "picker" ;
If you want to show the lockup text alone with no label and centered as shown in the StylesExampleModb example, you can set
the tag label to an empty text
label = "" ;
The actual table is given in additional rows in the CSV file by using special tags of type LOOKUP (in column B) and by specifying the related indexes in column C. The text written on column D or a comment attribute on the same row will be the Lookup
Text.
The following table is an example of what you would need to write for creating a two entry table with indexes 1 and 2.
Column A
Column B
Column C
Column D
entry1
LOOKUP
1
This is look-up table at index 1
entry2
LOOKUP
2
This is the second entry in the table so it will show if a lookup tag value is 2
Lookup indexes on Column C do not need to be ordered or contiguous, they can be any number that fits in 16 bits (0 to 65535).
Multiple user lookup tables
You can specify an access level for entries in column D. In such case you must set the lookup text in the comment attribute. This
allows for having different texts depending on user level. For example consider the following:
Column A
Column B
Column C
Column D
entry1_boss
LOOKUP
1
access=9; comment="Only me will see this message. Iʼm the boss!"
entry1_worker
LOOKUP
1
access=3; comment="I will see this with my user level of 3 or more";
Multiple range lookup tables
Lookup styled variables use the engineering unit as the index to the table. Therefore you can use the scale attribute for PLC
tags to make a lookup styled row to access to particular portions or ranges of the table.
For example scale={0,10,100,110}; will forward any raw value coming from a PLC tag in the range from 0 to 10 to table text
entries from 100 to 110.
You can use this feature to effectively have several virtual tables simultaneously in use. The StylesExampleModb example
shows how this concept works.
Note, however, that since INTERNAL tags do not perform any value scaling the above technique will not work on them. Instead
you can use appropriate numerical expressions in the ʻvalueʼ attribute in order to fetch the desired range from the table. Additionally, the global lookup table is available to expressions with the SM.lookup method.
pag:35/ 86!
www.sweetwilliamsl.com