PP logo

POUL PETERSEN

APWIN2PS v1.00 user's manual.


Contents

Introduction
APWIN2PS is an APWIN macro that will export the data currently in APWIN memory to a format readable by the PSpice circuit simulator, allowing you to use measured data for simulation models. The output from APWIN2PS can be saved to disk or copied to the Windows Clipboard.
The use of APWIN2PS assumes that you are familiar with the operation of APWIN and PSpice.

License
The use of the APWIN2PS utility programs is subject to Poul Petersen's Software license agreement.

Terminology and typography
This style is used for filenames and for output examples from the programs.
A "meter" is one of the APWIN meter selections Source 1, Source 2 and Data 1 to Data 6. "Meter" can also refer to the data measured by the meter.
A "trace" is the data resulting from a single sweep with one source variable, for example an amplitude versus frequency sweep from 20 Hz to 20 KHz. A meter can contain several traces.
A nested sweep is data resulting from a sweep with two source variables, for example an amplitude versus frequency sweep from 20 Hz to 20 KHz versus generator amplitude from 1 mV to 1 V. A nested sweep contains several traces, all with the same X-axis values.
Nested sweep data refers to the traces beyond the 1st. trace resulting from a nested sweep.
An appended sweep is data resulting from a number of sweeps with one source variable. An appended sweep contains several traces, that may have different X-axis values. Appended sweep data refers to the traces beyond the 1st. trace.

Installation
Copy the files to a directory on your harddisk. This can be a separate directory, or the directory where you have your other APWIN macros. If you decide to include APWIN2PS in your Quick Launch list, note that APWIN will change the Working directory to the directory where APWIN2PS is located each time you run it.
To uninstall APWIN2PS, just delete its files.

APWIN2PS user dialog

APWIN2PS user dialog.

The "Data currently in APWIN memory." box shows the data currently held within the APWIN memory.

The lower left box shows the progress during File Save.

The "Select traces for PSpice model." box is where you select the traces you want for the PSpice model(s):

 XY1Y2
TABLE modelInput valueOutput valueNot used
PWL modelTimeOutput valueNot used
FREQ modelFrequency [Hz]Magnitude [dBV]Phase [deg]

The "Select properties for PSpice model." box is where you select the model types you want. If the data in APWIN memory is a nested sweep or more appended sweeps, you can choose to create a model for each trace in the sweep. If data is from a nested sweep, the models' headers will include the Source 2 value for each model, but for appended sweeps the model headers will be numbered for each trace.

"Copy" will copy data to Windows Clipboard. The selection must result in only one model for this option to be available.

"Copy, Quit" will copy data to Windows Clipboard and exit APWIN2PS.

"Save" will save the model(s) to a disk file.

"Save, Quit" will save the model(s) to a disk file and exit APWIN2PS.

"Quit" exits APWIN2PS.


APWIN setup
Set up the APWIN sweep panel with the measurements you want to create models from.
You must select the units you want to use for the models. APWIN2PS does not check if the units you choose are valid for the PSpice models; it simply extract the numbers from APWIN, reformat them and saves them as template models.
APWIN must be set up before the APWIN2PS macro is started as the program only reads APWIN data when it starts. APWIN2PS uses information from both APWIN's data array and its Panel selections, so the measurement in memory must match the Panel selections. If you want to save the measurements to disk for later translation to PSpice models, use APWIN's "Save Test" to be sure that Panel selections and data match each other.

Saving models to disk
Select the traces and model types you want to translate from APWIN2PS' panel and click "Save" or "Save, Quit". A dialog will allow you to choose a name for the output file. When saving to disk, the file will contain a model for each possible combination of model types and traces you have selected. Each model has a header to identify it.

Copying models to Windows Clipboard
Select the traces and model type you want to translate from APWIN2PS' panel and click "Copy" or "Copy, Quit". The traces and model type you select, must result in exactly one model for the Copy function to be available. The trace(s) are copied to the Windows Clipboard without any header information, so that it can be pasted directly into a dialog field or an editor in a Windows program. This mode of operation should be used for models with few data points only, as there are problems when copying very long strings into a PSpice dialog box.

APWIN2PS output model examples
*******************************************************************************
* PSPice model(s) created by
* APWIN2PS v1.00 Copyright (C) Poul Petersen 1999
*******************************************************************************
* APWIN test         : C:\PPAPWIN\AP2PSTBL.AT1
* Output file        : C:\PPAPWIN\AP2PSTBL.MOD
* Date / time        : 29. Nov. 1999 / 22:41:13
*******************************************************************************
*
*******************************************************************************
* TABLE input value  : Source 1 : S1.Gen.Ampl [Vrms]
* TABLE output value : Data   1 : S1.Dcx.DMM Volts [Vdc]
*
E|G <name> <+node> <-node> TABLE {<expression>} =
+ (9.9996E-03,1.5843E+01) (1.6683E-02,1.1745E+01) (2.7827E-02,4.2102E+00)
+ (4.6407E-02,1.7630E+01) (7.7433E-02,1.2286E+01) (1.2915E-01,3.7071E-01)
+ (2.1541E-01,9.0117E+00) (3.5938E-01,9.3096E+00) (5.9945E-01,1.3165E+01)
+ (1.0000E+00,1.2817E+01)
*******************************************************************************
APWIN2PS TABLE model saved to file.
TABLE input value is selected as X in APWIN2PS' panel, and TABLE output value as Y1.

