0% found this document useful (0 votes)
105 views82 pages

MPMS MultiVu EDC Manual A0

Uploaded by

478684354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views82 pages

MPMS MultiVu EDC Manual A0

Uploaded by

478684354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Magnetic Property

Measurement System
External Device Control Language
User’s Manual
For the MPMS MultiVu Software Application

Part Number 1004-100A


Quantum Design
6325 Lusk Blvd.
San Diego, CA 92121
USA
Technical support (619) 481-4400
(800) 289-6996
Fax (619) 481-7410

Second edition of manual completed March 1999.

Trademarks
Product and company names appearing in this manual are trademarks or registered trademarks of their respective holders.

U.S. Patents
5,053,834 High Symmetry DC Squid System
5,139,192 Superconducting Bonds for Thin Film Devices
5,311,125 Magnetic Property Characterization System Employing a Single Sensing Coil Arrangement to Measure AC
Susceptibility and DC Moment of a Sample (patent licensed from Lakeshore)
5,319,307 Geometrically and Electrically Balanced DC Squid System Having a Pair of Intersecting Slits
5,647,228 Apparatus and Method for Regulating Temperature in Cryogenic Test Chamber

Foreign Patents
U.K. 9713380.5 Apparatus and Method for Regulating Temperature in Cryogenic Test Chamber
Canada 2,089,181 High Symmetry DC Squid System
Japan 2,533,428 High Symmetry DC Squid System
C O N T E N T S

Table of Contents
PREFACE
Contents and Conventions ...............................................................................................................................vii
P.1 Introduction .......................................................................................................................................................vii
P.2 Scope of the Manual..........................................................................................................................................vii
P.3 Contents of the Manual .....................................................................................................................................vii
P.4 Conventions in the Manual...............................................................................................................................viii

CHAPTER 1
Introduction and Installation........................................................................................................................ 1-1
1.1 Introduction ..................................................................................................................................................... 1-1
1.2 Overview of the EDC Language ..................................................................................................................... 1-1
1.2.1 Function of Borland Delphi...................................................................................................................... 1-2
1.3 Comparison between MPMS MultiVu EDC and MPMSR2 EDC .................................................................. 1-2
1.4 Installing the EDC Option ............................................................................................................................... 1-5

CHAPTER 2
EDC Operation ................................................................................................................................................... 2-1
2.1 Introduction ..................................................................................................................................................... 2-1
2.2 EDC Programs................................................................................................................................................. 2-1
2.2.1 Components of the EDC Program ............................................................................................................ 2-2
2.2.1.1 Library Declaration............................................................................................................................ 2-2
2.2.1.2 Uses Block......................................................................................................................................... 2-2
2.2.1.3 Var Block........................................................................................................................................... 2-3
2.2.1.4 Function Blocks................................................................................................................................. 2-3
2.2.1.5 Exports Block .................................................................................................................................... 2-3
2.2.1.6 EDCExitProc Procedure .................................................................................................................... 2-4
2.2.2 Variables................................................................................................................................................... 2-5
2.3 EDC Functions ................................................................................................................................................ 2-6
2.3.1 Initialize Function..................................................................................................................................... 2-7
2.3.2 Execute Function ...................................................................................................................................... 2-8
2.3.3 Finish Function......................................................................................................................................... 2-9
2.4 EDC Sequence Commands............................................................................................................................ 2-10
2.4.1 Initialize EDC ......................................................................................................................................... 2-10
2.4.2 Execute EDC .......................................................................................................................................... 2-11
2.4.3 End EDC................................................................................................................................................. 2-11
2.5 Working with EDC........................................................................................................................................ 2-12
2.5.1 Writing an EDC Program ....................................................................................................................... 2-12
2.5.2 Running an EDC Program...................................................................................................................... 2-13
2.5.3 Aborting an EDC Sequence.................................................................................................................... 2-13
2.5.4 Running an EDC Program in the Delphi Debugger ............................................................................... 2-15

Quantum Design MPMS EDC Language User’s Manual i


Contents
Table of Contents

2.6 EDC Data Files.............................................................................................................................................. 2-17


2.6.1 Data File Formatting Commands............................................................................................................ 2-17
2.6.2 Data File Timestamp............................................................................................................................... 2-17
2.7 Description of EDC Operation ...................................................................................................................... 2-18
2.7.1 EDC Execution As a Dynamic Link Library.......................................................................................... 2-18
2.7.2 GPIB Communications........................................................................................................................... 2-18

CHAPTER 3
EDC Commands ................................................................................................................................................ 3-1
3.1 Introduction ..................................................................................................................................................... 3-1
3.2 Overview of EDC Commands ......................................................................................................................... 3-1
3.2.1 Command Syntax ..................................................................................................................................... 3-2
3.2.2 Guide to Location of Commands in the Chapter ...................................................................................... 3-3
3.2.2.1 System Environment Commands....................................................................................................... 3-3
3.2.2.2 System Measurement Commands...................................................................................................... 3-3
3.2.2.3 GPIB Communication Commands .................................................................................................... 3-3
3.2.2.4 Data File Commands ......................................................................................................................... 3-4
3.2.2.5 Utility Commands.............................................................................................................................. 3-4
3.3 System Environment Commands..................................................................................................................... 3-5
3.3.1 Wait .......................................................................................................................................................... 3-5
3.3.2 SetField..................................................................................................................................................... 3-6
3.3.3 GetField .................................................................................................................................................... 3-7
3.3.4 UpdateField .............................................................................................................................................. 3-7
3.3.5 SetTemp.................................................................................................................................................... 3-8
3.3.6 GetSystemTemp ....................................................................................................................................... 3-8
3.3.7 GetBridgeTemp ........................................................................................................................................ 3-9
3.4 System Measurement Commands.................................................................................................................. 3-10
3.4.1 SetDCMeasParams ................................................................................................................................. 3-10
3.4.2 MeasureDC............................................................................................................................................. 3-11
3.4.3 GetDCMoment ....................................................................................................................................... 3-12
3.4.4 GetDCStdDev......................................................................................................................................... 3-12
3.4.5 SetRSOMeasParams ............................................................................................................................... 3-13
3.4.6 MeasureRSO........................................................................................................................................... 3-14
3.4.7 GetRSOMoment ..................................................................................................................................... 3-15
3.4.8 GetRSOStdDev....................................................................................................................................... 3-15
3.4.9 SetACMeasParams ................................................................................................................................. 3-16
3.4.10 MeasureAC........................................................................................................................................... 3-17
3.4.11 GetACFrequency .................................................................................................................................. 3-18
3.4.12 GetACmPrime ...................................................................................................................................... 3-18
3.4.13 GetACmDblPrime ................................................................................................................................ 3-19
3.4.14 GetACMeasAmp .................................................................................................................................. 3-19
3.4.15 GetACMeasPhase................................................................................................................................. 3-20
3.4.16 GetACmPrimeStdDev .......................................................................................................................... 3-20
3.4.17 GetACmDblPrimeStdDev .................................................................................................................... 3-21
3.4.18 GetACMeasAmpStdDev ...................................................................................................................... 3-21
3.4.19 GetACMeasPhaseStdDev ..................................................................................................................... 3-22
3.5 GPIB Communication Commands ................................................................................................................ 3-23
3.5.1 SendRead................................................................................................................................................ 3-23
3.5.2 SendReadNumber................................................................................................................................... 3-24
3.5.3 Send ........................................................................................................................................................ 3-25
3.5.4 Read........................................................................................................................................................ 3-26
3.5.5 ReadNumber........................................................................................................................................... 3-27

ii MPMS EDC Language User’s Manual Quantum Design


Contents
Table of Contents

3.5.6 Trigger .................................................................................................................................................... 3-28


3.5.7 InitDevice ............................................................................................................................................... 3-29
3.6 Data File Commands ..................................................................................................................................... 3-30
3.6.1 SetDataFile ............................................................................................................................................. 3-30
3.6.2 SetPlotAppearance.................................................................................................................................. 3-31
3.6.3 SetPlotItems............................................................................................................................................ 3-32
3.6.4 SetAxisLimits ......................................................................................................................................... 3-33
3.6.5 SetDataFileLabels................................................................................................................................... 3-34
3.6.6 OpenDataFile.......................................................................................................................................... 3-35
3.6.7 SetDataFileTitle...................................................................................................................................... 3-35
3.6.8 SetDataFileTime ..................................................................................................................................... 3-36
3.6.9 WriteData ............................................................................................................................................... 3-37
3.7 Utility Commands.......................................................................................................................................... 3-38
3.7.1 IsAborting............................................................................................................................................... 3-38
3.7.2 ExtractNumStr ........................................................................................................................................ 3-39
3.7.3 GetTimeStamp........................................................................................................................................ 3-40
3.7.4 GetTimeStampStr ................................................................................................................................... 3-40
3.8 Quick Reference Guide for EDC Commands................................................................................................ 3-41

References ..............................................................................................................................................References-1

Index ................................................................................................................................................................ Index-1

Quantum Design MPMS EDC Language User’s Manual iii


Contents
Table of Figures

Figures
Figure 2-1. Select an EDC File to Initialize Dialog Box ........................................................................................ 2-10
Figure 2-2. Execute EDC Program Dialog Box ..................................................................................................... 2-11
Figure 2-3. Abort EDC Program Dialog Box......................................................................................................... 2-14
Figure 2-4. Warning Message in Abort EDC Program Dialog Box....................................................................... 2-14
Figure 2-5. Run Parameters Dialog Box ................................................................................................................ 2-15
Figure 2-6. Add Source Breakpoint Dialog Box .................................................................................................... 2-15

iv MPMS EDC Language User’s Manual Quantum Design


Contents
Table of Tables

Tables
Table 1-1. EDC Command Compatibility Chart ...................................................................................................... 1-3

Table 2-1. MPMS MultiVu Units Required to Run EDC Program.......................................................................... 2-2

Quantum Design MPMS EDC Language User’s Manual v


P R E F A C E

Contents and Conventions

P.1 Introduction
This preface contains the following information:

• Section P.2 discusses the overall scope • Section P.4 illustrates and describes
of the manual. conventions that appear in the manual.
• Section P.3 briefly summarizes the
contents of the manual.

P.2 Scope of the Manual


This manual explains how to use the External Device Control (EDC) language option for the
MPMS MultiVu system. This manual explains how to write and run EDC programs, and it
describes all EDC commands.

This manual assumes you are familiar with the Windows operating system.

P.3 Contents of the Manual


• Chapter 1 presents an overview of • Chapter 3 describes all the EDC
the EDC language. commands.
• Chapter 2 explains how to work with
the EDC language.

Quantum Design MPMS EDC Language User’s Manual vii


Section P.4 Preface
Conventions in the Manual Contents and Conventions

P.4 Conventions in the Manual


File menu Bold text distinguishes the names of software windows, dialog boxes, menus,
panels, options, and buttons.

File¾Open The ¾ symbol indicates that you select multiple, nested software options.

.dat The Courier font distinguishes code and the names of files and directories.

<Enter> Angle brackets distinguish the names of keys located on the PC keyboard.

<Alt+Enter> A plus sign connecting the names of two or more keys distinguishes keys you
press simultaneously.

A pointing hand introduces a supplementary note.

An exclamation point inside an inverted triangle introduces a cautionary


note.

A lightning bolt inside an inverted triangle introduces a warning.

viii MPMS EDC Language User’s Manual Quantum Design


C H A P T E R 1

Introduction and Installation

1.1 Introduction
This chapter contains the following information:

• Section 1.2 presents an overview of the • Section 1.4 explains how to install the
EDC language. EDC option.
• Section 1.3 compares the MPMS MultiVu
EDC language and the MPMSR2 EDC
language.

1.2 Overview of the EDC Language


The External Device Control (EDC) language for the MPMS MultiVu system is designed to allow
users to access and control external devices through the same GPIB system that controls the MPMS
SQUID magnetometer. The MPMS EDC option includes a high-level language compiler and linker
(Borland Delphi) that is used with provided functionality to send and receive data over the GPIB
interface, access the MPMS MultiVu system, and output data to data files that can be read by the
MPMS MultiVu software.

EDC provides the ability to trigger devices, send data, receive data, and wait until a condition is met
or a specified length of time elapses. EDC allows control of the system temperature and magnetic
field and of measurement and plotting functions. EDC supports real and string variables, and it
allows mathematical operations as well as real-time user input. Standard programming functions,
such as loops, conditionals, and subroutines, make EDC programs flexible and easy to read. Program
comments, which are enclosed in curly brackets, can be included in an EDC file and are ignored by
the Delphi compiler.

The new EDC language requires only a short learning curve while providing enhanced capabilities.
However, the user is responsible for implementing EDC correctly. Poorly written code can lock up
the system and create infinite loops. This manual includes guidelines and sample code that should be
reviewed before the EDC language is used.

Quantum Design MPMS EDC Language User’s Manual 1-1


Section 1.3 Chapter 1
Comparison between MPMS MultiVu EDC and MPMSR2 EDC Introduction and Installation

1.2.1 Function of Borland Delphi


The Delphi compiler is a 32-bit Pascal compiler used to write, compile, build, and debug a 32-bit
Windows Dynamic Link Library that is accessed from specialized MPMS MultiVu sequence
commands. The compiler supports a complete library of data storage types and structures, library
functions, and program flow control constructs for writing simple to complex programs using
structured programming and/or object-oriented techniques.

