Use Application Properties

A frequent request is for a way to let an operator change certain properties of tags, but not give that operator Tag Modification privileges. Among other reasons for why you might want to read application properties in your expressions, the following will show you how to achieve this goal.

Expressions can read1 application properties that are declared in the [System] section. To do so, write:

\PropertyName

in your expression, substituting the actual property name for "PropertyName". For example:

\DispMgrResizable

\DispMgrFullScreen

Properties stored in either the [Application] or the [Layer] sections are also available, but the syntax to retrieve them is somewhat longer:

\AppLayer.LayerSettings.PropertyName

Examples include:

\AppLayer.LayerSettings.Name
\AppLayer.LayerSettings.DefaultLanguage

Moderate your scan intervals

The default scan interval for most tags is one second. That might be right for some equipment (or even too slow), but for most analog values it's far too frequent. Scanning only every two or three seconds (instead of one) might be perfectly adequate most of the time, and will reduce the load on your network traffic and Historian enormously.

But, maybe you want to be able to change the scan rate depending on circumstances. In that case...

  1. Open the Edit Properties page of the Application Configuration dialog.
  2. Ensure that you are viewing the Advanced Mode, not the Basic Mode.
  3. Insert a new property as shown:

Adding a new label property

  1. Save your work and close the Application Properties dialog.
  2. Open the Tag Browser.
  3. Navigate to find \Station 1\PLC1\Level
  4. Open the properties dialog and the I/O tab.
  5. Right-click on the Scan Interval field to add a tag parameter expression.
  6. Enter the expression as shown. Be sure to deselect the Optimize option.(*)

An expression for the scan interval

  1. Click OK to save your work for the editor, then the tag.
    The Scan Interval field should turn blue and show the number 3.
  2. Close the Tag Browser.
  3. Open the Idea Studio and add an Edit Property widget to the Station Status page.
    Tools >> Standard Library >> Edit Property
    (Typically, you would create a new page for this sort of operational control, but we're saving steps.)
  4. Configure the widget as shown:

Configuration of your Edit Property widget. Note the data type & min and max values.

  1. Save your work and run the application. You should be able to adjust your scan interval as required. (To see the effect, you would need to have the tag's properties dialog open while changing the value, and would need to change back and forth between tabs to see the changed value.)

(*) What you've just seen is potentially dangerous. A tag with a non-optimized parameter expression (and all of its child tags) will restart each time the parameter changes. It also costs slightly more than other tags in terms of memory and CPU load. And, there's a risk that the parameter could be changed to an inappropriate value or changed frequently. A non-optimized parameter expression is valuable in the right circumstances, but use with extreme care!