(9.9996E-03,1.5843E+01) (1.6683E-02,1.1745E+01) (2.7827E-02,4.2102E+00) (4.6407E-02,1.7630E+01) (7.7433E-02,1.2286E+01) (1.2915E-01,3.7071E-01) (2.1541E-01,9.0117E+00) (3.5938E-01,9.3096E+00) (5.9945E-01,1.3165E+01) (1.0000E+00,1.2817E+01)

APWIN2PS TABLE data Copied to Windows Clipboard. This is one long data string with all the values from the trace.

*******************************************************************************
* PSPice model(s) created by
* APWIN2PS v1.00 Copyright (C) Poul Petersen 1999
*******************************************************************************
* APWIN test         : C:\PPAPWIN\AP2PSPWL.AT1
* Output file        : C:\PPAPWIN\AP2PSPWL.MOD
* Date / time        : 29. Nov. 1999 / 22:44:17
*******************************************************************************
*
*******************************************************************************
* PWL time          : Source 1 : Time.Time.External Sweep Time [sec]
* PWL output value  : Data   1 : S1.Anlr.Level A [V]
*
I|V <name> <+node> <-node> PWL(
+ 0.0000E+00 9.5386E+00 2.0010E+00 1.4107E+01 4.0020E+00 7.9156E+00
+ 6.0030E+00 8.7718E+00 8.0040E+00 1.2333E+01 1.0005E+01 1.1710E+01
+ 1.2006E+01 1.0073E+01 1.4007E+01 1.0906E-01 1.6008E+01 6.1300E+00
+ 1.8009E+01 1.6097E+01 2.0010E+01 1.5529E+01 2.2011E+01 6.2593E+00
+ 2.4012E+01 3.9389E+00 2.6013E+01 6.5554E+00 2.8014E+01 9.3175E+00
+ 3.0015E+01 1.8024E+01 )
*******************************************************************************

APWIN2PS PWL model saved to file.
PWL time is selected as X in APWIN2PS' panel, and PWL output value as Y1.

0.0000E+00 9.5386E+00 2.0010E+00 1.4107E+01 4.0020E+00 7.9156E+00 6.0030E+00 8.7718E+00 8.0040E+00 1.2333E+01 1.0005E+01 1.1710E+01 1.2006E+01 1.0073E+01 1.4007E+01 1.0906E-01 1.6008E+01 6.1300E+00 1.8009E+01 1.6097E+01 2.0010E+01 1.5529E+01 2.2011E+01 6.2593E+00 2.4012E+01 3.9389E+00 2.6013E+01 6.5554E+00 2.8014E+01 9.3175E+00 3.0015E+01 1.8024E+01

APWIN2PS PWL data Copied to Windows Clipboard. This is one long data string with all the values from the trace.

*******************************************************************************
* PSPice model(s) created by
* APWIN2PS v1.00 Copyright (C) Poul Petersen 1999
*******************************************************************************
* APWIN test         : C:\PPAPWIN\AP2PSFRQ.AT1
* Output file        : C:\PPAPWIN\AP2PSFRQ.MOD
* Date / time        : 29. Nov. 1999 / 22:45:47
*******************************************************************************
*
*******************************************************************************
* FREQ frequency     : Source 1 : S1.Gen.Freq [Hz]
*        at Source 2 : S1.Gen.Ampl [Vrms] : 9.9996E-03
* FREQ magnitude     : Data   1 : S1.Anlr.Level A [dBV]
* FREQ phase         : Data   2 : S1.Anlr.Phase [deg]
*
E|G <name> <+node> <-node> FREQ {<expression>}=(
+ (1.0000E+01,2.2470E+00,1.1072E+01) (2.7825E+01,1.7843E+01,5.0912E+00)
+ (7.7425E+01,-2.6328E-01,1.7552E+01) (2.1550E+02,1.6270E+01,1.2186E+01)
+ (5.9950E+02,2.2707E+01,2.9987E+00) (1.6680E+03,2.5022E+01,7.0642E+00)
+ (4.6425E+03,1.5632E+01,5.1293E+00) (1.2915E+04,5.0665E+00,1.7884E+01)
+ (3.5950E+04,2.2054E+01,1.7291E+00) (1.0000E+05,6.3847E+00,1.1779E+01)
+ )
*******************************************************************************
*
*******************************************************************************
* FREQ frequency     : Source 1 : S1.Gen.Freq [Hz]
*        at Source 2 : S1.Gen.Ampl [Vrms] : 1.0000E+00
* FREQ magnitude     : Data   1 : S1.Anlr.Level A [dBV]
* FREQ phase         : Data   2 : S1.Anlr.Phase [deg]
*
E|G <name> <+node> <-node> FREQ {<expression>}=(
+ (1.0000E+01,2.2717E+01,3.5214E+00) (2.7825E+01,1.0155E+01,1.6847E+01)
+ (7.7425E+01,1.1772E+01,6.4505E-01) (2.1550E+02,2.1761E+01,1.5599E+01)
+ (5.9950E+02,1.5685E+01,9.7628E+00) (1.6680E+03,2.3916E+01,1.9754E+01)
+ (4.6425E+03,2.4519E+01,7.4388E+00) (1.2915E+04,1.8561E+01,5.6218E+00)
+ (3.5950E+04,2.3063E+01,1.0724E+01) (1.0000E+05,2.4622E+01,5.9127E-01)
+ )
*******************************************************************************

