PP logo

POUL PETERSEN

APDEDIT v1.00 user's manual.


Contents

Introduction
APDEDIT is an APWIN macro that will copy data between meters, copy upper or lower data values between meters or between multiple traces within meters and it can delete meters or delete appended or nested sweep data from meters. The primary application for APDEDIT is to edit data imported from PSpice simulations with PS2APWIN.
The use of APDEDIT assumes that you are familiar with the operation of APWIN.

License
The use of the APDEDIT 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 APDEDIT in your Quick Launch list, note that APWIN will change the Working directory to the directory where APDEDIT is located each time you run it.
To uninstall APDEDIT, just delete its files.

APDEDIT user dialog

APDEDIT user dialog.

The "Data in APWIN memory." box shows the data currently in APWIN memory. It is updated whenever data is changed with APDEDIT.

The "Source meter(s)." box is where you select the meters to operate upon. Only meters with common measurement can be selected together. For example, you can not select a meter with a voltage measurement and a phase measurement together, but you can select 2 meters with a voltage measurement even if they use different units like dBu and V.

The "Dest. meter." box is where you select the destination of the operation. Only meters with a unit that does not conflict with the selected "Source meter(s)." can be selected. When a meter with data is selected, the data in that meter will be replaced with the data resulting from the selected operation. If an unused meter is selected, the meter will be enabled, and the data resulting from the operation placed there.

The "Options." box:
Selecting the "Merge nested or appended traces in output meter." checkbox will extract the upper or lower values of all traces for the meter selected in "Dest. meter.", and put these in the first trace of the "Dest. meter.". This function is available only if all traces in the meter have the same number of data points.

"Upper" finds the highest values of all "Source meter(s)." and copies these to the meter selected as "Dest. meter.". If "Dest. meter." is also selected in "Source meter(s).", this data will also be included in the comparison. If "Merge nested or appended traces in output meter." is selected, this operation will be performed after data is copied to "Dest. meter.".

"Lower" performs the same function as "Upper" but finds the lowest values in the data.

"Copy meter" copies all data from one meter to another. Only one "Source meter(s)." must be selected for this function to be available. This can not be selected together with "Merge nested or appended traces in output meter.".

"Delete meter(s)" deletes the selected "Source meter(s).". Data 1 or Data 2 can not be deleted if their Graph axis is used by another meter.

"Delete appn" deletes all but the 1st. trace for all meters.

"Quit" exits APDEDIT.

Please note : APDEDIT does not issue any warnings or messages if you delete or overwrite data.


APWIN setup
The basic idea behind APDEDIT is that if APWIN can display the data, APDEDIT can handle it.
APDEDIT 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 measurements to disk for later use, use APWIN's "Save, Test" to be sure that Panel selections and data match each other.

Using APDEDIT
The following example for APDEDIT is for System One, but can be loaded into System Two as well. It demonstrates how to calculate the worst case frequency response for a RIAA (gramophone) preamplifier and import the data into APWIN and save them as a limit file.
The file ps2ap001.cir is the PSpice circuit file for the RIAA amplifier simulation (this circuit is simplified in order to allow it to run on PSpice evaluation versions). The output from the simulation is in the ps2ap001.out file. This file contains a total of 16 data traces with the worst case data in VDB(2).

In APWIN:
Select: "File, Open, Procedure..": ps2apwin.apb
Select: "Procedure, Run".
In the PS2APWIN dialog:
Select: "Open File": ps2ap001.out, wait for the file to load.
Select: "Source 1": AC SENSITIVITY NOMINAL FREQ
Select: "Data 1": AC SENSITIVITY NOMINAL VDB(2) 205 pts
Select: "Create appended sweeps from multiple runs"
Select: "Copy data to APWIN".
Select: "Quit" to exit PS2APWIN.
This has loaded all 16 traces with each 205 data points into APWIN memory in Data 1. The resulting test is ps2ap001.at1.
In APWIN:
Select: "File, Open, Procedure..": apdedit.apb
Select: "Procedure, Run".
In the APDEDIT dialog:
Select: "Source meter(s).": "Data 1".
Select: "Dest meter.": "Data 3".
Select: "Merge nested or appended traces in output meter."
Select: "Upper".
This will copy all data from Data 1 to Data 3 and then find the highest values from Data 3's 16 traces and copy these values to Data 3's 1st. trace.
Select: "Dest meter": "Data 4".
Select "Lower".
This will copy all data from Data 1 to Data 4 and then find the lowest values from Data 4's 16 traces and copy these values to Data 4's 1st. trace.
Select: "Delete appn".
This will delete the 15 last traces from all meters.
Select: "Quit" to exit APDEDIT.
As this is for measuring a RIAA amplifier, the measurements will be made with a pre-emphasized signal, so we need to compensate for this.
In APWIN:
Select: "Compute, Equalize".
Select file: \APWIN\Eq\Riaa-pre.adq.
Enable Equalize for Data 1, Data 3 and Data 4, and select Level A as EQ Source" data.
Select: "Compute and Close".
We now have 3 traces (nominal, minimum and maximum output) centered around +40 dBV. These traces must be moved to the level where the output signal from the amplifier under test will be. This is best done with "Compute, Equalize" or "Compute, Delta", using a linear sweep as reference data.
The resulting limit file is ps2ap001.adl.


Related files
apdedit.apb:APWIN macro.
ppaplib.apb:Some functions and routines required by APDEDIT.
pputlib.apb:Some functions and routines required by APDEDIT.
apdedit.cfg:Configuration file for APDEDIT. This file is written by APDEDIT and is located in the same directory as APDEDIT.
apdedit.htm:User manual (this file) in HTML format.
apdedit.txt:User manual in ASCII format if you can not read HTML.
00000000.ade:Temporary APDEDIT file.
ps2ap001.cir:Example PSpice circuit file.
ps2ap001.out:Example PSpice output file.
ps2ap001.at1:Example APWIN file created from ps2ap001.out.
ps2ap001.adl:Example APWIN limit file created from ps2ap001.at1.
swlicens.htm:Software license agreement in HTML format.
swlicens.txt:Software license agreement in ASCII format.

Compatibility
APDEDIT 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.

Hardware requirements
APDEDIT has been developed and tested on a 133 MHz Pentium PC with 64 MB RAM and a 1024*768 display. APDEDIT 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 APDEDIT, please report these to pp@poulpetersen.dk, including a description of the error and preferably a copy of the PSpice output file and the APWIN test 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!