Any independent source can be assigned a time-dependent value for transient analysis. The PWL form describes a piecewise linear waveform. Each pair of time-value values specifies a corner of the waveform. The value of the source at times between corners is the linear interpolation of the values at the corners. The general form of piecewise linear waveform is:

PWL [TIME_SCALE_FACTOR = <value>] [VALUE_SCALE_FACTOR = <value>] ( corner points )*

Arguments

Corner points

Corner points are:

(<tn>, <vn>) To specify a point. Each pair of values (tn, vn) specifies that the value of the source is vn (in Volts or Amps) at time=tn.
FILE <filename> To read point values from a file, filename specifies the text file that supplies the time-value pairs. A typical file can be created by editing an existing PWL specification, replacing all + signs with blanks (to avoid unintentional +time). Only numbers (with units attached) can appear in the file; expressions for tn and vn values are invalid. All absolute time points in filename are with respect to the last (tn vn) entered. All relative time points are with respect to the last time point.

Note Note: The continuation + signs in the first column are unnecessary and therefore discouraged.
REPEAT FOR <n> (corner_points)*
ENDREPEAT
To repeat n times. If n = 0, the data is ignored; n = -1 is interpreted as repeat forever.
REPEAT FOREVER (corner_points)*
ENDREPEAT
To repeat forever.

* Indicates that may be present several times.

If the filename contains spaces must be delimited by quotation marks. If filename do not specify a full path, the file is searched in the following order:

  1. As a file attachment within the current job.
  2. In the folder that contains the current job.
  3. In the folder USER/LIBRARY.
  4. As a file attachment within the jobs in the folder USER/LIBRARY.
  5. In the folder APP/LIBRARY.
  6. As a file attachment within the jobs in the folder APP/LIBRARY.
  7. In the folder APP/BIN.
  8. As a file attachment within the jobs in the folder APP/BIN.
  9. Within the current job. As a block of text defined by Directive #BEGINDATA.
  10. Within the jobs in the folder of the current job. As a block of text defined by Directive #BEGINDATA.
  11. Within the jobs in the folder USER/LIBRARY. As a block of text defined by Directive #BEGINDATA.
  12. Within the jobs in the folder APP/LIBRARY. As a block of text defined by Directive #BEGINDATA.

TIME_SCALE_FACTOR and VALUE_SCALE_FACTOR

Can be included immediately after the PWL keyword to show that the time and/or value pairs are to be multiplied by the appropriate scale factor.

Examples

V1 1 2 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
V2 1 2 PWL REPEAT FOR 20 (0,0) (5n,0) (5n,5) (10n,5) (10n,0) ENDREPEAT
V3 1 2 PWL REPEAT FOREVER (0,0) (5n,0) (5n,5) (10n,5) (10n,0) ENDREPEAT
V4 1 2 PWL FILE PWLDATA.TXT
V5 1 2 PWL REPEAT FOR 10 FILE "PWL DATA.TXT" ENDREPEAT

See also

Independent voltage source
Independent current source