CimEdit Variables

About this task

A variable can be used in an expression to represent different types of values. When you create an object that uses variable IDs, you can use the same object in several locations on a CimEdit screen, or on several different screens. You can then assign the variable a different value, for example different point IDs, for each instance of the object. This can streamline your configuration time.

Variables becomes a particularly powerful tool when you use a variable in linked objects.

A variable ID's chameleon-like functionality behaves as follows:

Procedure

  1. A screen designer enters text to identify a Variable ID (on the Variables tab) in CimEdit.

    The text may represent any of several types of values.

  2. Any of several options can assign a value to the variable.

    Options include:

    • Scripts, which can include variable IDs to which values are assigned.
    • Values assigned by a user during runtime.
    • Values assigned by a screen designer while configuring the screen.

    Values that a variable ID can represent include a:

    • Full Point ID
    • Partial Point ID
    • Text string in an expression.
  3. CimView substitutes the text into the appropriate expression.
  4. CimView evaluates the expression.

    Example of Variable Behavior

    Step 1 CimView substitutes specified values for the Variable ID's text.
    Variable ID Expression    
    {myvar} * 2    
    tank{myvar}_level * 2    
    {myvar}    
    Step 2 CimView evaluates the substituted expression.
    Resulting Expression    
    tank1_level * 2    
    tank1_level * 2    
    tank1_level * 2