3.3 Loading a Schematic with Component Values

You are probably accustomed to thinking of schematics as fixed entities tied to a particular design. In this topic you will learn that schematics can be viewed as templates which define the electrical circuit but not necessarily the component values. Using the load component values feature of SIMPLIS you can change a number of component values defined in a spreadsheet. In this topic you will change the component values to change the output voltage and to add statistical distribution functions to the design.

To download the examples for Module 3, click Module_3_Examples.zip

In this topic:

Key Concepts

This topic addresses the following key concepts:

What You Will Learn

In this topic, you will learn the following:

Getting Started

  1. Close the schematic 3.1_SelfOscillatingConverter_POP.sxsch, without saving, if its open.
  2. Close the waveform viewer.
  3. Re-open the schematic 3.1_SelfOscillatingConverter_POP.sxsch.
  4. Run the simulation.
    Result: The converter simulates as before, with the nominal output voltage of 5.0V. The waveform viewer displays the 3 curves for the POP Trigger, Vout and Inductor Current.
  5. From the schematic menu, select Tools > Load Component Values > Select a File to Load....
    Result: A Hint message warns you that you are about to change the schematic values.
  6. Click Close on the above dialog.
    Result: A file selection dialog opens in the schematic directory. The File name field is populated with the default configuration file name.
  7. Select the only Load Component Values configuration file with the file name: 3.1_change_vo_to_5p5V.compvalues.txt.
  8. Click on the Open button.
    Result: Individual values on schematic symbols are edited by the Load Component Values feature. The load component values configuration defines these changes:
    1. Change the input source to use the uniform distribution: {310*Unif(0.0333)}.
    2. Add statistical distributions to the feedback resistors R6 and R7.
    3. Set the nominal output voltage to 5.5V.
    4. Increase the saturation currents on the magnetizing inductor L4 by 10%.
  9. Run the simulation.
    Result: The converter simulates as before, but with the nominal output voltage of 5.5V. The waveform viewer displays 3 new curves for the POP Trigger, Vout and Inductor Current, as well as the original curves.

Discussion

In the Getting Started section you loaded a schematic with new component values. The new values change the output voltage set-point of the converter to 5.5V and also increase the saturation currents for the PWL inductor L4. At the same time, the Monte Carlo distribution functions were added to the input source and voltage feedback resistors. After the component values were changed, the program reported a log to the SIMetrix/SIMPLIS command shell window, with the details of each change:

Load component value -- Started @ 8:29 AM
Action:		refdes		old	new
-------		------		---	---
Change	V1.VALUE	{Vin}	{310*Unif(0.0333)}
Change	R6.VALUE	4.75k	{5.7k*Gauss(0.05)}
Change	R7.VALUE	4.75k	{4.75k*Gauss(0.05)}
No Change	R2.VALUE	1.5	1.5
Change	L4.VALUE	NSEG=5 X0=-0.50 Y0=-{1.655m*(L4_Tol)} X1=-0.45 Y1=-{1.65m*(L4_Tol)} X2=-0.40 Y2=-{1.6m*(L4_Tol)} X3=0.40 Y3={1.6m*(L4_Tol)} X4=0.45 Y4={1.65m*(L4_Tol)} X5=0.50 Y5={1.655m*(L4_Tol)}	NSEG=5 X0=-{0.50*1.1} Y0=-{1.655m*1.1*(L4_Tol)} X1=-{0.45*1.1} Y1=-{1.65m*1.1*(L4_Tol)} X2=-{0.40*1.1} Y2=-{1.6m*1.1*(L4_Tol)} X3={0.40*1.1} Y3={1.6m*1.1*(L4_Tol)} X4={0.45*1.1} Y4={1.65m*1.1*(L4_Tol)} X5={0.50*1.1} Y5={1.655m*1.1*(L4_Tol)}

Load component value -- complete @ 8:29 AM

