File format:pwl

From sigrok
Revision as of 18:41, 7 December 2014 by Jst (talk | contribs) (Created page with "{{Infobox file format | image = | id = pwl | name = Piecewise linear function | status = unsupported | extensions = '''.t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

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

PWL in different SPICE implementations

LTspice

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).