APWIN2PS FREQ models from a nested sweep saved to file.
FREQ frequency is selected as X in APWIN2PS' panel, FREQ magnitude as Y1 and FREQ phase as Y2.
If the same data had been from 2 appended sweeps, the Source 2 line would be numbered Trace 1 to Trace 2.

(1.0000E+01,2.2470E+00,1.1072E+01) (2.7825E+01,1.7843E+01,5.0912E+00) (7.7425E+01,-2.6328E-01,1.7552E+01) (2.1550E+02,1.6270E+01,1.2186E+01) (5.9950E+02,2.2707E+01,2.9987E+00) (1.6680E+03,2.5022E+01,7.0642E+00) (4.6425E+03,1.5632E+01,5.1293E+00) (1.2915E+04,5.0665E+00,1.7884E+01) (3.5950E+04,2.2054E+01,1.7291E+00) (1.0000E+05,6.3847E+00,1.1779E+01)

APWIN2PS FREQ data Copied to Windows Clipboard. This is one long data string with all the values from the trace.


Related files
apwin2ps.apb:APWIN macro.
ppaplib.apb:Some functions and routines required by APWIN2PS.
pputlib.apb:Some functions and routines required by APWIN2PS.
apwin2ps.cfg:Configuration file for APWIN2PS. This file is written by APWIN2PS when the program runs with data in APWIN memory. This file is located in the same directory as APWIN2PS.
apwin2ps.htm:User manual (this file) in HTML format.
apwin2ps.txt:User manual in ASCII format if you can not read HTML.
ap2pstbl.at1:APWIN setup used for TABLE model output examples.
ap2pstbl.mod:APWIN2PS TABLE model output example.
ap2pspwl.at1:APWIN setup used for PWL model output examples.
ap2pspwl.mod:APWIN2PS PWL model output example.
ap2psfrq.at1:APWIN setup used for FREQ model output examples.
ap2psfrq.mod:APWIN2PS FREQ model output example.
swlicens.htm:Software license agreement in HTML format.
swlicens.txt:Software license agreement in ASCII format.

Compatibility
APWIN2PS has been tested with APWIN 2.00 and Windows 95 on a 133 MHz Pentium PC with 64 MB RAM in the following modes:
  • System One Demo mode.
  • System Two Demo mode.
  • System Two mode with hardware.
  • System Two Cascade Demo mode.
  • System Two Cascade in System Two Compatibility Demo mode.
Output model files from APWIN2PS has been used with:
  • PSpice 5.2, MS-DOS 5.00.
  • PSpice 8.0 Eval, Windows 95.
  • PSpice 9.0 Eval, Windows 95.

Hardware requirements
APWIN2PS has been developed and tested on a 133 MHz Pentium PC with 64 MB RAM and a 1024*768 display. APWIN2PS is very slow (but it saves a few hours of work for each run), so use as fast as possible PC.

Program errors
If you find errors in APWIN2PS, please report these to pp@poulpetersen.dk, including a description of the error and preferably a copy of the APWIN test and the APWIN2PS output file where the error was seen.

Trademarks
"Audio Precision", "APWIN", "System One" and "System Two" are Trademarks of Audio Precision.
"PSpice" is a Trademark of OrCAD.
"Windows" is a Trademark of Microsoft.
V Line
APWIN2PS
PS2APWIN
APDEDIT
NBW
Spacer

Poul Petersen, C/Faya 14, 35120 Arguineguín, Las Palmas, Spain.
Tel/Fax: (+34) 928 152 807, Skype: poul.petersen.gc.
http://www.poulpetersen.dk, E-mail: pp@poulpetersen.dk
Copyright © Poul Petersen 1998 - 2015. Valid HTML 4.0!