In addition to reporting to the command shell, the log is saved as a file. The log can be viewed with the menu item: Tools > Load Component Values > View log file....

Exercise #1: View Log File in the HTML Viewer

SIMetrix/SIMPLIS has a built-in HTML viewer which can be used to view the log file. In this exercise you will view the log file using the HTML viewer.

  1. From the schematic menu, select Tools > Load Component Values > View log file....
    Result: The ASCII text log file is read from disk, parsed into a HTML table, and displayed in a HTML viewer dialog window. Because the values are formatted into a table, the changes are readily apparent.
  2. Resize the window to be wider or narrower - you should see the column data stretch or wrap to fill the available column width.

Exercise #2: View the Raw Text Log File

The log file is a plain ASCII text file located in the same directory as the schematic. The log file is automatically created every time the schematic is loaded with a configuration file and has the same name as the schematic but with the extension: .compvalues.log. In this exercise, you will open the log file in the text editor.

  1. Right click on the schematic tab:
  2. Select the Open Containing Folder menu option.
    Result: a Windows Explorer window opens to the schematic directory.
  3. Drag the 3.1_SelfOscillatingConverter_POP.compvalues.log and drop it into the SIMetrix/SIMPLIS Main Window.
    Result: The 3.1_SelfOscillatingConverter_POP.compvalues.log file opens in the text editor.

Creating a Load Component Values Configuration File

The Load Component Values configuration file can be created by hand, by another program or script, or by SIMetrix/SIMPLIS. The schematic menu: Tools > Load Component Values > Create Config File from Schematic... reads each symbol property, determines if that symbol property is compatible with Load Component Values, and saves the address-value pair to a configuration file.

Exercise #3: Create Configuration File

In this exercise you will save a configuration file for the schematic to the default file name.

  1. From the schematic menu, select Tools > Load Component Values > Create Config File from Schematic...
    Result: A file selection dialog opens, prompting you for a file name to save the configuration file:
  2. Click Save on the dialog.
    Result: The program reads the top level schematic and saves the configuration file. A message is output to the SIMetrix/SIMPLIS command shell:
    Created configuration file : 
    C:\Training\Module_3_Examples\3.1_SelfOscillatingConverter_POP.compvalues.txt

Configuration File Format

The configuration file is a plain ASCII text file with two columns separated by a tab character. Following are the rules for the configuration file:

Exercise #4: Editing A Configuration File

As mentioned in the Configuration File Format section, the configuration file is a plain ASCII text file. As such, it can be viewed and edited in any text editor including the built-in text editor.

  1. Right click on the schematic tab:
  2. Select the Open Containing Folder menu option.
    Result: a Windows Explorer window opens to the schematic directory.
  3. Drag the 3.1_SelfOscillatingConverter_POP.compvalues.txt file into SIMetrix/SIMPLIS.
    Result: The Configuration file opens in the text editor:

At this point you have the default configuration file open in the text editor. In the screenshot shown above, the values for two components, IPROBE4 and Probe7 are shown. The configuration file can be edited to change values or to eliminate unneeded components.

Automating Load Component Values w/ a Command Line Switch

A special switch /l ( the letter l, not the numeral 1) has been added to SIMetrix/SIMPLIS to automatically open a schematic and load a set of component values when the program starts. The syntax for the command line switch is:
<full_path_to_simetrix.exe> <full_path_to_schematic_to_open> /l 
<full_path_to_comp_values_file>
Note: Notice that each of the three command line arguments is a full path.

Automating Load Component Values w/ a Script

The load component values feature is provided by the script, load_comp_values.sxscr. The script has one optional argument -- a filename. Without the optional argument, the script attempts to load the default file, which is <schematic_name>.compvalues.txt. If that file cannot be found or cannot be opened, a file selection dialog opens to allow you to select a configuration file. Do one of the following:

The load component values script can be called from any SIMetrix Script.

Conclusions and Key Points to Remember

Module Evaluation Form

Please fill out the Module # 3 Evaluation form.