Difference between revisions of "File format:Pwl"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
== Format == | == Format == | ||
The file consists of multiple | The file consists of multiple time/value pairs. The individual values are separated by whitespace, therefore all values can be in one long line, or on multiple lines (much more convenient). 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 <tt>PWL file=…</tt> statement from the simulation. | The content in the file is then accessed with the <tt>PWL file=…</tt> statement from the simulation. | ||
Line 29: | Line 29: | ||
==== Observations ==== | ==== Observations ==== | ||
* | * A space (0x20) or different newline indicators (CR (0x0D), LF (0x0A) and CR+LF) can be used to separate the times/values. | ||
* 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). | * 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). | ||
Revision as of 18:24, 7 December 2014
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 time/value pairs. The individual values are separated by whitespace, therefore all values can be in one long line, or on multiple lines (much more convenient). 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
- A space (0x20) or different newline indicators (CR (0x0D), LF (0x0A) and CR+LF) can be used to separate the times/values.
- 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).