Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

(blue star)

This section explains the basics of the feature. Please utilize the feature according to your site environment.

Exercise: Showing string value according to analog value

Each water tank will display its status with the change of an analog value. Strings may be configured in the ‘String Editor’ window.

※    Please refer to the String Value manual for more information.

a) Create a new analog tag and name it as ‘VALUE’.

b) Go to [Tools] – [String Editor] to configure the contents of string table. Add the strings in the group 0.

  • When ‘VALUE’ tag is equal to 0, ‘The water tank is empty.’ will be displayed.

  • When ‘VALUE’ tag is equal to 1, ‘The water has been stored in the tank.’ will be displayed.

  • When ‘VALUE’ tag is equal to 2, ‘The water tank is full.’ will be displayed.

 c) Select [Draw] – [String Value] and enter the tag name ‘VALUE’ in the text field. Specify the string group as 0.

d) Select [Draw] – [Switch/Lamp] to create a word switch. Define the action as ‘Tag operation’ to add 1 value to the ‘VALUE’ tag for every click.

e) Launch the project in the Xpanel or simulator. The strings from the string table change with the value of the tag.

(blue star)

The string will not be displayed when there is no string configured in the value of analog tag.

Exercise: Showing string value by using a string tag

The following example displays the data from the string table by using a string tag.

a) Create a string tag ‘STR’ in the database.

b) Go to [Tools] – [String Editor] to configure the string table. Add a string in the first index of group number 1.

c) Go to [Tools] – [Script] and add a new ‘Start Up’ script named: “str_table”. Write the script as shown below.

 d) Select [Draw] – [Dynamic Tag] and enter the tag name ‘STR’ in the text field.

e) Launch the project in the Xpanel or simulator. The data from the string table is shown through the string tag value.

(blue star)

Data in the string tag store up to 80 characters. You can set the length of the string under the [Advanced] tab.

  • No labels