Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

 

divider

 

Analysis - General

 

How can I import a waveform from one circuit into the analysis of another circuit?

 

There are two ways to do this. The Import operator is designed for this purpose. The Import operator can import a waveform from an output text file that has been created by Micro-Cap or by another SPICE program. The following example imports the output waveform, V(Out), of the circuit, WAVEOUT.CIR, into the analysis of the circuit, WAVEIN.CIR. The example will be done in transient analysis, but this procedure can be used in AC and DC analysis as well.

Load the file WAVEOUT.CIR. Go to the Analysis menu and click on Transient Analysis. The Transient Analysis Limits dialog box will appear. For each waveform, there is a set of icons for the waveform options. Click on the numeric output icon for the waveform V(Out). When enabled, this will write the results of the waveform into the numeric output file. Set the value in the Number of Points field. This value determines the number of data points that are to be written in the text file. The number of data points in the text file controls the accuracy of the imported waveform. Setting this field to 1001 should cover most waveforms. Run the analysis, and then click on the Transient menu and choose Numeric Output. This will load up the file, WAVEOUT.TNO, which is the numeric output file that was just created. In this file will be operating point information, and two columns of tabular data that represent time and V(Out). Go to the File menu and choose Save As. Save this file to a different name such as WAVEOUT.OUT. This doesn't have to be done, but it prevents the file from being overwritten if you run the transient analysis again. Load the file WAVEIN.CIR. Go to the Analysis menu and click on Transient Analysis. On a new waveform line, place the following into the Y Expression field:

Import(Waveform.out,V(Out))

The syntax of the Import operator is:

Import(f,y)

where f is the file name, and y is the waveform that is to be imported from the file f. The X expression must be T. Run the analysis, and the waveform V(Out) will be plotted along with any other waveforms that have been defined.

There are two other things that the user needs to be aware of in using the Import operator. First of all, the X expression for the Import operator is limited. For transient analysis, the X expression must be T. For AC analysis, the X expression must be F. For DC analysis, the X expression must be the voltage or current of the Variable 1 source being swept. Also, the waveform name in the Import operator must match exactly with the waveform header, and the parentheses must match.

The second method is to use the User file to import a waveform. We will assume the same two circuits as above. Run WAVEOUT.CIR. After the analysis is finished, go to the Properties dialog box of the plot. Click on the Save Waveforms tab. Highlight the waveform to be saved in the Waveforms list. Change the name and file as desired. In this case we define the As (New Name) field as V(Out) and the In File field as WAVEOUT.USR. Click the Save command button. Close the dialog box and the WAVEOUT.CIR file. Load the WAVEIN.CIR file and enter the appropriate analysis. On a new waveform line in the analysis limits, right click in the Y Expression. Go to Waveforms, then WaveFormY, then WAVEOUT.USR. Select the WaveformY("WAVEOUT","V(Out)") option. Run the simulation and the waveform will appear along with any other plotted waveforms.

 

 

 

 

Categories


AC Analysis
Analysis - General
DC Analysis
Dynamic DC
Incompatibilities
Initial Conditions
Miscellaneous
Models
Monte Carlo
Output
Probe
Schematic Editor
Stepping
Transient Analysis