Change()

The Change() function attempts to alter the symbol property identified by a "property address", which provides a full hierarchical path to the symbol. The Change function is often used to change a few individual symbol properties before a simulation run. If you need to change a large number of properties, the LoadComponentValues feature loads a set of symbol properties/values defined in a file.

Important: This function makes the change directly in the schematic and, thus, results in a permanent change that  you may not intend to make. Use caution when saving a design to avoid saving unintended changes to disk.

In this topic:

Change() Syntax

The Change() function has the following syntax:
Change(property_address, value)
  • The property_address is a dot (.) separated string that specifies the path to the property that you want to change. For top-level symbols, the property address is simply the reference designator of the symbol, a dot (.), and the property on the symbol you wish to change.
  • The value argument indicates the change to the symbol property value that you want to make.

▲ back to top

Top-Level Example

When changing properties at the top level, only the reference designator, a dot (.), and the property name need to be used. For example, you may want to parameterize the resistance of a DVM load. The LOAD_RESISTANCE property is passed into the load subcircuit and used as the load resistance in the model. Assuming the load reference designator is I1, and the new value is {RLoad},
Change(I1.LOAD_RESISTANCE,{RLoad})
will change the LOAD_RESISTANCE property to {RLoad}. You could then setup a Multi-Step Analysis to step the RLoad parameter.

▲ back to top

Primitive Resistor/Capacitor Example

Several symbols in SIMetrix/SIMPLIS use the VALUE property to store the electrical parameters for the model. Two common examples are the primitive resistor and capacitor. When changing properties on these symbols, you only need to supply the reference designator to the change function:
Change(C1,1u)
will change the VALUE property to 1u.

At times, you may want to add or change the initial condition on a primitive capacitor. By adding the IC= keyword to the capacitance value, you can set or change the initial condition:

Change(C1,1u IC=12)

▲ back to top

Hierarchical Example

The following example illustrates how to change the gain value of a component on a sub-schematic:
Change(U1.U3.GAIN,1)

The function call above does the following:

  • Attempts to locate a schematic component U1 on the top level.
  • Opens the U1 schematic component (.sxcmp file).
  • Locates a symbol U3 in the U1 schematic component.
  • Then sets the GAIN property on the U3 symbol to 1.

▲ back to top

Inline vs. Header Row Function Behavior

The Var(), GlobalVar(), Rvar(), Change() and Temp() functions behave differently depending on whether they are used inline or in a header row.

  • To use the functions inline, leave the header entry for that column empty. When used inline, Var(), GlobalVar(), Rvar(), Change(), and Temp() perform the actions described above.
  • When used in a header row, the second argument, value, is interpreted to be the default value for the function and is used if the test has no value in its column.

    For example, the following testplan uses both inline and header row functions and performs the actions listed below:

    1 *?@ Var(MAX_Q,1n) GlobalVar(VIN,12)  
    2 2n   Change(U1.U3.GAIN,1) 
    3   5.0  
    4     Change(I1.LOAD_RESISTANCE,2.5)
    • The test on line 2 sets the variable MAX_Q  to 2n based on the value in line 2, column 1. Because column 2 is empty, the global variable VIN to the default of12. The third column uses the inline syntax, and changes the GAIN property on U1.U3 to 1.
    • The test on line 3 sets the global variable VIN to 5.0 using the value in the field, not the header entry. Column 1 is empty, and there is a variable header entry, so the MAX_Q variable is set to the default of 1n as defined in the header entry for the column. Note that column 3 is empty and also has an empty header row. No action is performed during test #3 for column #3.
    • The test on line 4 changes the LOAD_RESISTANCE property on I1 to2.5 using the inline syntax. Because columns 1 and 2 on line 4 are empty, MAX_Q  is set to 1n and VIN is set to 12. Both are the defaults defined in the header row.
    Note: In the above example, only Change() is used inline; however, you can use Var(), Globalvar(), Rvar(), and Temp() inline as well. A schematic with parameterization requires all parameters defined for every test, so if you use Var(), Rvar(), or Globalvar() inline, you must ensure that all parameters are defined for all tests, including those without the inline variable definitions. The example uses Var() and Globalvar() as header row entries, which in turn ensures the variable is defined for every test. The Rvar() behavior is identical to the Var() behavior. Temp() may be used inline without these restrictions because a default temperature is built-into the SIMetrix simulator.

▲ back to top