File format:pwl

From sigrok
Revision as of 18:11, 7 December 2014 by Jst (talk | contribs)
Jump to navigation Jump to search
pwl
Name Piecewise linear function
Status unsupported
Common extension(s) .txt
ASCII format yes
Compression none

pwl is a file format that can be used to define the signal of voltage/current sources in a SPICE simulation.

Format

The file consists of multiple lines, where each line contains one time/value pair. The time values have to be in increasing order. SI prefixes are supported for both the time and the value.

The content in the file is then accessed with the PWL file=… statement from the simulation.

PWL in different SPICE implementations

LTspice

Observations

  • LTspice recognizes CR (0x0D), LF (0x0A) and CR+LF as newline indicator.
  • When editing the properties of a voltage/current source in the LTspice editor and choosing the PWL file, the "Open File" dialog uses "ASCII File (*.txt)" as the default filter (but the simulation can use every other file extension too).

Screenshots

Resources