The EDC option includes a predefined project template file that is already set up to start writing EDC
programs. This predefined project file includes commented sections indicating where code to control
the program is written. The EDC option project is linked to several precompiled Delphi unit files that
provide access to an Mpms object variable that encapsulates a long list of functions for accessing the
MPMS system, executing measurements, and writing MPMS MultiVu data files.

1.3 Comparison between MPMS MultiVu EDC and


MPMSR2 EDC
In the EDC language for the MPMSR2 DOS software, the user wrote the text file in a separate editor
and used Quantum Design−supplied EDC commands. The MPMSR2 software was completely in
control of the EDC language and interpreted the EDC commands one line at a time. MPMSR2
included no capability for line-by-line debugging and allowed only DC measurements. In EDC for
MPMS MultiVu, however, Quantum Design provides a shell Delphi program to which the user adds
code as necessary, and the user writes code in only one location. MPMS MultiVu EDC supports DC,
AC, and RSO measurements. While MPMS MultiVu is running, the application can be debugged
line by line. MPMS MultiVu EDC uses the Pascal language, structured programming, data storage,
and an OOP design.

MPMS MultiVu and the new EDC option utilize the National Instruments GPIB interface instead
of the Hewlett-Packard HPIB interface, which was used by the MPMSR2 DOS software. The GPIB
commands do not require that the 70 prefix be added to the device number. In MPMS MultiVu EDC,
just ‘6’ instead of ‘706’ is used in order to address device 6. In addition, the HPIB interface for
MPMSR2 EDC terminated all commands with a linefeed character (hex value 0A). MPMS MultiVu
EDC adds no terminating character to commands sent down the GPIB bus. However, the GPIB
interface raises the EOI line at the end of a command. If a specific device requires terminating
characters, you must append them to the command string. The Model 1802 Digital R/G Bridge
(device 8) and Model 1822 MPMS Controller (device 6) require either a linefeed or a semicolon
character to terminate their commands. Refer to the following example:

