|
||
sendscript
|
|||||||||||||||||||||||||||
Format: | sendscript [-l] <script line> | ||||||||||||||||||||||||||
Example: | sendscript -l plot v(1) | ||||||||||||||||||||||||||
The sendscript command sends a single line of script from IsSpice to Scope5. Multiple lines can be sent by prefixing each line with the sendscript command. -l is a special switch used
for the last plot waveform to have all waveforms rescaled and drawn with
like traces. |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
sens - AC and DC Sensitivity
|
|
Format: | sens output sens output ac [dec] [oct] [lin] NP Fstart Fstop |
Example: | sens v(4) sens v(8) ac dec 1 100k 100meg |
The sens command runs a spice3 dc or ac sensitivity analysis. See the IsSpice4 documentation for details. This analysis has been replaced by the user scripts which provide additional output. |
set - change a simulation variable
|
|
Format: | set [word] [word = value] |
Example: | set temp=125 set units=degrees |
Set changes the value of the word given. Use unset to remove the word. If no value is given then the word is set to true. The value of word can be used in any ICL command by writing $word. In addition to all of the .OPTIONS parameters, the following variables have meaning: | |
Don't print the X-axis scale in the leftmost column when printing tabular data. | |
colwidth | Controls the column width for printtext. |
filetype | Controls the write command file format, set to binary, ascii (the default) and oct. |
fourgridsize | Number of points in the fixed grid used for interpolating when doing Fourier analysis in the control block. |
nfreqs | The number of frequencies to compute in the Fourier analysis (Defaults to 10). |
nobreak | Don't have the ASCII plots break between pages. |
noasciiplotvalue | Don't print the first vector plotted to the left when doing an ASCII plot. |
noprintscale | Don't print the X-axis scale in the leftmost column when printing tabular data. |
polydegree | The degree of the polynomial that the Fourier command uses. |
printmode | Changes the behavior of the print command set printmode = save to save results as vectors instead of printing set printmode = print to print previously saved print vectors |
rewind | A special directive that sets the output file pointer to the beginning of the file |
spicedigits | Sets the scientific data precison used for printout and display set spicedigits = 5 .... vout = 0.54321m |
units | If this is set to "rad", then all trig functions will use radians, otherwise, degrees are used. |
width | The width of the page used for the tabular print data and ASCII plots. |
(units only) |
setdoc - makes a graph document
active
|
|
Format: | setdoc <doc title> |
Example: | setdoc graph1 |
Makes the specified graph document the active document. If no document with the specified title is found, an error is generated. | |
IntuScope only. |
setcursor - sets a cursor to a
plot scale value
|
|
Format: | setcursor cursor# value |
Example: | setcursor 3 25n |
Sets a cursor identified by cursor# to a value. If the cursor doesn't exist it is created. Also created are cursors between 1 and cursor# so you should try to number cursors sequentially as they are needed and avoid using large numbers. Each plot comes with cursor 0 and 1 set to their homecursor position. | |
|
setlabel - sets the last labels
properties
|
|
Format: | setlabel properties |
Example: | setlabel rotated true |
Sets
the border, transparent, rotated, or justify properties of the last label
added. See also makelabel, movelabel
and setlabeltype. |
|
IntuScope only. |
setlabeltype - sets the next labels
font characteristics
|
|
Format: | setlabeltype word |
Example: | setlabeltype richtext
setlabeltype plaintext |
Changes the next labels font to plain text of rich text. See also makelabel, movelabel and setlabel. | |
IntuScope only. |
setmargins - set documents margins
|
|
Format: | setmargins top [bottom [left [right]]] |
Example: | semargins 5 |
Sets the top, bottom, left, and right margins of the current document in tenths of an inch. | |
IntuScope only. |
setnthtrigger - sets a cursor
at the nth trigger
|
|
Format: | setnthtrigger cursor# vector slope value change num |
Example: | setnthtrigger 1 vout postrig 3.5 .25 3 |
cursor# | an integer >= 0 identifying the cursor |
vector | an ICL vector to trigger on |
slope | postrig | negtrig |
value | an ICL value |
change | an ICL value, the change in vector required to reset the trigger same as hysteresis. |
num | an ICL value representing the number of triggers encountered as the vector index is increased. |
The setnthtrigger command places the cursor on the vector waveform after the vector crosses the value num times in the defined slope direction. The vector waveform is processed from the current cursor position toward the last index in the plot scale. This is useful in performing frequency counter type measurements by computing the interval for num transitions and calculating the frequency as num / interval Hz as follows: | |
homecursors | |
trigval = mean(vout) | |
trigchange = trigval/10 | |
setnthtrigger 0 vout postrig trigval. trigchange 1 | |
setnthtrigger 1 vout postrig trigval. trigchange 101 | |
frequency = 100 / (cursor(1) - cursor(0) ) | |
setunits frequency Hz | |
printvector frequency | |
IntuScope only. |
setplot - sets the active plot
|
|
Format: | setplot [-f | -t] [plotname] |
Example: | setplot tran2
setplot |
Sets the currently active plot to the plot with the given plotname. If no plotname is given, all plots are listed with the currently active plot shown. The -f or -t option is used to make the FFT time or frequency plot active; see fftinit for details. If the FFT plots aren't initialized, an error message is returned. | |
|
setparam - makes the named param
current
|
|
Format: | setparam vector |
Example: | setparam paramvec |
Sets the currently active param to the to the one specified. "parm" is a reserved keyword that can be saved in a vector. To reset param to its saved value, use setparam. See also nextparam | |
setquery - redirect script control
|
|
Format: | setquery program ID |
Example: | setquery scope
setquery net |
Redirects output from this script to the named program. Used by a program, IntuScope in the example, which is executing a remote script to receive output data. The only valid programs Id's are scope for IntuScope and net for SpiceNet. | |
setscaletype - sets plot axis
to linear or logarithmic
|
|
Format: | setscaletype <x type> <y type> |
Example: | setscaletype log lin |
Sets the types of the current plot's x- and y-axis scales to linear or logarithmic. Valid arguments are "lin" and "log". | |
IntuScope only. |
|
setsource - sets desired source
for new data
|
|
Format: | setsource pathname |
Example: | setsource d:\spice8\sn\sample\sample.out |
Specifies the desired source for new data. If the specified file is an ".out" file, IntuScope will attempt to open an output file written by SPICE. If it is a ".cir" file, IntuScope will attempt to obtain the data from the SPICE program, which will be assumed to have the given file as its active project. | |
IntuScope only. |
|
settracestyle - sets the style
of all selected traces
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Format: | settracestyle <style> [<width> [<options>]] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | settracestyle solidlin settracestyle rounddot med linealt |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Specifies the desired source for new data. If the specified file is an ".out" file, IntuScope will attempt to open an output file written by SPICE. If it is a ".cir" file, IntuScope will attempt to obtain the data from the SPICE program, which will be assumed to have the given file as its active project. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
settracecolor - sets color of
selected traces
|
|
Format: | settracecolor <color> [<red> <green> <blue>] |
Example: | settracecolor black"," settracecolor rgb 0 255 255 |
Sets the color of all currently selected traces. Valid arguments are: | |
black | |
red | |
green | |
blue | |
rgb <red> <green> <blue> | |
"rgb" must be followed by three color numbers between 0 and 255. | |
IntuScope only. |
settrigger - moves a cursor to
a trigger point on a waveform
|
|
Format: | settrigger cursor# vector slope value change |
Example: | settrigger 1 vout postrig 3.5 .25 |
cursor# | an integer >= 0 identifying the cursor |
vector | an ICL vector to trigger on |
slope | postrig | negtrig |
value | an ICL value |
change | an ICL value, the change in vector required to reset the trigger same as hysteresis. |
num | an ICL value representing the number of triggers encountered as the vector index is increased. |
The settrigger command places the cursor on the vector waveform at the point where the vector crosses. The vector waveform is processed from the current cursor position toward the last index in the plot scale. This is useful in imitating an oscilloscope's trigger function. |
|
IntuScope only. |
setunits - sets a vectors units
|
|
Format: | setunits vector string |
Example: | setunits v(2) volts |
Attaches units to a vector. Units can be any string value beginning with an alphabetical character. Unit behavior can be specified in the rule.plt file. Rules are used to combine units, for example watts = volts * amps. The s on the end is optional. Printouts will add or remove the s in an attempt to be grammatically correct; for example, 1 volt or 2 volts. Units are evaluated for all mathematical expressions using these rules. See also printunits. |
|
IntuScope only. |
setvec - makes a vector the active
vector
|
|
Format: | setvec <vec name> |
Example: | setvec v(1); setvec plot1.v(1); setvec w1 |
Makes the specified vector the active vector, and its plot the active plot. If no plot is specified or implied, the vector must be in the active plot. |
|
IntuScope only. |
setxlimits - sets min and max
x-axis value range
|
|
Format: | setxlimits xMin xMax |
Example: | setxlimits 0 200m |
Sets the minimum and maximum x-axis value range for the currently active trace. | |
IntuScope only. |
setylimits - sets min and max
y-axis value range
|
|
Format: | setxlimits yMin yMax |
Example: | setylimits 0 200m |
Sets the minimum and maximum y-axis value range for the currently active trace. | |
IntuScope only. |
show - operating point information
|
|
Format: | show [ref-des] [letter] [all] [: parameters] |
Example: | show
q1 show c r q5 : p show all : temp show m2:1:5 : id iss temp |
Show tabulates the operating point information for
devices Any number of reference designations may be listed. A set of reference
designations may also be specified by using the IsSpice4 device type keyletter.
Optionally, data on a specific set of device parameters can requested
after the colon. Device information within a subcircuit can be tabulated
by placing the subcircuit reference designation, within colons, on the
command line (letter:name:) For example, "show q1:x3" will produce
information for q1 within x3. See IsSpice4 help, Appendix B for a complete list of device parameters. |
|
showmod - operating point information
|
|
Format: | showmod [ref-des] [letter] [all] [: parameters] |
Example: | show
q d show all : temp show m5 : is vto |
Showmod tabulates the operating point information
for input computed model parameters. The all keyword will produce output
for all the devices or models used in the simulation. Optionally, data
on a specific set of model parameters can requested after the colon. Model information within a subcircuit can be tabulated
by placing the subcircuit reference designation, within colons, on the
command line (letter:name:) For example, "showmod q1:x3: " will
produce information about q1 in subcircuit x3. See IsSpice4 help, Appendix B for a complete list of model parameters |
|
sort - sort vectors
|
|
Format: | sort [-na | -nd | -va | -vd] |
Example: | sort
-na sort -vd |
Sorts the current plot by name, -na or -nd, or by value, -va or -vd. The sort can be in ascending, -na and -va or descending order, -nd or -vd. |
|
status - display breakpoint and
vector information
|
|
Format: | status |
Displays all of the currently saved vectors and breakpoints. |
step - run a fixed number of timepoints
|
|
Format: | step [n] |
Example: | step 50 |
Iterates the simulation n number times, or once and stops. |
|
stop - Simulation Breakpoints
|
|
Format: | stop [after num] or [when
condition] stop when condition1 when condition2 .... |
Example: | stop when v(3) > 10 tran 1n 100n ... |
When "after num" is used, the simulation
will terminate after num iterations. When "when condition" is
used, the simulation will terminate when the condition is true. "After
num" and "when condition" cannot be used in the same stop
command. The condition can use any saved vector, vector expression, and
any relational operator. The condition is checked after each iteration
throughout the course of the simulation. Multiple conditions can be logically combined by using multiple stop commands or compounded when conditions. The following two examples demonstrate the AND and OR of condition1 and condition2. |
|
AND stop when v(3)<10 when @q1[icc]>20m tran 1n 200n OR stop when v(3) > 10 stop when @q1[icc] > 20m tran 1n 200n |
|
switch - make another process
active
|
|
Format: | switch [edit] or [scope] or [net] |
Example: | switch net |
Make one of these processes active: |
|
edit (text editor), scope (post processor), net (schematic editor) |
|
tf - Transfer Function
|
|
Format: | tf output_nodes input_source |
Example: | tf V(5,3) VIN tf I(VLOAD) VIN |
Summary: The .TF statement computes the small signal ratio of the output node to the input source and the input and output impedances. Any nonlinear models, such as diodes or transistors, are first linearized based on the DC bias point, and then the small signal DC analysis is carried out. |
|
Syntax: Output is the small signal output variable and can be any node number or name using the format v(#) or v(name). Input is the small signal input independent source. | |
Getting Output: tf generates output without the need for any print statement. For the first example, IsSpice4 would compute the DC transfer function ratio of V(5,3) to VIN, the input impedance looking into the circuit at VIN, and the output impedance measured across nodes 5 and 3. |
timetofreq - FFT from time to
frequency
|
|
Format: | timetofreq vector |
Example: | timetofreq(current) result = mag(current) plot result |
Performs a fourier transform from time to frequency. If the plot hasn't been initialized using fftinit, it will set a default radix of 12, or 4096 points. See also freqtotime and fftinit. |
|
timetowave - Wavelet transform
from time to wave
|
|
Format: | timetowave vector |
Example: | timetowave v(12) |
Performs a wavelet transform using a Daubuchet fourth order wave function. The vector is first interpolated into the fftinit time space so that the data has a binary radix. The transform is then done in place. See also fftinit, wavetotime and wavefilter. |
|
wavefilter - zeros values below
the limit
|
|
Format: | wavefilter vector limit |
Example: | homecursors
constants._rms = rms(current)*.01 timetowave current plot current wavefilter current constants._rms wavetotime current |
All values of the vector less than the limit are set to zero. The example performs a wavelet transformation, removes the wave components that have less than 1% of the total rms contribution and inverts the transform. Wavelet filters tend to concentrate energy into fewer wave numbers (cells) than Fourier transforms for video and speech patterns. The example lets you examine the resulting quality of the lossy compression. |
|
wavetotime - Wavelet transform,
wave to time
|
|
Format: | wavetotime vector |
Example: | wavetotime current |
Performs an inverse wavelet transform using a Daubuchet fourth order wave function. The vector is first interpolated into the fftinit time space so that the data has a binary radix. The transform is then done in place. See also fftinit, wavefilter and timetowave. |
|
tran - transient analysis
|
|
Format: | tran tstep tstop [tstart [tmax] ] [uic] |
Example: | tran 50ns 1us
tran 10n 10u 9U 1n uic |
Summary: The transient analysis computes the circuit response as a function of time over a user-specified time interval. The initial conditions are normally determined by a DC analysis called the initial transient solution. The UIC option can be set to allow the simulation to begin from a user specified state. This statement is generated using the simulation setup dialog in the schematic editor, actions menu. See IsSpice4 help for additional information. |
unalias - destroy an alias
|
|
Format: | unalias string |
Example: | unalias vout |
Removes the alias. |
unlet - destroy a vector
|
|
Format: | unlet vector |
Example: | unlet sp |
Removes the specified vector, see also let. | |
|
unset - clear a variable name
|
|
Format: | unset variable name |
Example: | unset units
unset myvar0 |
Clears the value of the specified variable created by set. | |
|
update - refreshes active vectors
|
|
Format: | update all traces in the active document using the selected mode. |
Example: | sendscript update |
IntuScope only. |
version - print version information
|
|
Format: | version |
Example: | version |
Print the version number and the creation date of the executable. | |
|
view - generate real time display
|
|
Format: | view analysis vector or name + [min] [max] [= expression] |
Example: | view dc v(8)
view tran v(8) 0 5 view tran gain 0 10 = 20 * log(v(8)/v(1)) view ac out = sqrt(real(v(8))^2 + imag(v(8))^2) |
Produces a graph of the specified waveform without saving tabular data in the output file. Analysis must be specified. Vector can be any saved vector or vector created with expression. Scaling is done with the min and max values. Expression can be any vector expression. All vectors in expression must be saved (save/.PRINT statements) prior to the occurrence of expression. The graph is displayed in the Simulation Status window. | |
where - identify a problem node
|
|
Format: | where |
Example: | where |
For transient and operating point analyses the name of the last node or device to cause non-convergence is saved and printed. This command can be performed at any time during a simulation. Note: Only one node or device is printed; there may be problems with more than one. | |
while - control loop
|
|
Format: | while condition
commands end |
Example: | op
while v(6) < 2.6 & @q1[icc] > 10m alter @r16[resistance]=@r16[resistance]+10 op end |
Note: Condition can be enclosed in parenthesis. | |
The while command performs the commands within the defined loop until the condition is evaluated as true. The while loop will test the condition before the loop is processed. Therefore, it is necessary to save and generate the vectors used in the condition prior to reaching the loop. Notice above that an analysis is performed prior to entering the control loop. This allows v(3) and q1[icc] to be initialized. Dowhile test the condition at the end of the loop. See also repeat. | |
write - write data to a file
|
|
Format: | write file_name vectors [expressions] |
Example: | write tmp v(3) v(3)*v(4)
write myfile write %icapsdir%in\rule.plt |
Note: Condition can be enclosed in parenthesis. | |
Writes the data for the given expressions to the file
specified. Vectors to be written are grouped together by plots. Hence, if the expression list contained three vectors from one plot and two from another, then two plots will be written. One containing three vectors and one containing two vectors. If the scale for a vector is not present it is automatically written out. The file_name can have an environment variable specified between % characters. The system environment is searched first, if nothing is present then the user environment is searched. see the set command to establish a user environment. Use the load command to view the data you have written. The default format is a standard text file. However, the variable filetype can be set to override the default. If no expression list is given all vectors will be written to the file. Filetypes recognized are binary, ascii (the default) and oct. |
|
- This symbol indicates that the script command is also used in IntuScope 5.