Mpms.Send(22,'R4x'#13#10);

This example appends a carriage return and linefeed characters to the command string.

The MPMS MultiVu EDC program is a fully functional Windows DLL, so the user has full access to
the Windows 32-bit API. Because the EDC option was not designed to run as a separate application,
it does not work efficiently with its own windows and dialogs. However, simple message boxes as
well as input dialogs for collecting user input are available.

1-2 MPMS EDC Language User’s Manual Quantum Design


Chapter 1 Section 1.3
Introduction and Installation Comparison between MPMS MultiVu EDC and MPMSR2 EDC

MPMS MultiVu EDC is controlled by sequence commands in an MPMS MultiVu sequence. The
Execute EDC command allows the user to specify a string to pass to the EDC program so he or she
can program varying functionality into an EDC program in order to allow one program to perform
numerous tasks.

Table 1-1. EDC Command Compatibility Chart

MPMSR2 EDC MPMS MULTIVU EDC


COMMAND COMMAND DESCRIPTION
CLongEMU GetDCMoment Accesses DC moment last calculated for
GetRSOMoment longitudinal SQUID.
GetACmPrime
GetACmDblPrime
CLongSTD GetDCStdDev Accesses standard deviation moment last
GetRSOStdDev calculated for longitudinal SQUID.
GetACmPrimeStdDev
GetACmDblPrimeStdDev
CMag GetField Accesses current magnetic field.
Concat Supported by Pascal Concatenates two strings.
ConcatAsc Supported by Pascal Concatenates ASCII character onto string.
CTemp GetSystemTemp Accesses current temperature.
CTransEMU GetDCMoment Accesses DC moment last calculated for
GetRSOMoment transverse SQUID.
GetACmPrime
GetACmDblPrime
CTransSTD GetDCStdDev Accesses standard deviation moment last
GetRSOStdDev calculated for transverse SQUID.
GetACmPrimeStdDev
GetACmDblPrimeStdDev
Date Supported by Pascal Gets formatted date.
Dec Supported by Pascal Converts number from scientific notation to
decimal notation.
For Supported by Pascal For loops.
Goto Supported by Pascal Go to line.
If Supported by Pascal If conditions statement.
Input Supported by Delphi Prompts for user input.
(InputBox)
Measure MeasureDC Performs specified measurement.
MeasureRSO
MeasureAC
Midstring Supported by Pascal Accesses substring within a string.

(table continues)

Quantum Design MPMS EDC Language User’s Manual 1-3


Section 1.3 Chapter 1
Comparison between MPMS MultiVu EDC and MPMSR2 EDC Introduction and Installation

Table 1-1. EDC Command Compatibility Chart (Continued)

MPMSR2 EDC MPMS MULTIVU EDC


COMMAND COMMAND DESCRIPTION
Monitor Not supported Stops or continues monitor loop.
Pause Supported by Pascal Stops program for specified time.
Plot SetPlotItems Plots point in graph.
SetPlotAppearance
WriteData
PlotLabel SetDataFileLabels Specifies title and axes labels.
PlotLimit SetAxisLimits Sets limits for plot.
Print Not supported Writes data to printer and data file.
Read Read Reads string or number from device.
ReadNumber
Repeat Supported by Pascal Loop control.
SendRead SendRead Sends command and reads back data.
SendReadNumber
SetMag SetField Sets magnetic field.
SetTemp SetTemp Sets system temperature.
SubRoutine Supported by Pascal Creates subfunctions.
Time GetTimeStamp Accesses current time.
GetTimeStampStr
UpdMag UpdateField Corrects field-intensity data.
Wait Wait Waits for temperature or field stability.
While Supported by Pascal Loop control.
Write Send Writes the device.

1-4 MPMS EDC Language User’s Manual Quantum Design


Chapter 1 Section 1.4
Introduction and Installation Installing the EDC Option

1.4 Installing the EDC Option


1. Install Delphi on the control PC. Delphi should be installed before you install the EDC option.
When you install EDC, EDC looks to see whether Delphi is installed.
2. Insert EDC Disk 1 into the control PC.
3. Select the A: drive.
4. Select Setup.exe.
5. Complete all on-screen instructions the InstallShield wizard prompts you to perform. If Delphi is
installed, EDC modifies Delphi in several ways.
6. Reboot the PC if you are prompted to do so.

Quantum Design MPMS EDC Language User’s Manual 1-5


C H A P T E R 2

EDC Operation

2.1 Introduction
This chapter contains the following information:

• Section 2.2 presents an overview of • Section 2.5 explains how to write and
EDC programs and discusses program run an EDC program.
components.
• Section 2.3 discusses EDC functions. • Section 2.6 discusses EDC data files.
• Section 2.4 discusses the MPMS MultiVu • Section 2.7 describes EDC program
EDC sequence commands. operation.

2.2 EDC Programs


EDC programs are created in the Delphi application by using a pre-existing project template file called
EDCPrgm.dpr. The EDCPrgm.dpr file is a Delphi project file that has been set up to access the
MPMS system and create a Windows DLL. The EDCPrgm.dpr project file contains all code neces-
sary to build an EDC program. Comments in the project file indicate where you may write code to
control your program.

The EDC project contains three export functions⎯Initialize, ExecuteEDC, and Finish⎯which are the
functions the MPMS MultiVu software accesses from a running sequence. To build an EDC program,
you only need to add code to the Initialize, ExecuteEDC and Finish functions. The Initialize EDC,
Execute EDC, and End EDC MPMS MultiVu sequence commands call the EDC functions in the
EDC DLL. Initialize EDC calls the Initialize function, Execute EDC calls the ExecuteEDC function,
and End EDC calls the Finish function in whichever EDC DLL was initialized.

Quantum Design MPMS EDC Language User’s Manual 2-1


Section 2.2 Chapter 2
EDC Programs EDC Operation

2.2.1 Components of the EDC Program

2.2.1.1 LIBRARY DECLARATION

The library declaration at the beginning of the EDC project file tells Delphi to build a DLL with
whatever name is specified by the declaration. The specified name is the name of the project file.
When you use the Delphi File¾Save Project As menu command to save the project file with a new
name, the name in the library declaration and the name of the DLL file are automatically changed.

2.2.1.2 USES BLOCK

uses
SysUtils,
Classes,
Windows,
Dialogs,
{MultiVu units required to run EDC program}
MpmsUnit, MpmsExports, MpmsOleDll, MpmsDefinitions;

The uses block in the EDC project file defines which Delphi and MPMS units each EDC program
must include. The Delphi-supplied units included in the uses block provide a wide variety of
Delphi functionality. The MPMS units provide access to the MPMS system and to constants and
enumerations used in the Mpms object member functions. You must not remove any unit name
appearing in the uses block.

If you write your own Delphi units, add their file names to the uses block in order to include them in
the project build. You may also need to include some of these units in the uses block of your units.

For more information about either the uses block or Delphi units, refer to the Delphi on-line
documentation.

Table 2-1. MPMS MultiVu Units Required to Run EDC Program

MPMS MULTIVU UNIT FUNCTION


MpmsUnit Contains TMpms class definition and method implementations.
MpmsExports Exports additional functions to MPMS MultiVu to allow EDC
program to import functions from MPMS MultiVu DLLs.
MpmsOleDll Defines TmpmsOleDll class, which contains function definitions for
every exported function in MPMS MultiVu EDCOle.dll file.
MpmsDefinitions Contains all enumerations and constants used in method functions of
TMpms class.

2-2 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.2
EDC Operation EDC Programs

2.2.1.3 VAR BLOCK

var
ExitProcSave : Pointer; {Default Exit procedure pointer, Do Not
Remove.}
{------------------- Start of User Code ------------------------}
{User defined types go here}

{==================== End of User Code =========================}

The var block that follows the uses block is used to declare global variables for the DLL program.
Refer to section 2.2.2 and to the Delphi on-line documentation for a more detailed explanation of
global variables and how they are used.

2.2.1.4 FUNCTION BLOCKS

The function Initialize, function ExecuteEDC, and function Finish blocks


appear immediately after the var block. Section 2.3 discusses the functions in detail.

2.2.1.5 EXPORTS BLOCK

{do not modify these export declarations unless you add more}
exports
Initialize,
ExecuteEDC,
Finish;

The exports block lists the names of the functions exported by the DLL. Exported functions can
be accessed by other applications that use the DLL. The exported functions are the functions that
MPMS MultiVu accesses through the EDC sequence commands. The Initialize, ExecuteEDC, and
Finish functions must always appear in the exports block. Do not delete these three functions.
If MPMS MultiVu does not find the Initialize, ExecuteEDC, and Finish functions, the EDC program
cannot be executed.

You can add more functions to the exports block.

Quantum Design MPMS EDC Language User’s Manual 2-3


Section 2.2 Chapter 2
EDC Programs EDC Operation

2.2.1.6 EDCExitProc PROCEDURE

procedure EDCExitProc;
begin
{------------------- Start of User Code ------------------------}
{Users DLL exit code goes here.}

{==================== End of User Code =========================}


{Do Not Remove}
ExitProc := ExitProcSave; // restore the existing ExitProc address
end;

//////////////////////////////////////////////////////////////////
begin
{------------------- Start of User Code ------------------------}
{Users DLL initialization code goes here.}

{==================== End of User Code =========================}


{This code saves the exit procedure address and installs the
EDCExitProc which will be called when the DLL is removed from
memory at the end of a Mpms MultiVu sequence.}
{Do Not Remove}
ExitProcSave := ExitProc; // save the existing ExitProc address
ExitProc := @EDCExitProc; // Install EDC exit procedure

end.

The EDCExitProc procedure appearing near the end of a project file is called when the DLL is
removed from memory by the calling application. MPMS MultiVu removes all EDC programs that
were used by a sequence when the sequence ends or is terminated. Use of this procedure is optional
and, in most cases, unnecessary. The last begin ... end block is the DLL initialization block that
is called when the DLL is first loaded into memory by the calling application. Although this section
can be used, it is not necessary given the Initialize function and its intended purpose.

2-4 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.2
EDC Operation EDC Programs

2.2.2 Variables
The Delphi language supports the use of local and global variables in your program. Local variables
are declared in the var section of each function. Global variables are declared in the var block of the
project file or in the unit file if you are writing a Delphi unit.

Local variables are valid only during the execution of the function in which they are declared. When
the function ends, the variable’s contents are lost.

function ExecuteEDC(const measureText : pChar) : Integer; cdecl;


{------------------- Start of User Code ------------------------}
{Users local variable definitions go here.}
var
myloc : Double;

{==================== End of User Code =========================}


begin
...
end;

Global variables are valid for the life of the DLL; that is, they are valid while the DLL remains loaded
in memory by the calling application. MPMS MultiVu loads the EDC program DLL when it is first
executed through either the Initialize EDC or Execute EDC sequence command.

Quantum Design MPMS EDC Language User’s Manual 2-5


Section 2.3 Chapter 2
EDC Functions EDC Operation

2.3 EDC Functions


Every EDC program must contain the three export functions⎯Initialize, ExecuteEDC, and Finish⎯
in order for MPMS MultiVu to access the program. Fundamentally, there is no difference between
what each function accomplishes. However, how and when the functions are executed by the MPMS
MultiVu Initialize EDC and Execute EDC sequence commands determines the different types of
tasks each function is expected to accomplish.

The first time any function is called in an EDC program, MPMS MultiVu loads the EDC program
DLL into memory, and the DLL then remains in the MPMS MultiVu process space for the duration
of the running sequence. When the sequence terminates normally or is aborted, the DLL is freed by
MPMS MultiVu so that the Windows operating system can remove it from memory.

Each function in the EDC program returns an integer to the MPMS MultiVu sequence command.
The integer can be used to indicate the success or failure of the function. A return value of 0 indicates
no errors occur during execution, and because no errors occur, MPMS MultiVu continues to the next
sequence command. A return value of -1 (FATAL_ERROR) indicates a fatal error occurs and causes
MPMS MultiVu to display an error message and abort the running sequence. Any other return value
displays an error message and logs the value returned to the present event log file.

Every function block includes three keywords: try, except, and end. You enter code between the
try and except keywords. Any code you enter following the except keyword is executed only in
an exception. Refer to the Delphi on-line documentation for more information about exceptions.

It is advisable to use the EDC functions to perform generic operations. Keeping the EDC program
generic makes it versatile and reusable, so you can perform another operation by just making quick
changes to the sequence. You can, of course, write EDC programs to perform many functions to
collect measurement data all within the confines of a single function. However, this can make it
difficult for you to gauge the progress of the program while it is running. If you use the MPMS
MultiVu sequence commands to perform a portion of the functionality of a program, the progress
of the program is more visible in the Sequence Status dialog box.

2-6 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.3
EDC Operation EDC Functions

2.3.1 Initialize Function


function Initialize : Integer; cdecl;
{------------------- Start of User Code ------------------------}
{Users local variable definitions go here.}

{==================== End of User Code =========================}


begin
try {Do not remove}
{------------------- Start of User Code ------------------------}
{Users initialization code goes here.}

Result := Good; {function result returned to MultiVu}


{==================== End of User Code =========================}

except {Do not modify code in this exception handler}


on EAbort do
begin
Result := Bad;
end;
end;
end;

The Initialize function is intended to initialize an external device so that the device is prepared for
subsequent calls. For instance, the Initialize function can be used to send a series of commands to
a device to set specific ranges for upcoming measurements. The Initialize function should also be
used to initialize global variables or to allocate dynamic variables and data structures.

The Initialize EDC sequence command calls the Initialize function in the EDC program. Typically,
Initialize EDC is called once in any sequence and is used to initialize an EDC program and to block
sequence commands together that address the identical EDC program. Section 2.4.1 discusses
Initialize EDC in more detail.

Quantum Design MPMS EDC Language User’s Manual 2-7


Section 2.3 Chapter 2
EDC Functions EDC Operation

2.3.2 Execute Function


function ExecuteEDC(const measureText : pChar) : Integer; cdecl;
{------------------- Start of User Code ------------------------}
{Users local variable definitions go here.}

{==================== End of User Code =========================}


begin
try {Do not remove}
{------------------- Start of User Code ------------------------}
{Users execution code goes here.}

Result := Good; {function result returned to MultiVu}


{==================== End of User Code =========================}
except {Do not modify code in this exception handler}
on EAbort do
begin
Result := Bad;
end;
end;
end;

The ExecuteEDC function is intended to perform the actual EDC measurement. ExecuteEDC can
access any global variables and the values of those variables will be maintained during subsequent
calls from the sequence command. ExecuteEDC can be called repeatedly by the MPMS MultiVu
sequence.

The Execute EDC sequence command calls the ExecuteEDC function in the EDC program. Section
2.4.2 discusses Execute EDC in more detail.

The ExecuteEDC function has one parameter. This parameter is a pChar type parameter containing a
null-terminated string value that was specified in the Execute EDC sequence command. This param-
eter allows you to pass, at your discretion, a run-time value to the EDC program.

In a sequence, you typically call the Initialize and ExecuteEDC functions for the same EDC program.
You can, however, call just the ExecuteEDC function, or you can call Initialize and ExecuteEDC
functions for different program DLL files.

2-8 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.3
EDC Operation EDC Functions

2.3.3 Finish Function


function Finish : Integer; cdecl;
{------------------- Start of User Code ------------------------}
{Users local variable definitions go here.}

{==================== End of User Code =========================}


begin {Implementation code for ExecuteEDC function}
try
{------------------- Start of User Code ------------------------}
{Users finalization code goes here.}

Result := Good; {function result returned to MultiVu}


{==================== End of User Code =========================}
except {Do not modify code in this exception handler}
on EAbort do
begin
Result := Bad;
end;
end;
end;

The Finish function can send commands to initialized external devices in order to restore any original
state of the devices, and the Finish function can de-allocate any Windows resources, like memory, that
were allocated with the Initialize function. Finish thus ensures that the EDC program exits cleanly.

The End EDC sequence command calls the Finish function in the EDC program. End EDC is
automatically added to a sequence whenever Initialize EDC is added to a sequence. End EDC
is inserted below Initialize EDC and marks the conclusion of the EDC block.

Quantum Design MPMS EDC Language User’s Manual 2-9


Section 2.4 Chapter 2
EDC Sequence Commands EDC Operation

2.4 EDC Sequence Commands


The Magnetic Property Measurement System: MPMS MultiVu Application User’s Manual (Quantum
Design 1998) discusses sequence operation in detail.

2.4.1 Initialize EDC


The Initialize EDC sequence command calls the Initialize function in the EDC program. Typically,
Initialize EDC is called once in any sequence and is used to initialize an EDC program and to block
sequence commands together that address the identical EDC program.

Within a sequence, Initialize EDC creates a command block, which functions like the control loop
created by a scan sequence command. When Initialize EDC is added to a sequence, the End EDC
sequence command is automatically inserted immediately below Initialize EDC to mark the
conclusion of the Initialize EDC command block. Any number of sequence commands, including
any number of Execute EDC commands, can be inserted in the Initialize EDC block. Commands
inserted in the block are indented like commands in the control loop created by a scan sequence
command.

To add the Initialize EDC command to a sequence, you double-click on Initialize EDC in the MPMS
MultiVu sequence command bar. The Select an EDC File to Initialize dialog box opens. You use
this dialog box to select a DLL to run. As soon as you select a DLL, the name of the Initialize EDC
command and the name and location of the DLL all appear on a single line in the sequence editor. The
End EDC command is automatically inserted immediately below the Initialize EDC command line.

Figure 2-1. Select an EDC File to Initialize Dialog Box

2.4.2 Execute EDC


The Execute EDC sequence command calls the ExecuteEDC function in the EDC program. Execute
EDC may be called any number of times within a sequence, and it may be called for the same EDC
program or for multiple programs. If the sequence includes the Initialize EDC sequence command,
Execute EDC is usually placed inside the Initialize EDC command block. Execute EDC, unlike
Initialize EDC, does not create a command block.

2-10 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.4
EDC Operation EDC Sequence Commands

Execute EDC includes two parameters. The first specifies the EDC program you want to execute.
The second specifies an optional text string that is passed to the Execute EDC function in the EDC
program.

To add the Execute EDC command to a sequence, you double-click on Execute EDC in the MPMS
MultiVu sequence command bar. The Execute EDC Program dialog box opens. You use this dialog
box to select a DLL to run.

If the sequence includes the Initialize EDC command, you generally use Execute
EDC to call the same EDC program specified in the initialization block. However,
NOTE Initialize EDC and Execute EDC do not have to call the identical program.

Figure 2-2. Execute EDC Program Dialog Box

You can use the Supplemental Command String text box in the Execute EDC Program dialog box
to type any text that you want to pass to the EDC program. As soon as you select OK in the dialog
box, the name of the Execute EDC command, the name and location of the DLL, and any
supplemental text you entered all appear on a single line in the sequence editor.

2.4.3 End EDC


The End EDC sequence command calls the Finish function in the EDC program. End EDC is
automatically added to a sequence whenever Initialize EDC is added to a sequence. End EDC, which
marks the conclusion of the Initialize EDC block, is inserted below Initialize EDC.

Quantum Design MPMS EDC Language User’s Manual 2-11


Section 2.5 Chapter 2
Working with EDC EDC Operation

2.5 Working with EDC

2.5.1 Writing an EDC Program


Before you can write an EDC program, you must start the Delphi application and then open the EDC
project template file. To start Delphi, you can click on the Windows Start button and then select
Programs¾Borland Delphi 4¾Delphi 4. Then, to open the EDC project template file within Delphi
you select File¾Open Project and locate the EDCPrgm.dpr file in the QdMpms\EDCPrograms\
Projects directory. Alternatively, you can open the EDCPrgm.dpr file directly by double-
clicking on the EDC Project Template icon on the desktop. You may also select the template icon
found on the Windows Start button under Programs¾Quantum Design¾EDC Project Template.

Once the EDCPrgm.dpr project file is open, you can add code as necessary to the Initialize,
ExecuteEDC, and/or Finish functions. The provided comments are a guide that indicate where
you should insert code. Refer to chapter 3 for a list of the Mpms object commands and examples
of their use. Refer to section 2.3 for a description of the EDC project functions and their use.

While you work on the project file, periodically select Project¾Syntax check in order to use the
Delphi integrated environment to check your code syntax. Save the project under a different name
to preserve the EDCPrgm.dpr file as a template for further use. Use the File¾Save Project As
command and specify a new name for your project. File¾Save Project As automatically changes
the name of the library (as shown in the library declaration at the top of the project file). You
can use this same technique to create new programs from existing project files.

To create an EDC program you must first build the project file. Select Project¾Build to build the
project file and create the DLL file that you will execute from an MPMS MultiVu sequence. Delphi
tells you if your code has any errors and directs you to the specific lines causing the error. A project
built with errors cannot create a DLL; you must correct all errors before the DLL can be created.
Delphi may also issue warnings and hints about the code you have written. While warnings and hints
do not prevent the DLL from being created, they can identify errors in program flow that may cause
problems when the program runs. Try to correct all code associated with warnings in order to prevent
any further unforeseen complications.

When you use control statements to create loops in your program, be sure you
safeguard your code against infinite execution loops, and be sure you add code
NOTE that will allow the program to be aborted from the MPMS MultiVu sequence
controller. See section 2.5.3 for a discussion about aborting an MPMS MultiVu
sequence that is running an EDC program.

2-12 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.5
EDC Operation Working with EDC

2.5.2 Running an EDC Program


There are basically two ways to run an EDC program. You can run the program DLL from an
MPMS MultiVu application that is already running, or you can use the Delphi integrated debugger
to step through your code line by line. Section 2.5.4 explains in detail how you use the Delphi
debugger to execute a program.

You can conveniently test and change your program if both Delphi and MPMS MultiVu are running
simultaneously on the system computer. If Delphi and MPMS MultiVu are already running on the
system computer, you can leave Delphi running while you execute your program. If MPMS MultiVu
is running on a computer that is not hooked up to the MPMS, you can select the MPMS MultiVu
Simulation icon on the desktop in order to run MPMS MultiVu in simulation mode on your Delphi
development computer. Having Delphi and MPMS MultiVu running simultaneously makes it
convenient to switch back and forth between the two applications.

To run an EDC program, use the Windows task bar or the <Alt+Tab> key combination to switch to
MPMS MultiVu. Create or edit an existing sequence in MPMS MultiVu and insert Initialize EDC
and/or Execute EDC commands as desired, specifying the DLL you just created in Delphi. When
you run the sequence, your program DLL is loaded into the MPMS MultiVu application’s memory
space and the appropriate functions are executed.

You can edit an EDC program after you run it in MPMS MultiVu. After the sequence terminates
normally or is aborted, use the Windows task bar to switch tasks to Delphi. Your EDC program
should still be loaded in Delphi. Edit the code as necessary and build the program again. Notice that
if MPMS MultiVu is still running the sequence calling your EDC program, you can edit the program’s
code, but you cannot build the project because MPMS MultiVu has locked the DLL file. MPMS
MultiVu does not release the DLL until the sequence terminates. After editing the program and
building the DLL again, you can switch back to MPMS MultiVu and rerun the same sequence to test
your changes.

2.5.3 Aborting an EDC Sequence


You may abort a sequence executing an EDC program the same way you abort any sequence.
However, you should take some extra steps to ensure that the EDC program aborts cleanly.

All EDC functions include an exception handler block at the end of their try ... except block.
The exception handler block is designed to catch an EAbort exception. If you tell MPMS MultiVu to
abort the running sequence while MPMS MultiVu is executing an EDC sequence command, MPMS
MultiVu calls a special exported function in the DLL that sets the abortFlag member variable of the
Mpms object to True. You can test this member variable in your program by using the IsAborting
EDC command (see section 3.7.1). All EDC commands check for this flag at the beginning of their
execution. If the flag is true, an EDC command raises an EAbort exception using the Abort procedure.
When this exception is raised, execution of a program immediately diverts to the exception handler
code in the appropriate function. Refer to the Delphi on-line documentation for more information
about the EAbort exception and the Abort procedure.
except {Do not modify code in this exception handler}
on EAbort do
begin
Result := Bad;
end;
end;

Quantum Design MPMS EDC Language User’s Manual 2-13


Section 2.5 Chapter 2
Working with EDC EDC Operation

Even with this built-in check, it is still possible to write a control loop in Delphi by using the repeat
statement, while statement, or for statement. If the program execution cannot exit from these types
of loops, the EDC program cannot terminate cleanly. To ensure that your program is able to abort
a control loop, include the following statement inside the loop:

If Mpms.IsAborting() then Abort;

This statement forces the program execution to jump to the exception handler if MPMS MultiVu sets
the abortFlag in the Mpms object to True. After the exception block is executed, the EDC function
returns to the MPMS MultiVu sequence and the sequence is allowed to abort cleanly.

If an EDC sequence command does not return within 1 second after


MPMS MultiVu has been told to abort the sequence that is
executing the command, MPMS MultiVu opens a dialog box Figure 2-3. Abort EDC
indicating that it is waiting for the EDC program to terminate. Program Dialog Box

If you select the Terminate EDC Program Now button in the


dialog box, the EDC program attempts to terminate the thread of execution that is running the EDC
program. If the EDC program terminates in the 20-second period, the Abort EDC Program dialog
box closes and the sequence aborts. If the EDC program does not terminate, MPMS MultiVu asks
whether you want to terminate the program or continue waiting. If you elect to terminate the
sequence, MPMS MultiVu generates a warning that tells you how sudden termination can potentially
harm the operating system.

Figure 2-4. Warning Message in Abort EDC Program Dialog Box

If the EDC program thread is terminated by using the Terminate EDC


Program Now button, the sudden termination can corrupt the state of the
Windows operating system and ultimately destabilize both MPMS MultiVu
CAUTION and the Windows operating system.

MPMS MultiVu does include built-in safeguards that try to protect EDC programs from sudden
termination. If you try to abort a sequence that calls an infinite control loop and that loop does not
include a check for the abort flag, MPMS MultiVu automatically delays termination 20 seconds in
order to allow the EDC program to complete its current task. You can, however, override the
automatic delay by selecting the Terminate EDC Program Now button in the Abort EDC Program
dialog box.

When you abort a sequence, the system does not check for a return value.

2.5.4 Running an EDC Program in the Delphi Debugger


To run an EDC program in the Delphi debugger, Delphi must start the MPMS MultiVu application.
If MPMS MultiVu is running, exit MPMS MultiVu by selecting File¾Exit. Then, to set up Delphi
to run MPMS MultiVu from the debugger, select the Delphi Run¾Parameters menu command.
A dialog box opens that allows you to specify the host application and its command line parameters.

2-14 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.5
EDC Operation Working with EDC

Figure 2-5. Run Parameters Dialog Box

Use the Browse button to select the MPMS MultiVu executable file (MpmsMVu.exe) as the host
application. The MpmsMVu.exe executable file is usually in the C:\QdMpms\MultiVu directory.

If you are using the computer attached to the MPMS hardware, you do not need to enter any command
line parameters. However, if you are developing your EDC program on a separate computer, you can
enter the following parameters to use MPMS MultiVu in simulation mode.

-gpibsim –commsim

These parameters force MPMS MultiVu to simulate the GPIB and comm port communications.
If your computer is not connected to the MPMS hardware but you do have the proper GPIB board
installed, you can use EDC to talk to an external device while simulating the remainder of the MPMS
hardware. To do this, replace the –gpibsim parameter with the following two parameters.

-gpibsim6 and -gpibsim8

These two parameters force MPMS MultiVu to simulate GPIB devices 6 and 8.

To debug your program, set breakpoints at any desired


location in the code. To set a breakpoint, select Run¾Add
Breakpoint¾ Source Breakpoint, and then enter the
appropriate information in the Add Source Breakpoint dialog
box.
Figure 2-6. Add Source
You can also set a breakpoint by placing Breakpoint Dialog Box
the cursor on the desired line of code and pressing <F5>.

Now you can run the EDC program by selecting Run¾Run or by pressing <F9>. Delphi starts
MPMS MultiVu. Edit or run an existing sequence that calls the program you are debugging. When
the appropriate function is called, the Windows focus shifts to Delphi when the breakpoint in your
code is reached. You can now step through your source code by using Delphi’s debugging features.
The Delphi on-line documentation discusses in more detail how you debug projects.

Caution should be used when debugging an EDC program on an MPMS MultiVu system that is
controlling⎯not simulating⎯the hardware. While the program is stopped on a line of code, MPMS
MultiVu is not running and can loose control of what it is doing. Many timers that run inside of
MPMS MultiVu keep track of the running hardware. There are also timers that expect GPIB
communications to complete in reasonable amounts of time. Any or all of these timers can run out or
get out of synchronization, thus resulting in GPIB errors. Try not to stop on a breakpoint for extended
periods of time. It is also advisable not to stop on a breakpoint while the magnet is charging or in
hysteresis mode. Common sense should be exercised while developing EDC programs on a live

Quantum Design MPMS EDC Language User’s Manual 2-15


Section 2.5 Chapter 2
Working with EDC EDC Operation

system and while using the Delphi debugger to stop MPMS MultiVu.

When at all possible, allow the sequence you are running to test your program to terminate normally.
If you must terminate MPMS MultiVu as quickly as possible, you can use the Delphi Run¾Program
Reset command to terminate the application immediately. Be careful. This technique does not allow
MPMS MultiVu to save its running state configuration, and when MPMS MultiVu starts again it might
report errors because the hardware was not in the last expected condition.

2-16 MPMS EDC Language User’s Manual Quantum Design


Chapter 2 Section 2.6
EDC Operation EDC Data Files

2.6 EDC Data Files


Data files that are created in an EDC program by using the EDC data file commands (see section 3.6)
use the same format as all MPMS MultiVu measurement data files. EDC data file names use the
same naming convention as MPMS MultiVu measurement data files, but add the .edc extension
(for example, basename.edc.dat). The Magnetic Property Measurement System: MPMS
MultiVu Application User’s Manual (Quantum Design 1998) discusses the format of MPMS MultiVu
data files in detail.

2.6.1 Data File Formatting Commands


Some EDC data file commands set up data file header information and other EDC data file commands
force the EDC data file to be created if the file does not already exist. The SetPlotAppearance,
SetDataFileTitle, SetPlotItems, SetAxisLimits, and SetDataFileLabels
commands add information to the header section of the data file in order to establish the default format
of the graph and the data item labels. The header section is written to the file only when the file is
created. SetPlotAppearance, SetDataFileTitle, SetPlotItems, SetAxisLimits,
and SetDataFileLabels cannot change the format information for a file that already exists.

The WriteData and OpenDataFile commands force the specified data file to be created if the
file does not already exist. When you issue the WriteData or OpenDataFile command, the file
is created with all the information specified in the SetPlotAppearance, SetDataFileTitle,
SetPlotItems, SetAxisLimits, and SetDataFileLabels formatting commands. If none
of the formatting commands has been issued, a default header section is written. If the data file exists,
WriteData always appends to the data file.

2.6.2 Data File Timestamp


The first item in an MPMS MultiVu data file is always the timestamp of the data line item. This time
value is the time in seconds since midnight (00:00:00) 1 January 1970 (also known as coordinated
universal time, or UTC). The utility commands GetTimeStamp and GetTimeStampStr can be
used to get the timestamp value from MPMS MultiVu in the UTC format. When the WriteData
command is used, MPMS MultiVu sets the timestamp for the present data line to the time value
associated with the time WriteData is issued. To change the timestamp value for the next data line,
use the SetDataFileTime command just before the WriteData command.

Quantum Design MPMS EDC Language User’s Manual 2-17


Section 2.7 Chapter 2
Description of EDC Operation EDC Operation

2.7 Description of EDC Operation

2.7.1 EDC Execution As a Dynamic Link Library


When MPMS MultiVu runs an EDC program, the MPMS MultiVu application loads the program as
a 32-bit Windows (Win32) DLL. The EDC program is loaded into the process memory space of the
MPMS MultiVu application and resides there until it is unloaded by MPMS MultiVu. When the first
sequence command that references the EDC program is executed, the EDC program is loaded into
memory and a function is called in the MpmsExports.dcu unit that establishes a DLL and OLE
(Object Linking and Embedding) connection between the EDC program and MPMS MultiVu. This
connection is used to support the Mpms object commands. After this connection is established, the
appropriate function in the EDC program is executed.

The EDC program is loaded only once and the connection to MPMS MultiVu is made only once.
Subsequent sequence commands referencing the same EDC program DLL do not have to load the
DLL or establish any OLE connections to MPMS MultiVu. When the sequence terminates, all
EDC DLLs that have been loaded by the sequence are unloaded by MPMS MultiVu. (Actually, the
DLLs are marked as unused by MPMS MultiVu and the operating system unloads them when it is
able to do so.)

2.7.2 GPIB Communications


The MPMS MultiVu system uses the National Instruments GPIB bus architecture to communicate
with the MPMS system hardware and external devices. All EDC commands that send and receive
data over this bus (see section 3.5) do so through the MPMS MultiVu application and its communi-
cation DLL (mpmscomm.dll). This allows MPMS MultiVu to coordinate communication in order
to prevent collisions and interruptions in the flow of data to identical or different devices. MPMS
MultiVu also handles any GPIB error encounters and then notifies the user and returns the error code
back to the EDC program.

The MPMS system hardware uses the GPIB Service Request Line (SRQ) to inform MPMS MultiVu
of various conditions, including the completion of command execution, during operations. A raised
SRQ line causes MPMS MultiVu to perform a GPIB serial poll of all its devices until the device
that raised the SRQ line is identified. EDC devices are serial polled as long as the SRQ line is raised.
Therefore, if an external device raises the SRQ line, MPMS MultiVu can identify it as the device that
caused the line to be raised. Any external device that holds the SRQ line high can cause the MPMS
MultiVu GPIB communications to become locked up if that device does not lower the SRQ line when
it is serial polled by MPMS MultiVu.

2-18 MPMS EDC Language User’s Manual Quantum Design


C H A P T E R 3

EDC Commands

3.1 Introduction
This chapter contains the following information:

• Section 3.2 describes the EDC command • Section 3.6 describes the data file
syntax and includes a guide listing page commands.
numbers for the commands in this chapter.
• Section 3.3 describes the system • Section 3.7 describes the utility
environment commands. commands.
• Section 3.4 describes the system • Section 3.8 contains a quick reference
measurement commands. guide for all EDC commands.
• Section 3.5 describes the GPIB
communication commands.

3.2 Overview of EDC Commands


All EDC commands are executed through Mpms object variable methods. The Mpms object variable
is globally defined so it is available to all Delphi units using MpmsUnit.dcu.

The sections in this chapter define the syntax, parameters, and return type of the Mpms object method
and provide examples of each method.

Quantum Design MPMS EDC Language User’s Manual 3-1


Section 3.2 Chapter 3
Overview of EDC Commands EDC Commands

3.2.1 Command Syntax


The following is an explanation of the EDC command syntax.

[result :=] Mpms.Command ([parameter list]);

where

result is an option variable of the specified type that will be assigned the return value of the
function.

Mpms is the Mpms system object global variable.

Command is the object method name of the Mpms object.

parameter list is the optional function parameters as specified in this chapter. Function
parameters preceded by the keyword var are passed by reference to the function or procedure.
Optional parameters and their default values are shown in brackets [ ]. When you call a routine
that uses default parameter values, all actual parameters following the first accepted default must
also use the default values; calls of the form SomeFunction(,,X) are not legal.

Refer to the Delphi on-line documentation for more information on var and for more information on
calling procedures and functions.

You must type in variables exactly as they appear in this chapter.

3-2 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.2
EDC Commands Overview of EDC Commands

3.2.2 Guide to Location of Commands in the Chapter

3.2.2.1 SYSTEM ENVIRONMENT COMMANDS

COMMAND PAGE COMMAND PAGE


Wait 3-5 SetTemp 3-8
SetField 3-6 GetSystemTemp 3-8
GetField 3-7 GetBridgeTemp 3-9
UpdateField 3-7

3.2.2.2 SYSTEM MEASUREMENT COMMANDS

COMMAND PAGE COMMAND PAGE


SetDCMeasParams 3-10 GetACFrequency 3-18
MeasureDC 3-11 GetACmPrime 3-18
GetDCMoment 3-12 GetACmDblPrime 3-19
GetDCStdDev 3-12 GetACMeasAmp 3-19
SetRSOMeasParams 3-13 GetACMeasPhase 3-20
MeasureRSO 3-14 GetACmPrimeStdDev 3-20
GetRSOMoment 3-15 GetACmDblPrimeStdDev 3-21
GetRSOStdDev 3-15 GetACMeasAmpStdDev 3-21
SetACMeasParams 3-16 GetACMeasPhaseStdDev 3-22
MeasureAC 3-17

3.2.2.3 GPIB COMMUNICATION COMMANDS

COMMAND PAGE COMMAND PAGE


SendRead 3-23 ReadNumber 3-27
SendReadNumber 3-24 Trigger 3-28
Send 3-25 InitDevice 3-29
Read 3-26

Quantum Design MPMS EDC Language User’s Manual 3-3


Section 3.2 Chapter 3
Overview of EDC Commands EDC Commands

3.2.2.4 DATA FILE COMMANDS

COMMAND PAGE COMMAND PAGE


SetDataFile 3-30 OpenDataFile 3-35
SetPlotAppearance 3-31 SetDataFileTitle 3-35
SetPlotItems 3-32 SetDataFileTime 3-36
SetAxisLimits 3-33 WriteData 3-37
SetDataFileLabels 3-34

3.2.2.5 UTILITY COMMANDS

COMMAND PAGE COMMAND PAGE


IsAborting 3-38 GetTimeStamp 3-40
ExtractNumStr 3-39 GetTimeStampStr 3-40

3-4 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.3
EDC Commands System Environment Commands

3.3 System Environment Commands

3.3.1 Wait
Syntax Wait(event);

Description This command pauses operation until the temperature or magnetic field is stable.
If an integer, instead of an emWAIT_TYPE, is specified, the command pauses
operation for the specified number of seconds.

Parameters REFERENCE TYPE VALUES


event emWAIT_TYPES WAIT_TEMP
WAIT_MAG
event Integer (Variable) sec.

Examples (1) Mpms.Wait(WAIT_TEMP);


This command pauses operation until the temperature control system declares that the
temperature is stable.

(2) Mpms.Wait(WAIT_MAG);
This command pauses operation until the magnetic field setting is stable.

(3) Mpms.Wait(20.0);
This command pauses operation for 20 seconds.

Quantum Design MPMS EDC Language User’s Manual 3-5


Section 3.3 Chapter 3
System Environment Commands EDC Commands

3.3.2 SetField
Syntax SetField(field,
[approach mode = OSCILLATE],
[resolution = HI_RES]) : Boolean;

Description This command uses the specified approach mode and resolution to set the magnetic
field in the MPMS. The field is set even if the current field is not stable. The limits
for the field are the present limits in the MPMS.

Parameters REFERENCE TYPE VALUES


field Single (Variable) Oe
approach mode emDAMPING_TYPE OSCILLATE (Default)
NO_OVERSHOOT
HYST_MODE
resolution emRESOLUTION_TYPE HI_RES (Default)
LO_RES

Return Type Boolean. True is returned if the field is set successfully. False is returned if the
field is not set successfully.

Examples (1) Mpms.SetField(15000, NO_OVERSHOOT, LO_RES);


This command uses the no-overshoot approach mode and the low-resolution mode to
set the field to 15,000 Oe.

(2) success := Mpms.SetField(-20000, HYST_MODE);


This command uses the hysteresis approach mode and, by default, the high-resolution
mode to set the field to -20,000 Oe. The result of this command is assigned to the
success variable.

(3) if (Mpms.SetField(10.5)) then


begin
...
end;
By default, this command uses the oscillate approach mode and the high-resolution
mode to set the field to 10.5 Oe. If the command is successful, the code inside the
if ... then block is executed.

3-6 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.3
EDC Commands System Environment Commands

3.3.3 GetField
Syntax GetField() : Single;

Description This command returns the current field in the MPMS. If the magnet is charging,
the returned value is the value of the field before the magnet started to charge.

Return Type Single-precision, floating-point number. The number is the MPMS field in oersted.

Example (1) var


magField : Single;
begin
...
magField := Mpms.GetField();
This command returns the field and assigns the value to the magField variable.

3.3.4 UpdateField
Syntax UpdateField(field) : Boolean;

Description This command corrects the field-intensity data stored in MPMS MultiVu and in the
Model 1822 MPMS Controller. UpdateField does not set the magnet current.

Parameters REFERENCE TYPE VALUES


field Single (Variable) Oe

Return Type Boolean. True is returned if the specified field is valid and the field value is updated
successfully. False is returned if the specified field is not valid or the field value is
not updated.

Example (1) success := Mpms.UpdateField(0.0);


This command sets the MPMS magnet field level to 0.0 Oe in both MPMS MultiVu
and the Model 1822.

Quantum Design MPMS EDC Language User’s Manual 3-7


Section 3.3 Chapter 3
System Environment Commands EDC Commands

3.3.5 SetTemp
Syntax SetTemp(target temperature,
[sweep rate = 10.0]) : Boolean;

Description This command uses the specified rate to set the temperature in the MPMS. The
temperature range is the present MPMS temperature range.

Parameters REFERENCE TYPE VALUES


target temperature Single (Variable) K
sweep rate Single 0.001−10.0 K/min.
(10.0 K/min. Default)

Return Type Boolean. True is returned if the temperature is set successfully. False is returned
if the temperature is not set successfully.

Examples (1) Mpms.SetTemp(20.0, 1.0);


This command instructs the temperature control system to sweep to 20 K
at 1 K/min.

(2) if not Mpms.SetTemp(298.0) then


begin
...
end;
This command instructs the temperature control system to sweep to 298 K
at 10 K/min. (by default). If the command is not successful, the code inside
the if ... then block is executed.

3.3.6 GetSystemTemp
Syntax GetSystemTemp() : Single;

Description This command returns the current MPMS system temperature.

Return Type Single-precision, floating-point number. The number is the system temperature in K.

Example (1) var


sysTemp : Single;
begin
...
sysTemp := Mpms.GetSystemTemp();
This command returns the system temperature and assigns the value to the sysTemp
variable.

3-8 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.3
EDC Commands System Environment Commands

3.3.7 GetBridgeTemp
Syntax GetBridgeTemp(chan) : Single;

Description This command reads the reported temperature from the specified bridge channel.
Bridge channels 1 through 6 are available.

Parameters REFERENCE TYPE VALUES


chan Smallint 1−6

Return Type Single-precision, floating-point number. The number is the temperature, in K,


of the specified bridge channel. If the bridge channel is not available, the value of
INVALID_TEMP (= -1.0) is returned.

Example (1) var


bridgeTemp : Single;
begin
...
bridgeTemp := Mpms.GetBridgeTemp(1);
This command reads the temperature from bridge channel 1 and assigns the value
to the bridgeTemp variable.

Quantum Design MPMS EDC Language User’s Manual 3-9


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4 System Measurement Commands

3.4.1 SetDCMeasParams
Syntax SetDCMeasParams(squidAxis,
scanLength,
numScans,
numPoints,
[algorithm = ITERATIVE],
[autoTracking = True],
[autoRange = True],
[squidRange = 1.25]) : Boolean;

Description This command sets the parameters for a DC measurement. The Magnetic Property
Measurement System: MPMS MultiVu Application User’s Manual (Quantum Design
1998) discusses the DC measurement parameters in detail.

Parameters REFERENCE TYPE VALUES


squidAxis emSQUID_TYPE LONG
TRANS
scanLength Single 0.1−12 cm
numScans Smallint 1−50
numPoints Smallint 2−64
algorithm emALGORITHM ITERATIVE (Default)
LINEAR
FULL_SCAN
INVALID
autoTracking Boolean True (Default)
False
autoRange Boolean True (Default)
False
squidRange Single (Variable) EMU
(1.25 Default)

Return Type Boolean. True is returned if all parameters are set successfully. False is returned
if any parameter is not set successfully.

3-10 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

Examples (1) success := SetDCMeasParams(LONG,


4.0,
5,
32,
ITERATIVE,
False,
False,
0.625);
This command sets the following parameters for a longitudinal DC measurement:
4-cm scan length, 5 scans to average, 32 points per scan, and use of the iterative
algorithm. Autotracking is off and the SQUID sensitivity is set to a fixed range
of 0.625 EMU. The result of this command is assigned to the success variable.

(2) success := SetDCMeasParams(LONG, 5.0, 2, 24);


This command sets the following parameters for a longitudinal DC measurement:
5-cm scan length, 2 scans to average, and 24 points per scan. By default, the iterative
algorithm is used and both autotracking and autoranging are turned on. The result of
this command is assigned to the success variable.

3.4.2 MeasureDC
Syntax MeasureDC() : Boolean;

Description This command uses the current DC measurement parameters to perform a standard
DC measurement. The measurement runs even if the temperature is not stable. The
SetDCMeasParams command can be used to set the measurement parameters.

Return Type Boolean. True is returned if the measurement runs. False is returned if the
measurement does not run.

Example (1) Mpms.MeasureDC();


This command performs a DC measurement. Sequence execution stops until the
measurement is complete. Notice that the result of this command is not assigned.

Quantum Design MPMS EDC Language User’s Manual 3-11


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4.3 GetDCMoment
Syntax GetDCMoment() : Single;

Description This command returns the moment value from the last DC measurement.

Return Type Single-precision, floating-point number. The number is the moment value in EMU.

Example (1) var


dcMoment : Single;
begin
...
dcMoment := Mpms.GetDCMoment();
This command returns the moment value and assigns it to the dcMoment variable.

3.4.4 GetDCStdDev
Syntax GetDCStdDev() : Single;

Description This command returns the standard deviation from the last DC measurement.

Return Type Single-precision, floating-point number. The number is the standard deviation
in EMU.

Example (1) var


dcSdtDev : Single;
begin
...
dcSdtDev := Mpms.GetDCStdDev();
This command returns the standard deviation and assigns it to the dcSdtDev
variable.

3-12 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

3.4.5 SetRSOMeasParams

The RSO commands are operable only if the RSO option is installed on the
MPMS unit. If you try to use an RSO command when the RSO option is not
NOTE installed, either an error message or a False value is returned.

Syntax SetRSOMeasParams(squidAxis,
amplitude,
frequency,
numCycles,
measToAvg,
position,
[algorithm = ITERATIVE],
[autoTracking = True],
[autoRange = True],
[squidRange = 1.25]) : Boolean;

Description This command sets the parameters for an RSO measurement. The Magnetic Property
Measurement System: Reciprocating Sample Option User’s Manual (Quantum
Design 1998) discusses the RSO measurement parameters in detail.

Parameters REFERENCE TYPE VALUES


squidAxis emSQUID_TYPE LONG
TRANS
amplitude Single 0.05−5.0 cm
frequency emRSOFreq RSO_FREQ_HALF
RSO_FREQ_1
RSO_FREQ_1_5
RSO_FREQ_2
RSO_FREQ_2_5
RSO_FREQ_4
numCycles Smallint 1−100
measToAvg Smallint 1−100
position emRSO_POS RSO_CENTER
RSO_MAX_SLOPE
algorithm emALGORITHM ITERATIVE (Default)
LINEAR
FULL_SCAN
autoTracking Boolean True (Default)
False
autoRange Boolean True (Default)
False
squidRange Single (Variable) EMU
(1.25 Default)

Quantum Design MPMS EDC Language User’s Manual 3-13


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

Return Type Boolean. True is returned if all parameters are set successfully. False is returned
if any parameter is not set successfully.

Examples (1) success := SetRSOMeasParams(LONG,


0.5,
RSO_FREQ_4,
20,
3,
RSO_MAX_SLOPE,
ITERATIVE,
False,
True);
This command sets the following parameters for a longitudinal RSO measurement:
0.5-cm amplitude at 4 Hz, 20 cycles with three measurements to average in the
maximum slope position, and use of the iterative algorithm. Autotracking is off and,
by default, autoranging is on. The result of this command is assigned to the
success variable.

(2) SetRSOMeasParams(LONG, 3.0, RSO_FREQ_1, 10, 5,


RSO_CENTER);
This command sets the following parameters for a longitudinal RSO measurement:
3-cm amplitude at 1 Hz, and 10 cycles with five measurements to average in the
center position. By default, the iterative algorithm is used and both autotracking
and autoranging are turned on. The result of this command is not assigned.

3.4.6 MeasureRSO
Syntax MeasureRSO() : Boolean

Description This command uses the current RSO measurement parameters to perform a standard
RSO measurement. The measurement runs even if the temperature is not stable. The
SetRSOMeasParams command can be used to set the measurement parameters.

Return Type Boolean. True is returned if the measurement runs. False is returned if the
measurement does not run.

Example (1) Mpms.MeasureRSO();


This command performs an RSO measurement. Sequence execution stops until the
measurement is complete. Notice that the result of this command is not assigned.

3-14 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

3.4.7 GetRSOMoment
Syntax GetRSOMoment() : Single;

Description This command returns the moment value from the last RSO measurement.

Return Type Single-precision, floating-point number. The number is the moment value in EMU.

Example (1) var


rsoMoment : Single;
begin
...
rsoMoment := Mpms.GetRSOMoment();
This command returns the moment value and assigns it to the rsoMoment variable.

3.4.8 GetRSOStdDev
Syntax GetRSOStdDev() : Single;

Description This command returns the standard deviation from the last RSO measurement.

Return Type Single-precision, floating-point number. The number is the standard deviation
in EMU.

Example (1) var


rsoStdDev : Single;
begin
...
rsoStdDev := Mpms.GetRSOStdDev();
This command returns the standard deviation and assigns it to the rsoStdDev
variable.

Quantum Design MPMS EDC Language User’s Manual 3-15


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4.9 SetACMeasParams

The AC commands are operable only if the AC option is installed on the


MPMS unit. If you try to use an AC command when the AC option is not
NOTE installed, either an error message or a False value is returned.

Syntax SetACMeasParams(amplitude,
frequency,
blocksToAvg,
measToAvg,
[settleTime = 0],
[ampGain = AC_GAIN10],
[nullAmp = 1.0e-6],
[autoTracking = True],
[autoRange = True],
[squidRange = 1.25]) : Boolean;

Description This command sets the parameters for an AC measurement. The Magnetic Property
Measurement System: AC Option User’s Manual (Quantum Design 1998) discusses
the AC measurement parameters in detail.

Parameters REFERENCE TYPE VALUES


amplitude Single 0.0001−5.2189 Oe
frequency Single 0.00035−1512.1 Hz
blocksToAvg Smallint 1−255
measToAvg Smallint 1−100
settleTime Integer 0−32400 sec.
ampGain emAC_AMP_GAIN AC_GAIN1
AC_GAIN10 (Default)
AC_GAIN100
nullAmp Single (Variable) EMU
(1e-006 Default)
autoTracking Boolean True (Default)
False
autoRange Boolean True (Default)
False
squidRange Single (Variable) EMU
(1.25 Default)

Return Type Boolean. True is returned if all parameters are set successfully. False is returned
if any parameter is not set successfully.

3-16 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

Examples (1) success := SetACMeasParams(3.0,


1000.0,
50,
2,
0,
AC_GAIN1,
0.0001,
False,
False,
0.125);
This command sets the following AC measurement parameters: 3-Oe amplitude,
100-Hz wave frequency, 50 blocks averaged, and two measurements averaged.
The additional SQUID settling time is zero seconds, and the AC amplifier gain
is ×1. Autotracking is off, and the SQUID is set to a fixed range of 0.125 EMU.
The result of this command is assigned to the success variable.

(2) AC_Success := SetACMeasParams(1.5, 250.0, 100, 1);


This command sets the following AC measurement parameters: 1.5-Oe amplitude,
250-Hz wave frequency, 100 blocks averaged, and one measurement taken. The
additional SQUID settling time is zero seconds. By default, the AC amplifier gain is
×10 and autotracking and autoranging are both turned on. The result of this
command is assigned to the AC_Success variable.

3.4.10 MeasureAC
Syntax MeasureAC() : Boolean

Description This command uses the current AC measurement parameters to perform a standard
AC measurement. The measurement runs even if the temperature is not stable. The
SetACMeasParams command can be used to set the measurement parameters.

Return Type Boolean. True is returned if the measurement runs. False is returned if the
measurement does not run.

Example (1) acMeasSuccess := Mpms.MeasureAC();


This command performs an AC measurement and assigns the result of the measure-
ment to the acMeasSuccess variable. Sequence execution stops until the
measurement is complete.

Quantum Design MPMS EDC Language User’s Manual 3-17


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4.11 GetACFrequency
Syntax GetACFrequency() : Single

Description This command returns the actual AC frequency used for the last AC measurement.

Return Type Single-precision, floating-point number. The number is the AC frequency in Hz.

Example (1) var


actualFreq : Single;
begin
...
actualFreq := Mpms.GetACFreq();
This command returns the AC frequency and assigns it to the actualFreq variable.

3.4.12 GetACmPrime
Syntax GetACmPrime() : Single;

Description This command returns the m′ value from the last AC measurement.

Return Type Single-precision, floating-point number. The number is the m′ value in EMU.

Example (1) var


mPrime : Single;
begin
...
mPrime := Mpms.GetACmPrime();
This command returns the m′ value and assigns it to the mPrime variable.

3-18 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

3.4.13 GetACmDblPrime
Syntax GetACmDblPrime() : Single;

Description This command returns the m′′ value from the last AC measurement.

Return Type Single-precision, floating-point number. The number is the m′′ value in EMU.

Example (1) var


mDblPrime : Single;
begin
...
mDblPrime := Mpms.GetACmDblPrime();
This command returns the m′′ value and assigns it to the mDblPrime variable.

3.4.14 GetACMeasAmp
Syntax GetACMeasAmp() : Single;

Description This command returns the amplitude from the last AC measurement. The amplitude
is defined by the equation

Amp = m ′ 2 + m ′′ 2 .

Return Type Single-precision, floating-point number. The number is the amplitude in EMU.

Example (1) var


acAmplitude : Single;
begin
...
acAmplitude := Mpms.GetACMeasAmp();
This command returns the amplitude and assigns it to the acAmplitude variable.

Quantum Design MPMS EDC Language User’s Manual 3-19


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4.15 GetACMeasPhase
Syntax GetACMeasPhase() : Single;

Description This command returns the phase angle from the last AC measurement. The phase
angle is defined by the equation

( )
Phase = arctan m ′′ m ′ .

Return Type Single-precision, floating-point number. The number is the phase angle in degrees.

Example (1) var


acPhase : Single;
begin
...
acPhase := Mpms.GetACMeasPhase();
This command returns the phase angle value and assigns it to the acPhase variable.

3.4.16 GetACmPrimeStdDev
Syntax GetACmPrimeStdDev() : Single;

Description This command returns the standard deviation of the m′ value from the last AC
measurement.

Return Type Single-precision, floating-point number. The number is the m′ standard deviation
in EMU.

Example (1) var


mPrimeStdDev : Single;
begin
...
mPrimeStdDev := Mpms.GetACmPrimeStdDev();
This command returns the standard deviation of the m′ value and assigns it to the
mPrimeStdDev variable.

3-20 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.4
EDC Commands System Measurement Commands

3.4.17 GetACmDblPrimeStdDev
Syntax GetACmDblPrimeStdDev() : Single;

Description This command returns the standard deviation of the m′′ value from the last AC
measurement.

Return Type Single-precision, floating-point number. The number is the m′′ standard deviation
in EMU.

Example (1) var


mDblPrimeStdDev : Single;
begin
...
mDblPrimeStdDev := Mpms.GetACmDblPrimeStdDev();
This command returns the standard deviation of the m′′ value and assigns it to the
mDblPrimeStdDev variable.

3.4.18 GetACMeasAmpStdDev
Syntax GetACMeasAmpStdDev() : Single;

Description This command returns the standard deviation of the amplitude from the last AC
measurement.

Return Type Single-precision, floating-point number. The number is the standard deviation
of the amplitude in EMU.

Example (1) var


acMeasAmpStdDev : Single;
begin
...
acMeasAmpStdDev := Mpms.GetACMeasAmpStdDev();
This command returns the standard deviation of the amplitude and assigns it to the
acMeasAmpStdDev variable.

Quantum Design MPMS EDC Language User’s Manual 3-21


Section 3.4 Chapter 3
System Measurement Commands EDC Commands

3.4.19 GetACMeasPhaseStdDev
Syntax GetACMeasPhaseStdDev() : Single;

Description This command returns the standard deviation of the phase angle from the last AC
measurement.

Return Type Single-precision, floating-point number. The number is the standard deviation
of the phase angle in degrees.

Example (1) var


acMeasPhaseStdDev : Single;
begin
...
acMeasPhaseStdDev := Mpms.GetACMeasPhaseStdDev();
This command returns the standard deviation of the phase angle and assigns it to the
acMeasPhaseStdDev variable.

3-22 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.5
EDC Commands GPIB Communication Commands

3.5 GPIB Communication Commands

3.5.1 SendRead
Syntax SendRead(device,
command,
var response,
[response size = 255]) : Integer;

Description This command sends a text string to the specified device and immediately reads the
response from the device. To ensure that the entire response is received, you must
either supply a response string variable that is large enough to accept the response or
specify the length of the response. If you do neither, the maximum response length
is defaulted to 255 characters.

When a GPIB command is written to a device, it is possible for MPMS MultiVu to


interrupt communication to that device before the next EDC command can be read
from the device. SendRead makes interruption impossible by reading the bus
immediately following a send.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32
command string
response (Variable) string
response size Integer ≥0 (255 Default)

Return Type Integer indicating the number of bytes read from the device.

Examples (1) var


respBuf : string;
numBytes : Integer;
begin
...
SetLength(respBuf, 20);
numBytes := Mpms.SendRead(8, 'RBT 1', respBuf);
This command sends the string ‘RBT 1’ to the device at GPIB address 8 and reads
back a response into the string variable respBuf, which has been set to a maximum
size of 20 characters. The actual number of bytes read from the device is assigned to
the numBytes variable.

(2) numBytes := Mpms.SendRead(8, 'RBT 1', respBuf, 20);


This command performs the same function as the command in example 1 but does not
require the line SetLength(respBuf, 20);.

Quantum Design MPMS EDC Language User’s Manual 3-23


Section 3.5 Chapter 3
GPIB Communication Commands EDC Commands

(3) numBytes := Mpms.SendRead(8, 'RBT 1', respBuf);


This command performs the same function as the command in example 1 except, by
default, it reads up to 255 bytes.

3.5.2 SendReadNumber
Syntax SendReadNumber(device,
command,
var response,
[response size = 255]) : Boolean;

Description This command sends a text string to the specified device, immediately reads the
response from the device, and uses the ExtractNumStr command to extract
the first numerical value in the response. The response may be (1) a text string;
(2) a double-precision, floating-point number; or (3) an integer. To ensure that
the entire response is received, you must either supply a response string variable
that is large enough to accept the response or specify the length of the response.
If you do neither, the maximum response length is defaulted to 255 characters.

Section 3.7.2 discusses the ExtractNumStr command.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32
command string
response string
Single
Double
Integer
response size Integer ≥0 (255 Default)

Return Type Boolean. True is returned if the command is sent and a response is read
successfully. False is returned if the command is not sent or a response is not read.

Examples (1) var


respBuf : string;
respFloat : Double;
respInt : Integer;
success : Boolean;
begin
...
success := Mpms.SendReadNumber(8, 'RBT 2',
respBuf, 20);
This command sends the string ‘RBT 2’ to the device at GPIB address 8, reads up to
20 characters from the device, and parses the result for any numerical value, placing
the result in the respBuf variable. If a numerical value is not found, respBuf
remains unchanged and the value of success is assigned False.

3-24 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.5
EDC Commands GPIB Communication Commands

(2) respFloat := 0.0;


success := Mpms.SendReadNumber(8, 'RBT 2',
respFloat);
This command performs the same function as the command in example 1 except that if
a numerical value is found in the response string, the value of that number is assigned
to the double-precision, real variable respFloat. You should initialize the value of
respFloat before calling SendReadNumber in case the respFloat value is
used later. The value of success indicates whether a numerical value is found in the
response to the command. The response string may be up to 255 characters.

(3) respInt := 0;
success := Mpms.SendReadNumber(8, 'RBT 2',
respInt);
This command performs the same function as the command in example 1 except that
the response value is assigned to the integer variable respInt.

3.5.3 Send
Syntax Send(device,
command) : Boolean;

Description This command sends a text string to the specified device.

If the Send command is called immediately after the Read command, MPMS
MultiVu could interrupt communication with the device before the next EDC
command can be read from the device. The SendRead command, however,
makes interruption impossible by reading the bus immediately following a send.
Section 3.5.1 discusses the SendRead command.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32
command string

Return Type Boolean. True is returned if the text string is sent to the device. False is returned
if an error is associated with the GPIB communications.

Example (1) success := Mpms.Send(6, 'RHT');


This command sends the string ‘RHT 1’ to the device at GPIB address 6. If the
command is successful, True is assigned to the success variable.

Quantum Design MPMS EDC Language User’s Manual 3-25


Section 3.5 Chapter 3
GPIB Communication Commands EDC Commands

3.5.4 Read
Syntax Read(device,
var response,
[response size = 255]) : Integer;

Description This command reads a response from the specified device. To ensure that the entire
response is received, you must either supply a response string variable that is large
enough to accept the response or specify the length of the response. If you do neither,
the maximum response length is defaulted to 255 characters.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32
response string
response size Integer ≥0 (255 Default)

Return Type Integer indicating the number of bytes read from the device.

Example (1) var


respBuf : string;
numBytes : Integer;
begin
...
SetLength(respBuf, 20);
numBytes := Mpms.Read(8, respBuf);
This command reads up to 20 characters from the device at GPIB address 8 and
places the characters in the respBuf variable, which has been set to a maximum
size of 20 characters. The actual number of bytes read from the device is assigned
to the numBytes variable.

3-26 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.5
EDC Commands GPIB Communication Commands

3.5.5 ReadNumber
Syntax ReadNumber(device,
var response,
[response size = 255]) : Boolean;

Description This command reads a response from the specified device and uses the
ExtractNumStr command to extract the first numerical value in the response.
The response may be (1) a text string; (2) a double-precision, floating-point number;
or (3) an integer. To ensure that the entire response is received, you must either
supply a response string variable that is large enough to accept the response or
specify the length of the response. If you do neither, the maximum response length
is defaulted to 255 characters.
Section 3.7.2 discusses the ExtractNumStr command.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32
response string
Single
Double
Integer
response size Integer ≥0 (255 Default)

Return Type Boolean. True is returned if a string of characters is returned by the device and
a number is found in the string. False is returned if a string of characters is not
returned by the device or a number is not found in the string.

Examples (1) var


respBuf : string;
respFloat : Double;
respInt : Integer;
success : Boolean;
begin
...
success := Mpms.ReadNumber(8, respBuf, 20);
This commands reads up to 20 characters from the device and parses the result for
any numerical value, placing the result in the respBuf variable. If no numerical
value is found, the respBuf variable remains unchanged and the value of success
is assigned False.

Quantum Design MPMS EDC Language User’s Manual 3-27


Section 3.5 Chapter 3
GPIB Communication Commands EDC Commands

(2) respFloat := 0.0;


success := Mpms.ReadNumber(8, respFloat);
This command performs the same function as the command in example 1 except that if
a numerical value is found in the response string, the value of that number is assigned
to the double-precision, real variable respFloat. You should initialize the value of
respFloat before calling SendReadNumber in case the respFloat value is
used later. The value of success indicates whether a numerical value is found in the
response to the command. The response string may be up to 255 characters.

(3) respInt := 0;
success := Mpms.SendReadNumber(8, respInt);
This command performs the same function as the command in example 1 except that
the response value is assigned to the respInt integer variable.

3.5.6 Trigger
Syntax Trigger(device) : Boolean;

Description This command sends a GPIB Group Execute Trigger (GET) command to the specified
device. Only the specified device is triggered by the bus.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32

Return Type Boolean. True is returned if the GET command is sent successfully. False is
returned if GET is not sent successfully.

Example (1) success := Mpms.Trigger(12);


This command triggers the device at GPIB address 12.

3-28 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.5
EDC Commands GPIB Communication Commands

3.5.7 InitDevice
Syntax InitDevice(device) : Boolean;

Description This command sends the IEEE standard *CLS; command to the specified device.

Parameters REFERENCE TYPE VALUES


device Smallint 0−32

Return Type Boolean. True is returned if the *CLS; command is sent successfully. False is
returned if an error is associated with the GPIB communications.

Example (1) success := Mpms.InitDevice(22);


This commands initializes the device at GPIB address 22.

Quantum Design MPMS EDC Language User’s Manual 3-29


Section 3.6 Chapter 3
Data File Commands EDC Commands

3.6 Data File Commands

3.6.1 SetDataFile
Syntax SetDataFile(filename,
[diagnostic file = False],
[raw file = False]) : Boolean;

Description This command creates the base name of a new EDC measurement data file. MPMS
MultiVu automatically appends the extension .edc.dat to the base name.

Parameters REFERENCE TYPE VALUES


filename string
diagnostic file Boolean True
False (Default)
raw file Boolean True
False (Default)

Return Type Boolean. True is returned if the file name is accepted. False is returned if the file
name is rejected.

Examples (1) Mpms.SetDataFile('ResistMeas1');


This command sets the data file base name for all future measurements. Any data
files created by sequence measurements, EDC measurement commands, or
WriteData EDC commands will start with the file name ResistMeas1 (for
example, ResistMeas1.dc.dat and ResistMeas1.edc.dat).

(2) Mpms.SetDataFile('FastRSOMeas', False, True);


This command sets the data file base name to FastRSOMeas for all future
measurements and forces the generation of raw data files (FastRSOMeas.
rso.raw) for all measurements conducted within the EDC program. Notice that
the return value is not assigned.

3-30 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.6
EDC Commands Data File Commands

3.6.2 SetPlotAppearance
Syntax SetPlotAppearance(plot number,
horzGrid, vertGrid,
markers) : Boolean;

Description This command defines the appearance of the specified plot in the graph view of the
EDC measurement data file. Graph plots are numbered 1 through 4, with plot 1 at
the top of the Graph View window.

Parameters REFERENCE TYPE VALUES


plot number SmallInt 1−4
horzGrid, vertGrid emHDR_GRID GRID_ON
GRID_OFF
markers emLINES_MARKERS MARKERS
LINES
MARKERS_AND_LINES

Return Type Boolean. True is returned if the plot appearance is accepted. False is returned
if the plot appearance is rejected.

Examples (1) Mpms.SetPlotAppearance(1, GRID_OFF, GRID_ON,


MARKERS_AND_LINES);
This command defines the appearance of the first plot in the graph view of the
data file. This command turns off the horizontal grid and turns on the vertical grid.
It specifies that both data markers and lines be shown.

(2) Mpms.SetPlotAppearance(2, GRID_ON, GRID_OFF, MARKERS);


This command defines the appearance of the second plot in the graph view of the
data file. This command turns on the horizontal grid and turns off the vertical grid.
It specifies that only data markers be shown.

Quantum Design MPMS EDC Language User’s Manual 3-31


Section 3.6 Chapter 3
Data File Commands EDC Commands

3.6.3 SetPlotItems
Syntax SetPlotItems(item mask) : Boolean;

Description This command selects the MPMS MultiVu data item or items that will be added to
every data line in the EDC measurement data file.

Parameters REFERENCE TYPE VALUES


item mask Longint MV_FIELD
MV_TEMP
MV_TARG_TEMP
MV_SQUID_NUM
MV_SQUID_RANGE
MV_SQUID_GAIN
MV_SQUID_FILTER
MV_VOLT_GAIN
MV_DIG_RATE
MV_DIG_READINGS
MV_HIRES
MV_HYST
MV_HELIUM_LEVEL
MV_ROTATOR_POS

Return Type Boolean. True is returned if the data item or items are added to the data file.
False is returned if the data item or items are not added.

Example (1) Mpms.SetPlotItems(MV_FIELD or MV_TEMP or


MV_HELIUM_LEVEL);
This command instructs the MPMS to add the present field level, system temperature,
and helium level to every data line the WriteData command adds to the data file.

3-32 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.6
EDC Commands Data File Commands

3.6.4 SetAxisLimits
Syntax SetAxisLimits(plotNum,
axis,
itemIndex,
scale,
autoScale,
min = 0.0,
max = 0.0) : Boolean;

Description This command sets the axis limits in each plot in the graph view of the EDC
measurement data file.

Parameters REFERENCE TYPE VALUES


plotNum Smallint 1−4
axis emAxis X
Y1−Y4
itemIndex Smallint TIMESTAMP
COMMENT
FIELD
AVG_TEMP
TARG_TEMP
SQUID_NUM
SQUID_RANGE
SQUID_GAIN
SQUID_FILTER
VOLT_GAIN
DIG_RATE
DIG_READINGS
HIRES
HYST
HELIUM_LEVEL
ROT_POS
NUM_MV_ITEMS+ ...
scale emSCALE SCALE_LINEAR
SCALE_LOG
autoScale Boolean True
False
min Single (0.0 Default)
max Single (0.0 Default)

Return Type Boolean. True is returned if all axis limits are accepted. False is returned if any
axis limit is rejected.

Examples (1) Mpms.SetAxisLimits(1, X, TIMESTAMP, LINEAR, True);


This command sets the axis limits for the first plot in the graph view by assigning the
MPMS timestamp field to the x-axis on a linear scale with autoscaling turned on.

Quantum Design MPMS EDC Language User’s Manual 3-33


Section 3.6 Chapter 3
Data File Commands EDC Commands

(2) Mpms.SetDataFileLabels('Voltage, Susceptibility');


Mpms.SetAxisLimits(1, Y1, NUM_MV_ITEMS + 1, LINEAR,
False, 1.0e-3, 2.0e-3);
This command sets the axis limits for the Y1 axis that is in the first plot in the
graph view. This axis is assigned to the first data item that will be written by the
WriteData and SetDataFileLabels commands. In this example, the first
data item has the label ‘Voltage.’ This axis will use a linear scale and the scale
will have a fixed range of 0.001−0.002. NUM_MV_ITEM is used to indicate the last
data item position in the data line for those items added by the SetPlotItems
command. Data items added by the WriteData command are always added after
the NUM_MV_ITEMS item. Therefore, to indicate an item number for items added by
WriteData, you add its relative position to the NUM_MV_ITEMS constant.

3.6.5 SetDataFileLabels
Syntax SetDataFileLabels(label) : Boolean;

Description This command sets the text labels that describe the data items stored in the EDC
measurement data file. The labels are separated by commas.

SetDataFileLabels should be used before the first WriteData command,


and it should be used only once. The number of text labels should equal the number
of data items described in the WriteData string. In addition, the order in which
the labels appear should be identical to the order in which WriteData writes the
items. Section 3.6.9 discusses the WriteData command.

Appendix B in the Magnetic Property Measurement System: MPMS MultiVu


Application User’s Manual (Quantum Design 1998) discusses the MPMS MultiVu
data file format in detail.

Parameters REFERENCE TYPE VALUES


label string

Return Type Boolean. True is returned if the text labels are accepted. False is returned if
the text labels are rejected.

Example (1) Mpms.SetDataFileLabels('Voltage, Excite Current,


Meas Value');
This command sets the data labels for three data items that the WriteData
command will write to the EDC measurement data file.

3-34 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.6
EDC Commands Data File Commands

3.6.6 OpenDataFile
Syntax OpenDataFile() : Boolean;

Description This command opens the graph view of the current EDC measurement data file.
If no EDC measurement data file exists, OpenDataFile uses the file header
information specified in the SetDataFile, SetPlotAppearance,
SetPlotItems, SetAxisLimits, and SetDataFileLabels commands
to create a file. OpenDataFile then opens the graph view of this new file.

Return Type Boolean. True is returned if the data file is opened. False is returned if the
file is not opened.

Example (1) Mpms.SetDataFile('RelaxMeas1');


...
Mpms.OpenDataFile();
These commands force the MPMS software to open the graph view of the current
EDC measurement data file (RelaxMeas1.edc.dat).

3.6.7 SetDataFileTitle
Syntax SetDataFileTitle(title) : Boolean;

Description This command specifies the title of the graph view of the EDC measurement
data file. The title appears near the top of the Graph View window.

Parameters REFERENCE TYPE VALUES


title string

Return Type Boolean. True is returned if the title is accepted. False is returned if the title
is rejected.

Example (1) Mpms.SetDataFile('RelaxMeas1');


Mpms.SetDataFileTitle('Field Relaxation
Measurement #1')
...
Mpms.OpenDataFile();
These commands change the title of the data file RelaxMeas1.edc.dat to
Field Relaxation Measurement #1. This title will be displayed at
the top of the graph view that is opened with the OpenDataFile command.

Quantum Design MPMS EDC Language User’s Manual 3-35


Section 3.6 Chapter 3
Data File Commands EDC Commands

3.6.8 SetDataFileTime
Syntax SetDataFileTime(time) : Boolean;

Description This command sets the timestamp that is recorded for the next line of data in the EDC
measurement data file. SetDataFileTime should be used if data is collected at
one time and then sent to a data file at another time. SetDataFileTime must be
called before the WriteData command is called.

Parameters REFERENCE TYPE VALUES


time Double Seconds

Return Type Boolean. True is returned if the timestamp is accepted. False is returned if
the timestamp is rejected.

Example (1) for index := 1 to 100 do


begin
MeasData[index].time := Mpms.GetTimeStamp());
Mpms.Read('22', MeasData[index].measStr);
end;
...
for index := 1 to 100 do
begin
Mpms.SetDataFileTime(MeasData[index].time);
Mpms.WriteData(MeasData[index].measStr);
end;
This command writes 100 lines of data to the active EDC measurement data file.
The timestamp for each data item is collected (using GetTimeStamp) at the time
the data is collected and is stored in the MeasData array of records. This ensures
that data is taken as quickly as possible.

3-36 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.6
EDC Commands Data File Commands

3.6.9 WriteData
Syntax WriteData(data) : Boolean;

Description This command writes a data line to the EDC measurement data file whose base name
is created by the SetDataFile command. The data lines are separated by commas.
The number of items delimited in the data line must equal the number of labels
delimited in the SetDataFileLabels command.

Section 3.6.1 discusses the SetDataFile command. Section 3.6.5 discusses the
SetDataFileLabels command.

Parameters REFERENCE TYPE VALUES


data string Comma-delimited data item in string.

Return Type Boolean. True is returned if the data line is accepted. False is returned if the data
line is rejected.

Example (1) var dataStr : string;


...
Mpms.SetDataLabels('Voltage, Current(Amps)');
...
dataStr = FloatToStr(voltageReading) + ',' +
FloatToStr (currentReading);
success := Mpms.WriteData(dataStr);
These commands construct a comma-delimited string that will be output to the active
EDC measurement data file.

Quantum Design MPMS EDC Language User’s Manual 3-37


Section 3.7 Chapter 3
Utility Commands EDC Commands

3.7 Utility Commands

3.7.1 IsAborting
Syntax IsAborting() : Boolean;

Description This command checks to see whether you are attempting to abort the sequence.

Return Type Boolean. True is returned if you are attempting to abort the sequence. False is
returned if you are not attempting to abort the sequence.

Example (1) if Mpms.IsAborting() then Abort;


...
except {Do not modify code in this exception handler}
on EAbort do
begin
Result := Bad;
end;
end;
This example tests the return value of IsAborting to determine whether you are
attempting to abort the running sequence. If you are attempting to abort the sequence,
the Abort exception is raised and program execution continues at the ‘on EAbort’
exception handler in the except block.

3-38 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.7
EDC Commands Utility Commands

3.7.2 ExtractNumStr
Syntax ExtractNumStr(input string,
number string) : Boolean;

Description This command searches the input string for a numerical value and then places that
numerical value in the string variable.

Parameters REFERENCE TYPE VALUES


input string string
number string string

Return Type Boolean. True is returned if a number is found. False is returned if a number is
not found.

Examples (1) var dataStr, numStr : string;


begin
...
dataStr := 'NDCV+0.002341e+3'#$D#$A;
success := Mpms.ExtractNumStr(dataStr, numStr);
This command searches the dataStr variable for a numerical value and places the
search result in the string variable numStr. In this example, the command finds the
numerical value +0.002341e+3 and places this portion of the string into the numStr
variable. The success variable is assigned True.

(2) dataStr := 'No Data';


success := Mpms.ExtractNumStr(dataStr, numStr);
In this command, there are no numerical values in the dataStr variable. The
numStr variable remains unchanged and the success variable is assigned False.

Quantum Design MPMS EDC Language User’s Manual 3-39


Section 3.7 Chapter 3
Utility Commands EDC Commands

3.7.3 GetTimeStamp
Syntax GetTimeStamp() : Double;

Description This command returns the present time in a double-precision format that represents
the number of seconds since midnight (00:00:00) 1 January 1970, coordinated
universal time (UTC).

Return Type Double-precision, floating-point number. The number is the timestamp.

Example (1) var presentTime : Double;


presentTime := Mpms.GetTimeStamp();
This command gets the present timestamp from the MPMS software and assigns the
value to the variable presentTime.

3.7.4 GetTimeStampStr
Syntax GetTimeStampStr() : string;

Description This command returns the present time in a string format that represents the number
of seconds since midnight (00:00:00) 1 January 1970, coordinated universal time
(UTC).

Return Type Text string indicating the timestamp.

Example (1) var presentTimeStr : string;


presentTimeStr := Mpms.GetTimeStamp();
This command gets the present timestamp from the MPMS software and assigns the
value to the variable presentTimeStr.

3-40 MPMS EDC Language User’s Manual Quantum Design


Chapter 3 Section 3.8
EDC Commands Quick Reference Guide for EDC Commands

3.8 Quick Reference Guide for EDC Commands

COMMAND DESCRIPTION PAGE


ExtractNumStr Searches input string for numerical value, then places numerical value 3-39
in string variable.
GetACFrequency Returns AC frequency used for last AC measurement. 3-18
GetACmDblPrime Returns m′′ from last AC measurement. 3-19
GetACmDblPrimeStdDev Returns standard deviation of m′′ from last AC measurement. 3-21
GetACMeasAmp Returns amplitude from last AC measurement. 3-19
GetACMeasAmpStdDev Returns standard deviation of amplitude from last AC measurement. 3-21
GetACMeasPhase Returns phase angle from last AC measurement. 3-20
GetACMeasPhaseStdDev Returns standard deviation of phase angle from last AC measurement. 3-22
GetACmPrime Returns m′ from last AC measurement. 3-18
GetACmPrimeStdDev Returns standard deviation of m′ from last AC measurement. 3-20
GetBridgeTemp Reads temperature from specified bridge channel. 3-9
GetDCMoment Returns moment value from last DC measurement. 3-12
GetDCStdDev Returns standard deviation from last DC measurement. 3-12
GetField Returns current field. 3-7
GetRSOMoment Returns moment value from last RSO measurement. 3-15
GetRSOStdDev Returns standard deviation from last RSO measurement. 3-15
GetSystemTemp Returns current temperature. 3-8
GetTimeStamp Returns present time in double-precision format representing number 3-40
of seconds since midnight 1 January 1970.
GetTimeStampStr Returns present time in string format representing number of seconds 3-40
since midnight 1 January 1970.
InitDevice Sends *CLS; command to device. 3-29
IsAborting Checks to see whether abort attempt has been made. 3-38
MeasureAC Performs AC measurement. 3-17
MeasureDC Performs DC measurement. 3-11
MeasureRSO Performs RSO measurement. 3-14
OpenDataFile Opens graph view of data file. 3-35
Read Reads response from device. 3-26
ReadNumber Reads response from device and extracts first numerical value in that 3-27
response.

Quantum Design MPMS EDC Language User’s Manual 3-41


Section 3.8 Chapter 3
Quick Reference Guide for EDC Commands EDC Commands

COMMAND DESCRIPTION PAGE


Send Sends text string to device. 3-25
SendRead Sends text string to device and reads response from device. 3-23
SendReadNumber Sends text string to device, reads response from device, and extracts 3-24
first numerical value in that response.
SetACMeasParams Sets parameters for AC measurement. 3-16
SetAxisLimits Sets axis limits for plot or plots. 3-33
SetDataFile Creates base name of new data file. 3-30
SetDataFileLabels Sets text labels describing data items stored in data file. 3-34
SetDataFileTime Sets timestamp that is recorded for next line of data in data file. 3-36
SetDataFileTitle Specifies title of graph view of data file. 3-35
SetDCMeasParams Sets parameters for DC measurement. 3-10
SetField Uses specified approach mode and resolution to set field. 3-6
SetPlotAppearance Defines appearance of plot. 3-31
SetPlotItems Selects data item or items to add to every line in data file. 3-32
SetRSOMeasParams Sets parameters for RSO measurement. 3-13
SetTemp Uses specified rate to set temperature. 3-8
Trigger Sends GET command to device. 3-28
UpdateField Corrects field-intensity data. 3-7
Wait Pauses operation until temperature or field is stable. 3-5
WriteData Writes data line to file whose base name is created by 3-37
SetDataFile.

3-42 MPMS EDC Language User’s Manual Quantum Design


References

Quantum Design. 1998. Magnetic Property Measurement System: AC Option User’s Manual.

⎯⎯⎯. 1998. Magnetic Property Measurement System: MPMS MultiVu Application User’s Manual.

⎯⎯⎯. 1998. Magnetic Property Measurement System: Reciprocating Sample Option User’s Manual.

Quantum Design MPMS EDC Language User’s Manual References-1


Index

Control loop, aborting, 2-14 making generic, 2-6


MPMS MultiVu units required to run, 2-2
Data file commands, 3-30−3-37 passing run-time value to, 2-8
and effect on EDC data file, 2-17 running in Delphi debugger, 2-13, 2-15−2-16
Delphi application running within sequence, 2-13
as EDC compiler, 1-1, 1-2 variable types used with, 2-3, 2-5
providing EDC project template file, 1-2, 2-1 as Windows DLL, 1-2, 2-18
starting, 2-12 writing, 2-12
and using debugger to run EDC program, 2-15−2-16 EDC project template file
components of, 2-2−2-4
EDCExitProc procedure, 2-4 opening, 2-12
EDC commands. See Data file commands; GPIB saving as new template, 2-12
communication commands; System environment using to build EDC program, 2-1
commands; System measurement commands; EDC sequence commands. See End EDC sequence
Utility commands command; Execute EDC sequence command;
EDC command syntax, 3-2 Initialize EDC sequence command
EDC data files End EDC sequence command
creating. See OpenDataFile command; WriteData automatically added to sequence, 2-9, 2-10, 2-11
command calling Finish function, 2-1, 2-9, 2-11
extension for, 2-17, 3-30 marking conclusion of Initialize EDC block, 2-9, 2-10,
format of, 2-17 2-11
plot appearance, defining. See SetAxisLimits exception handler block, 2-13, 2-14. See also IsAborting
command; SetDataFileLabels command; command
SetDataFileTitle command; SetPlotAppearance ExecuteEDC function
command; SetPlotItems command accessing global variables, 2-8
specifying base name for. See SetDataFile command as export function in EDC project template file, 2-1
specifying title of graph view. See SetDataFileTitle frequency of usage, 2-8
command and passing run-time value to EDC program, 2-8
EDC language performing EDC measurement, 2-8
comparing MPMSR2 EDC with MPMS MultiVu EDC, return value, 2-6
1-2−1-3 using with Initialize function, 2-8
and function of Delphi, 1-1, 1-2 Execute EDC sequence command
and GPIB communications, 2-18. See also GPIB adding to sequence, 2-11
communication commands calling ExecuteEDC function, 2-1, 2-8, 2-11
installing, 1-5 frequency of usage, 2-11
measurement types supported, 1-2. See also System inserting in Initialize EDC command block, 2-10, 2-11
measurement commands passing text string to EDC program, 2-11
overview of functionality, 1-1 return value, 2-6
using. See EDC program Export functions, 2-1, 2-6. See also ExecuteEDC function;
EDC option. See EDC language Finish function; Initialize function
EDCPrgm.dpr file sequence commands calling, 2-1
as EDC project template file, 2-1 using for generic operations, 2-6
opening, 2-12 Exports block, 2-3
EDC program External Device Control. See EDC language
aborting sequence running, 2-13−2-14 ExtractNumStr command, 3-39, 3-41. See also
building with EDC project template file, 2-1, 2-12 ReadNumber command; SendReadNumber
components of, 2-2−2-4 command
creating from existing EDC project template file, 2-12

Finish function
export functions required to run, 2-3, 2-6 de-allocating Windows resources, 2-9

Quantum Design MPMS EDC Language User’s Manual Index-1


Index

as export function in EDC project template file, 2-1 MPMS MultiVu sequence. See Sequence
restoring original state of initialized devices, 2-9 Mpms object variable, 1-2, 3-1, 3-2
return value, 2-6 MpmsOleDll, 2-2
MPMSR2 EDC language, compared with MPMS MultiVu
GetACFrequency command, 3-18, 3-41 EDC language, 1-2−1-3
GetACmDblPrime command, 3-19, 3-41 command compatibility chart, 1-3−1-4
GetACmDblPrimeStdDev command, 3-21, 3-41 MpmsUnit.dcu, 2-2, 3-1
GetACMeasAmp command, 3-19, 3-41
GetACMeasAmpStdDev command, 3-21, 3-41 OpenDataFile command
GetACMeasPhase command, 3-20, 3-41 and creating data file, 2-17
GetACMeasPhaseStdDev command, 3-22, 3-41 function of, 3-35, 3-41
GetACmPrime command, 3-18, 3-41
GetACmPrimeStdDev command, 3-20, 3-41 Raw data files, creating. See SetDataFile command
GetBridgeTemp command, 3-9, 3-41 Read command, 3-26, 3-41. See also Send command;
GetDCMoment command, 3-12, 3-41 SendRead command
GetDCStdDev command, 3-12, 3-41 ReadNumber command, 3-27, 3-41
GetField command, 3-7, 3-41
GetRSOMoment command, 3-15, 3-41 Send command, 3-25, 3-42. See also SendRead command
GetRSOStdDev command, 3-15, 3-41 SendRead command, 3-23−3-24, 3-42. See also Send
GetSystemTemp command, 3-8, 3-41 command
GetTimeStamp command, 2-17, 3-40, 3-41 SendReadNumber command, 3-24−3-25, 3-42
GetTimeStampStr command, 2-17, 3-40, 3-41 Sequence
Global variables aborting. See EDC program: Aborting sequence
accessing with ExecuteEDC function, 2-8 running
declaring, 2-3 commands. See End EDC sequence command; Execute
initializing with Initialize function, 2-7 EDC sequence command; Initialize EDC sequence
validity of, 2-5 command
GPIB communication commands, 3-23−3-29 running. See EDC program: Running within sequence
SetACMeasParams command, 3-16−3-17, 3-42
InitDevice, 3-29, 3-41 SetAxisLimits command
Initialize EDC sequence command and defining data file header, 2-17
adding to sequence, 2-10 function of, 3-33−3-34, 3-42
calling Initialize function, 2-1, 2-7, 2-10 SetDataFile command, 3-30, 3-42
creating command block, 2-10 SetDataFileLabels command. See also WriteData
and End EDC sequence command, 2-9, 2-10, 2-11 command
frequency of usage, 2-7, 2-10 and defining data file header, 2-17
using to initialize EDC program, 2-10 function of, 3-34, 3-42
Initialize function SetDataFileTime command, 3-36, 3-42
as export function in EDC project template file, 2-1 SetDataFileTitle command
initializing external device, 2-7 and defining data file header, 2-17
initializing global variables, 2-7 function of, 3-35, 3-42
return value, 2-6 SetDCMeasParams command, 3-10−3-11, 3-42
using with ExecuteEDC function, 2-8 SetField command, 3-6, 3-42
Installation. See EDC language: Installing SetPlotAppearance command
IsAborting command, 3-38, 3-41 and defining data file header, 2-17
function of, 3-31, 3-42
Library declaration, 2-2 SetPlotItems command
Local variables, 2-5 and defining data file header, 2-17
function of, 3-32, 3-42
Magnetic field, setting. See SetField command
SetRSOMeasParams command, 3-13−3-14, 3-42
MeasureAC command, 3-17, 3-41
SetTemp command, 3-8, 3-42
MeasureDC command, 3-11, 3-41
SRQ line, 2-18
Measurement parameters, setting. See SetACMeasParams
System environment commands, 3-5−3-9
command; SetDCMeasParams command;
System measurement commands, 3-10−3-22
SetRSOMeasParams command
Measurement, taking. See MeasureAC command;
MeasureDC command; MeasureRSO command
Temperature, setting. See SetTemp command
MeasureRSO command, 3-14, 3-41
Timestamp
MpmsDefinitions, 2-2
definition of, 2-17
MpmsExports, 2-2

Index-2 MPMS EDC Language User’s Manual Quantum Design


Index

getting value in UTC format. See GetTimeStamp


command; GetTimeStampStr command
setting. See SetDataFileTime command
Trigger command, 3-28, 3-42

UpdateField command, 3-7, 3-42


Uses block, 2-2
Utility commands, 3-38−3-40

Var block, 2-3

Wait command, 3-5, 3-42


WriteData command. See also SetDataFile command;
SetDataFileLabels command; SetDataFileTime
command
and creating data file, 2-17
function of, 3-37, 3-42

Quantum Design MPMS EDC Language User’s Manual Index-3

You might also like