magnetic property measurement system exteran device.pdf · quantum design magnetic property...

80
Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu Software Application Part Number 1004-lOOA

Upload: others

Post on 15-Sep-2019

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Quantum Design

Magnetic Property Measurement System

External Device Control Language User's Manual

For the MPMS MultiVu Software Application

Part Number 1004-lOOA

Page 2: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Quantum Design 11578 Sorrento Valley Rd. San Diego, CA 92121-1311 USA Technical support

Fax

(858) 481-4400 (800) 289-6996 (858) 481-7410

Second edition of manual completed March 1999.

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

U.S. Patents 4, 791, 788 Method for Obtaining Improved Temperature Regulation When Using Liquid Helium Cooling 4,848,093 Apparatus and Method for Regulating Temperature in a Cryogenic Test Chamber 5,053,834 High Symmetry DC Squid System 5, 110, 034 Superconducting Bonds for Thin Film Devices 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

Page 3: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

CONTENTS

Table of Contents

PREFACE Contents and Conventions .............................................................................................................................. vii

P. l Introduction ...................................................................................................................................................... vii P.2 Scope of the Manual ......................................................................................................................................... vii P.3 Contents of the Manual. .................................................................................................................................... vii P.4 Conventions in the Manual .............................................................................................................................. viii

CHAPTERl Introduction and Installation ........................................................................................................................ 1-I

I. I Introduction ..................................................................................................................................................... 1- I 1.2 Overview of the EDC Language ...................................................................................................................... 1-1

1.2.1 Function of Borland Delphi ...................................................................................................................... 1-2 I .3 Comparison between MPMS MultiVu EDC and MPMSR2 EDC ................................................................... l-2 1.4 Installing the EDC Option ............................................................................................................................... 1-5

CHAPTER2 EDC Operation ................................................................................................................................................... 2- I

2. I Introduction ..................................................................................................................................................... 2-1 2.2 EDC Programs ................................................................................................................................................. 2-1

2.2. I Components of the EDC Program ............................................................................................................ 2-2 2.2. I. l Library Declaration ............................................................................................................................ 2-2 2.2.1.2 Uses Block ......................................................................................................................................... 2-2 2.2. I .3 Var Block ........................................................................................................................................... 2-3 2.2. I .4 Function Blocks ................................................................................................................................. 2-3 2.2. I .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-I2 2.5.l 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 MP MS EDC Language User's Manual I

Page 4: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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

CHAPTER3 EDC Commands ................................................................................................................................................. 3-1

3 .1 Introduction ..................................................................................................................................................... 3-1 3.2 Overview ofEDC 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 Measure DC ............................................................................................................................................. 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 GetACmDb!Prime ................................................................................................................................ 3-19 3.4.14 GetACMeasAmp .................................................................................................................................. 3-19 3.4.15 GetACMeasPhase ................................................................................................................................. 3-20 3.4.16 GetACmPrimeStdDev .......................................................................................................................... 3-20 3 .4.17 GetACmDb!PrimeStdDev ..................................................................................................................... 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

Page 5: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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 SetPlotltems ............................................................................................................................................ 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.1lsAborting ............................................................................................................................................... 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-I

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

Quantum Design MPMS EDC Language User's Manual iii

Page 6: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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 MP MS EDC Language User's Manual Quantum Design

Page 7: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Tables

Contents Table of 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

Page 8: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu
Page 9: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

P R E F A C E

Contents and Conventions

P.1

P.2

P.3

Introduction This preface contains the following information:

• Section P.2 discusses the overall scope of the manual.

• Section P.3 briefly summarizes the contents of the manual.

Scope of the Manual

• Section P.4 illustrates and describes conventions that appear in 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.

Contents of the Manual • Chapter 1 presents an overview of

the EDC language.

• Chapter 2 explains how to work with the EDC language.

• Chapter 3 describes all the EDC commands.

Quantum Design MPMS EDC Language User's Manual vii

Page 10: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section P.4 Conventions in the Manual

Preface Contents and Conventions

P.4 Conventions in the Manual File menu

File>-Open

. dat

<Enter>

<Alt+ Enter>

viii

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

The >- symbol indicates that you select multiple, nested software options.

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

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

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.

MPMS EDC Language User's Manual Quantum Design

Page 11: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

CHAPTER 1

Introduction and Installation

1.1 Introduction This chapter contains the following information:

• Section 1.2 presents an overview of the EDC language.

• Section 1.3 compares the MPMS MultiVu EDC language and the MPMSR2 EDC language.

• Section 1.4 explains how to install the EDC option.

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.

Q11ant11111 Design MPMS EDC Language User's Manual 1-1

Page 12: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 1.3 Comparison between MPMS MultiVu EDC and MPMSR2 EDC

Chapter I 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 MPMSR2EDC

1-2

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 OA). 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 RIG 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 APL 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.

MPMS EDC Language User's Manual Quantum Design

Page 13: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter I Introduction and Installation

Section 1.3 Comparison betll'een 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

MPMSR2EDC MPMS MUL TIVU 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

Midst ring Supported by Pascal Accesses substring within a string.

(table continues)

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

Page 14: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 1.3 Comparison between MPMS Multi Vu EDC and MPMSR2 EDC

Chapter I Introduction and Installation

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

MPMSR2EDC MPMS MUL TIVU 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 SetA.xisLimits Sets limits for plot.

Print Not supported Writes data to printer and data file.

Read Read Reads string or number from device. Read.Number

Repeat Supported by Pascal Loop control.

SendRead SendRead Sends command and reads back data. SendRead.Number

SetMag SetField Sets magnetic field.

Set Temp Set Temp Sets system temperature.

SubRoutine Supported by Pascal Creates subfunctions.

Time Get Times tamp 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

Page 15: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter I Introduction and Installation

1.4 Installing the EDC Option

Section 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

Page 16: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu
Page 17: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

CHAPTER 2

EDC Operation

2.1 Introduction This chapter contains the following information:

• Section 2.2 presents an overview of EDC programs and discusses program components.

• Section 2.3 discusses EDC functions.

• Section 2.4 discusses the MPMS MultiVu EDC sequence commands.

2.2 EDC Programs

• Section 2.5 explains how to write and run an EDC program.

• Section 2.6 discusses EDC data files.

• Section 2. 7 describes EDC program operation.

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

Page 18: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.2 Chapter 2 EDC Programs EDC Operation

2.2.1 Components of the EDC Program

2-2

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 MUL TIVU 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.

MPMS EDC Language User's Manual Quantum Design

Page 19: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 2 EDC Operation

2.2.1.3 VAR BLOCK

Section 2.2 EDC Programs

var ExitProcSave

Remove.} Pointer; {Default Exit procedure pointer, Do Not

{------------------- 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

Page 20: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.2 EDC Programs

2-4

2.2.1.6 EDCExitProc PROCEDURE

procedure EDCExitProc; begin

Chapter 2 EDC Operation

{------------------- Start of User Code ------------------------} {Users DLL exit code goes here.)

{==================== End of User Code =========================} {Do Not Remove} ExitProc .- ExitProcSave; II restore the existing ExitProc address

end;

llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll 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; II save the existing ExitProc address ExitProc .- @EDCExitProc; II Install EDC exit procedure

end.

The EDCExi tProc 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.

MPMS EDC Language User's Manual Quantum Design

Page 21: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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.

Quan/11111 Design MPMS EDC Language User's Manual 2-5

Page 22: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.3 Chapter 2 EDC Functions EDC Operation

2.3 EDC Functions

2-6

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

MPMS EDC Language User's Manual Quantum Design

Page 23: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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

end; end;

Result .- Bad; 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

Page 24: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.3 Chapter 2 EDC Functions EDC Operation

2.3.2 Execute Function

2-8

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

end; end;

Result .- Bad; 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.

MPMS EDC Language User's Manual Quantum Design

Page 25: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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

end; end;

Result .- Bad; 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 MP MS EDC Language User 's Manual 2-9

Page 26: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.4 EDC Seq11ence Commands

Chapter 2 EDC Operation

2.4 EDC Sequence Commands

2.4.1

2-10

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

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.

Select an EDC File to Initialize 0£! Projects

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

MP.MS EDC Lang11age User's Man11al Q11antwn Design

Page 27: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 2 Section 2.4 EDC Operation EDC Sequence Commands

2.4.2 Execute EDC

~ NOTE

2.4.3

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.

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

EndEDC

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.

Q11a11t11111 Design MP MS EDC Language User's Manual 2-11

Page 28: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.5 Working with EDC

Chapter 2 EDC Operation

2.5

2.5.1

IL1f NOTE

2-12

Working with EDC

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

MPMS EDC Language User's Manual Quantum Design

Page 29: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 2 EDC Operation

2.5.2

2.5.3

Running an EDC Program

Section 2.5 Working with EDC

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. IfMPMS 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 ifMPMS 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.

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

end;

Result .- Bad; end;

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

Page 30: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.5 Working ll'ith EDC

Chapter 2 EDC Operation

w CAUTION

2-14

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 ifMPMS 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 indicating that it is waiting for the EDC program to terminate.

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-

Figure 2-3. Abort EDC Program Dialog Box

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

MPMS EDC Language User's Manual Quantum Design

Page 31: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 2 Section 2.5 EDC Operation Working with EDC

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

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 \Multi Vu 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.

You can also set a breakpoint by placing the cursor on the desired line of code and pressing <F5>.

Figure 2-6. Add Source Breakpoint Dialog Box

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

Page 32: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.5 Working with EDC

Chapter 2 EDC Operation

2-16

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

MPMS EDC Language User's Manual Quantum Design

Page 33: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 2 Section 2.6 EDC Operation EDC Data Files

2.6 EDC Data Files

2.6.1

2.6.2

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. da t). The Magnetic Property Measurement System: MPMS MultiVu Application User's Manual (Quantum Design 1998) discusses the format ofMPMS MultiVu data files in detail.

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 ifthe file does not already exist. The setPlotAppearance, SetDataFileTitle,SetPlotitems,SetAxisLimits,andsetDataFileLabels 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, SetA.xisLimits, and SetDataFileLabels cannot change the format information for a file that already exists.

The Wri teData and OpenDataFile commands force the specified data file to be created ifthe 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, SetAxisLimi ts, and SetDataFileLabels formatting commands. If none of the formatting commands has been issued, a default header section is written. If the data file exists, Wri teData always appends to the data file.

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) 1January1970 (also known as coordinated universal time, or UTC). The utility commands Get Times tamp 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 Wri teData 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

Page 34: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 2.7 Description of EDC Operation

Chapter 2 EDC Operation

2.7

2.7.1

2.7.2

2-18

Description of EDC Operation

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

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.

MPMS EDC Language User's Manual Quantum Design

Page 35: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

CHAPTER 3

EDC Commands

3.1 Introduction This chapter contains the following information:

• Section 3.2 describes the EDC command syntax and includes a guide listing page numbers for the commands in this chapter.

• Section 3.3 describes the system environment commands.

• Section 3 .4 describes the system measurement commands.

• Section 3.5 describes the GPIB communication commands.

• Section 3.6 describes the data file commands.

• Section 3.7 describes the utility commands.

• Section 3.8 contains a quick reference guide for all EDC 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 MpmsUni t . dcu.

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

Quan/um Design MPMS EDC Language User's Manual 3-1

Page 36: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.2 Overview of EDC Commands

Chapter 3 EDC Commands

3.2.1

3-2

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.

MPMS EDC Language User's Manual Quantum Design

Page 37: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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

Wait

SetField

GetField

UpdateField

PAGE

3-5

3-6

3-7

3-7

3.2.2.2 SYSTEM MEASUREMENT COMMANDS

COMMAND PAGE

SetDCMeasParams 3-10

MeasureDC 3-11

GetDCMoment 3-12

GetDCStdDev 3-12

SetRSOMeasParams 3-13

MeasureRSO 3-14

GetRSOMoment 3-15

GetRSOStdDev 3-15

SetACMeasParams 3-16

MeasureAC 3-17

3.2.2.3 GPIB COMMUNICATION COMMANDS

COMMAND

SendRead

SendReadNumber

Send

Read

Quantum Design

PAGE

3-23

3-24

3-25

3-26

MPMS EDC Language User's Manual

COMMAND

Set Temp

GetSystemTemp

GetBridgeTemp

COMMAND

GetACFrequency

GetACmPrime

GetACmDblPrime

GetACMeasAmp

GetACMeasPhase

GetACmPrimeStdDev

GetACmDblPrimeStdDev

GetACMeasAmpStdDev

GetACMeasPhaseStdDev

COMMAND

Read.Number

Trigger

InitDevice

PAGE

3-8

3-8

3-9

PAGE

3-18

3-18

3-19

3-19

3-20

3-20

3-21

3-21

3-22

PAGE

3-27

3-28

3-29

3-3

Page 38: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.2 Chapter 3 Overview of EDC Commands EDC Commands

3-4

3.2.2.4 DAT A FILE COMMANDS

COMMAND PAGE

SetDataFile 3-30

SetPlotAppearance 3-31

SetPlotitems 3-32

SetAxisLimits 3-33

SetDataFileLabels 3-34

3.2.2.5 UTILITY COMMANDS

COMMAND

IsAborting

ExtractNumStr

PAGE

3-38

3-39

MPMS EDC Language User's Manual

COMMAND

OpenDataFile

SetDataFileTitle

SetDataFileTime

WriteData

COMMAND

Get Times tamp

GetTimeStampStr

PAGE

3-35

3-35

3-36

3-37

PAGE

3-40

3-40

Quantum Design

Page 39: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.3 EDC Commands System Environment Commands

3.3 System Environment Commands

3.3.1 Wait

Syntax

Description

Parameters

Examples

Quantum Design

Wait(event);

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

REFERENCE TYPE VALUES

event emWAIT TYPES WAIT TEMP - -WAIT MAG -

event Integer (Variable) sec.

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

MPMS EDC Language User's Manual 3-5

Page 40: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.3 System Environment Commands

3.3.2 SetField

Syntax

Description

Parameters

Return Type

Examples

3-6

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

Chapter 3 EDC Commands

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.

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 -

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

(!) Mpms.SetField(l5000, 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(l0.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.

MPMS EDC Language User's Manual Quantum Design

Page 41: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3 .3 EDC Commands System Environment Commands

3.3.3 GetField

Syntax

Description

Return Type

Example

GetField() : Single;

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.

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

(1) var magField

begin Single;

magField := Mpms.GetField();

This command returns the field and assigns the value to the magField variable.

3.3.4 UpdateField

Syntax

Description

Parameters

Return Type

Example

Quantum Design

UpdateField(field) : Boolean;

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.

REFERENCE TYPE VALUES

field Single (Variable) Oe

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.

(1) success := Mpms.UpdateField(O.O);

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

MPMS EDC Language User's Manual 3-7

Page 42: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.3 System Environment Commands

3.3.5 SetTemp

Syntax

Description

Parameters

Return Type

Examples

SetTemp(target temperature, [sweep rate = 10. O]) : Boolean;

Chapter 3 EDC Commands

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

REFERENCE TYPE VALUES

target temperature Single (Variable) K

sweep rate Single 0.001-10.0 K/min. (10.0 K/min. Default)

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

(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

Description

Return Type

Example

3-8

GetSystemTemp(} : Single;

This command returns the current MPMS system temperature.

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

(1) var sys Temp

begin Single;

sysTemp := Mpms.GetSystemTemp(};

This command returns the system temperature and assigns the value to the sys Temp variable.

MP MS EDC Language User's Manual Quantum Design

Page 43: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Section 3.3 System Environment Commands

3.3.7 GetBridgeTemp

Syntax

Description

Parameters

Return Type

Example

Quantum Design

GetBridgeTemp(chan) : Single;

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

REFERENCE TYPE VALUES

chan Small int 1-6

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.

(1) var bridge Temp

begin Single;

bridgeTemp := Mpms.GetBridgeTemp(l);

This command reads the temperature from bridge channel 1 and assigns the value to the bridgeTemp variable.

MPMS EDC Language User's Manual 3-9

Page 44: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System Measurement Commands

Chapter 3 EDC Commands

3.4

3.4.1

3-10

System Measurement Commands

SetDCMeasParams

Syntax

Description

Parameters

Return Type

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

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.

REFERENCE TYPE VALUES

squid.Axis emSQUID_TYPE LONG TRANS

scanLength Single 0.1-12 cm

numscans Small int 1-50

numPoints Small int 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)

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

MPMS EDC Language User's Manual Quantum Design

Page 45: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Examples (1) success .- SetDCMeasPararns(LONG, 4.0, 5,

Section 3.4 System Measurement Commands

32, ITERATIVE, False, False, 0. 625) i

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 of0.625 EMU. The result of this command is assigned to the success variable.

(2) success := SetDCMeasPararns(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

Description

Return Type

Example

Quantum Design

MeasureDC() : Boolean;

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 SetDCMeasPararns command can be used to set the measurement parameters.

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

(1) Mprns.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.

MPMS EDC Language User's Manual 3-11

Page 46: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System A1easurement Commands

Chapter 3 EDC Commands

3.4.3

3.4.4

3-12

GetDCMoment

Syntax

Description

Return Type

Example

GetDCMoment() : Single;

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

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

(1) var dcMoment

begin Single;

dcMoment := Mpms.GetDCMoment();

This command returns the moment value and assigns it to the dcMoment variable.

GetDCStdDev

Syntax

Description

Return Type

Example

GetDCStdDev() : Single;

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

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

(1) var dcSdtDev

begin Single;

dcSdtDev := Mpms.GetDCStdDev();

This command returns the standard deviation and assigns it to the dcSdtDev variable.

MP MS EDC Language User's Manual Quantum Design

Page 47: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Section 3.4 System Measurement Commands

3.4.5

w NOTE

SetRSOMeasParams

Syntax

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

SetRSOMeasParams(squid.Axis, amplitude, frequency, numCycles, measToAvg, position, [algorithm = ITERATIVE] I

[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

squid.Axis emSQUID_TYPE LONG TRANS

amplitude Single 0.05-5.0 cm

frequency emRSOFreq RSO_FREQ_HALF RSO_FREQ_l RSO_FREQ_l_S RSO_FREQ_2 RSO_FREQ_2_ 5 RSO_FREQ_4

numCycles Small int 1-100

measToAvg Small int 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

Page 48: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3 .4 Chapter 3 System Measurement Commands EDC Commands

3.4.6

3-14

Return Type Boolean. True is returned ifall 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_l, 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.

MeasureRSO

Syntax

Description

Return Type

Example

MeasureRSO() : Boolean

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

Boolean. True is returned ifthe measurement runs. False is returned ifthe measurement does not run.

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

MPMS EDC Language User's Manual Quantum Design

Page 49: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.4 EDC Commands System Measurement Commands

3.4. 7 GetRSOMoment

Syntax

Description

Return Type

Example

GetRSOMoment() : Single;

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

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

(1) var rsoMoment

begin Single;

rsoMoment := Mpms.GetRSOMoment();

This command returns the moment value and assigns it to the rsoMoment variable.

3.4.8 GetRSOStdDev

Syntax

Description

Return Type

Example

Quantum Design

GetRSOStdDev() : Single;

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

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

(1) var rsoStdDev

begin Single;

rsoStdDev .- Mpms.GetRSOStdDev();

This command returns the standard deviation and assigns it to the rsoStdDev variable.

MPMS EDC Language User's Manual 3-15

Page 50: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System lvfeasurement Commands

Chapter 3 EDC Commands

3.4.9

w NOTE

3-16

SetACMeasParams

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

Syntax

Description

Parameters

Return Type

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

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.

REFERENCE TYPE VALUES

amplitude Single 0.0001-5.2189 Oe

frequency Single 0.00035-1512.1 Hz

blocksToAvg Small int 1-255

measToAvg Small int 1-100

settleTime Integer 0-32400 sec.

ampGain emAC AMP GAIN AC GAINl - - -AC GAINlO (Default) AC GAINlOO -

nullAmp Single (Variable) EMU (le-006 Default)

autoTracking Boolean True (Default) False

autoRange Boolean True (Default) False

squidRange Single (Variable) EMU (1.25 Default)

Boolean. True is returned ifall parameters are set successfully. False is returned if any parameter is not set successfully.

MPMS EDC Language User's Manual Quantum Design

Page 51: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Examples (1) success .- SetACMeasParams(3.0, 1000.0, 50, 2,

Section 3.4 System Measurement Commands

o, AC_GAINl, 0.0001, False, False, 0.125) i

This command sets the following AC measurement parameters: 3-0e 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 x 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(l.5, 250.0, 100, 1);

This command sets the following AC measurement parameters: 1.5-0e 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 x I 0 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

Description

Return Type

Example

Quantum Design

MeasureAC() : Boolean

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

Boolean. True is returned ifthe measurement runs. False is returned ifthe measurement does not run.

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

MPMS EDC Language User's Manual 3-17

Page 52: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System lvfeasurement Commands

Chapter 3 EDC Commands

3.4.11

3.4.12

3-18

GetACFrequency

Syntax

Description

Return Type

Example

GetACFrequency(} : Single

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

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

(1) var actual Freq

begin Single;

actualFreq := Mpms.GetACFreq(};

This command returns the AC frequency and assigns it to the actual Freq variable.

GetACmPrime

Syntax

Description

Return Type

Example

GetACmPrime() : Single;

This command returns them' value from the last AC measurement.

Single-precision, floating-point number. The number is them' value in EMU.

(1) var mPrime

begin Single;

mPrime := Mpms.GetACmPrime(};

This command returns them' value and assigns it to the mPrime variable.

MPMS EDC Language User's Manual Quantum Design

Page 53: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3 .4 EDC Commands System Measurement Commands

3.4.13 GetACmDblPrime

Syntax

Description

Return Type

Example

GetACmDblPrime() : Single;

This command returns them" value from the last AC measurement.

Single-precision, floating-point number. The number is them" value in EMU.

(1) var mDblPrime

begin Single;

mDblPrime := Mpms.GetACmDblPrime();

This command returns them" value and assigns it to the mDblPrime variable.

3.4.14 GetACMeasAmp

Syntax

Description

Return Type

Example

Quantum Design

GetACMeasAmp() : Single;

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

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

(1) var acAmplitude

begin Single;

acAmplitude := Mpms.GetACMeasAmp();

This command returns the amplitude and assigns it to the acAmpli tude variable.

MPMS EDC Language User's Manual 3-19

Page 54: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System A1easurement Commands

Chapter 3 EDC Commands

3.4.15

3.4.16

3-20

GetACMeasPhase

Syntax

Description

Return Type

Example

GetACMeasPhase() : Single;

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

Phase = arctan ( m hi') .

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

(1) var acPhase

begin Single;

acPhase := Mpms.GetACMeasPhase();

This command returns the phase angle value and assigns it to the acPhase variable.

GetACmPrimeStdDev

Syntax

Description

Return Type

Example

GetACmPrimeStdDev() : Single;

This command returns the standard deviation of them' value from the last AC measurement.

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

(1) var mPrimeStdDev

begin Single;

mPrimeStdDev := Mpms.GetACmPrimeStdDev();

This command returns the standard deviation of the m' value and assigns it to the mPrimeStdDev variable.

MPMS EDC Language User's Manual Quantum Design

Page 55: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3 .4 EDC Commands System Measurement Commands

3.4.17 GetACmDblPrimeStdDev

Syntax

Description

Return Type

Example

GetACrnDblPrimeStdDev() : Single;

This command returns the standard deviation of them" value from the last AC measurement.

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

(I) var rnDblPrimeStdDev

begin Single;

rnDblPrimeStdDev := Mpms.GetACrnDblPrimeStdDev();

This command returns the standard deviation of them" value and assigns it to the rnDblPrimeStdDev variable.

3.4.18 GetACMeasAmpStdDev

Syntax

Description

Return Type

Example

Quantum Design

GetACMeasAmpStdDev() : Single;

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

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

(1) var acMeasAmpStdDev

begin Single;

acMeasAmpStdDev := Mpms.GetACMeasAmpStdDev();

This command returns the standard deviation of the amplitude and assigns it to the acMeasAmpStdDev variable.

MPMS EDC Language User's Manual 3-21

Page 56: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.4 System Measurement Commands

Chapter 3 EDC Commands

3.4.19 GetACMeasPhaseStdDev

Syntax

Description

Return Type

Example

3-22

GetACMeasPhaseStdDev() : Single;

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

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

(1) var acMeasPhaseStdDev

begin Single;

acMeasPhaseStdDev := Mpms.GetACMeasPhaseStdDev();

This command returns the standard deviation of the phase angle and assigns it to the acMeasPhaseStdDev variable.

MPMS EDC Language User's Manual Quantum Design

Page 57: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.5 EDC Commands GPIB Communication Commands

3.5 GPIB Communication Commands

3.5.1 SendRead

Syntax

Description

Parameters

Return Type

Examples

Quantum Design

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

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.

REFERENCE TYPE

device Small int 0-32

command string

response (Variable) string

response size Integer :?:0

Integer indicating the number of bytes read from the device.

(1) var respBuf : string; numBytes : Integer;

begin

SetLength(respBuf, 20);

VALUES

(255 Default)

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

This command sends the string 'RBT l' 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 of20 characters. The actual number of bytes read from the device is assigned to the numBytes variable.

(2) numBytes : = Mpms. SendRead ( 8, 'RBT l' , respBuf, 2 0) ;

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

MPMS EDC Language User's Manual 3-23

Page 58: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.5 GPIB Communication Commands

Chapter 3 EDC Commands

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

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

3.5.2 SendReadN um her

Syntax

Description

Parameters

Return Type

Examples

3-24

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

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.

REFERENCE TYPE VALUES

device Small int 0-32

command string

response string Single Double Integer

response size Integer :?:0 (255 Default)

Boolean. True is returned ifthe command is sent and a response is read successfully. False is returned ifthe command is not sent or a response is not read.

(1) var respBuf respFloat resp Int success

begin

string; : Double; Integer; Boolean;

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.

MPMS EDC Language User's Manual Quantum Design

Page 59: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

3.5.3 Send

Syntax

Description

Parameters

Return Type

Example

Quantum Design

a) respFloat := 0.0;

Section 3.5 GPIB Communication Commands

success := Mpms.SendReadNumber(S, '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(S, '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.

Send(device, command) : Boolean;

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.

REFERENCE TYPE VALUES

device Small int 0-32

command string

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

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

MPMS EDC Language User's Manual 3-25

Page 60: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.5 GPIB Communication Commands

3.5.4 Read

Syntax

Description

Parameters

Return Type

Example

3-26

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

Chapter 3 EDC Commands

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.

REFERENCE TYPE

device Small int 0-32

response string

response size Integer ;::: 0

Integer indicating the number of bytes read from the device.

(I) var respBuf : string; numBytes : Integer;

begin

SetLength(respBuf, 20); numBytes := Mpms.Read(8, respBuf);

VALUES

(255 Default)

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 of20 characters. The actual number of bytes read from the device is assigned to the numBytes variable.

MP MS EDC Language User's Manual Quantum Design

Page 61: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Section 3.5 GPIB Communication Commands

3.5.5 ReadNumber

Syntax

Description

Parameters

Return Type

Examples

Quantum Design

Read.Number(device, var response, [response size = 255]) : Boolean;

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.

REFERENCE TYPE VALUES

device Small int 0-32

response string Single Double Integer

response size Integer ;:::o (255 Default)

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.

(1) var respBuf string; respFloat : Double; resp Int success

begin

Integer; Boolean;

success := Mpms.Read.Number(S, 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. Ifno numerical value is found, the respBuf variable remains unchanged and the value of success is assigned False.

MPMS EDC Language User's Manual 3-27

Page 62: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.5 GPIB Communication Commands

3.5.6 Trigger

Syntax

Description

Parameters

Return Type

Example

3-28

(2) respFloat := 0.0; success := Mpms.ReadNumber(8, respFloat);

Chapter 3 EDC Commands

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.

0) respint := O; success := Mpms.SendReadNumber(8, respint);

This command performs the same function as the command in example I except that the response value is assigned to the resp Int integer variable.

Trigger(device) : Boolean;

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

REFERENCE TYPE VALUES

device Small int 0-32

Boolean. True is returned ifthe GET command is sent successfully. False is returned if GET is not sent successfully.

(1) success := Mpms.Trigger(l2);

This command triggers the device at GPIB address 12.

MP MS EDC Language User's Manual Quantum Design

Page 63: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

3.5.7 InitDevice

Syntax

Description

Parameters

Return Type

Example

Quantum Design

InitDevice(device) : Boolean;

Section 3.5 GPIB Communication Commands

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

REFERENCE TYPE VALUES

device Small int 0-32

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

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

This commands initializes the device at GPIB address 22.

MRMS EDC Language User's Manual 3-29

Page 64: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.6 Data File Commands

Chapter 3 EDC Commands

3.6

3.6.1

3-30

Data File Commands

SetDataFile

Syntax

Description

Parameters

Return Type

Examples

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

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.

REFERENCE TYPE VALUES

filename string

diagnostic file Boolean True False (Default)

raw file Boolean True False (Default)

Boolean. True is returned ifthe file name is accepted. False is returned ifthe file name is rejected.

(1) Mpms.SetDataFile('ResistMeasl');

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

(2) Mprns.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.

MPMS EDC Language User's Manual Quantum Design

Page 65: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.6 EDC Commands Data File Commands

3.6.2 SetPlotAppearance

Syntax

Description

Parameters

Return Type

Examples

Quantum Design

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

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

REFERENCE TYPE VALUES

plot number Small Int 1-4

horzGrid, vertGrid emHDR GRID GRID ON - -GRID OFF -

markers emLINES MARKERS MARKERS -LINES MARKERS AND LINES - -

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

(I) Mpms.SetPlotAppearance(l, 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.

MPMS EDC language User's Manual 3-31

Page 66: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.6 Data File Commands

Chapter 3 EDC Commands

3.6.3 SetPlotltems

Syntax

Description

Parameters

Return Type

Example

3-32

SetPlotitems(item mask) : Boolean;

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

REFERENCE TYPE VALUES

item mask Long int 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 - -

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

(I) 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 Wri teData command adds to the data file.

MPMS EDC Language User's Manual Quantum Design

Page 67: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.6 EDC Commands Data File Commands

3.6.4 SetAxisLimits

Syntax

Description

Parameters

Return Type

Examples

Quantum Design

SetAxisLimits(plotNum, axis, itemindex, scale, autoScale, min O. o, max= 0.0) : Boolean;

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

REFERENCE TYPE VALUES

plotNum Small int 1-4

axis emAxis x Yl-Y4

itemindex Small int TIME STAMP 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)

...

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

(1) Mpms.SetAxisLimits(l, x, TIMESTAMP, LINEAR, True) i

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.

MPMS EDC Language User's Manual 3-33

Page 68: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.6 Data File Commands

(2)

Chapter 3 EDC Commands

Mpms.SetDataFileLabels('Voltage, Susceptibility'); Mpms.SetAxisLimits(l, Yl, NUM_MV_ITEMS+l, LINEAR,

False, l.Oe-3, 2.0e-3);

This command sets the axis limits for the Yl 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 Wri teData 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

Description

Parameters

Return Type

Example

3-34

SetDataFileLabels(label) : Boolean;

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 Wri teDa ta string. In addition, the order in which the labels appear should be identical to the order in which Wri teData writes the items. Section 3.6.9 discusses the WriteData command.

Appendix Bin the Magnetic Property Measurement System: MPMS MultiVu Application User's Manual (Quantum Design 1998) discusses the MPMS MultiVu data file format in detail.

REFERENCE TYPE VALUES

label string

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

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

MPMS EDC Language User's Manual Quantum Design

Page 69: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 Section 3.6 EDC Commands Data File Commands

3.6.6 OpenDataFile

Syntax

Description

Return Type

Example

OpenDataFile() : Boolean;

This command opens the graph view of the current EDC measurement data file. Ifno 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.

Boolean. True is returned ifthe data file is opened. False is returned ifthe file is not opened.

(I) Mpms.SetDataFile('RelaxMeasl');

Mpms.OpenDataFile();

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

3.6.7 SetDataFileTitle

Syntax

Description

Parameters

Return Type

Example

Quantum Design

SetDataFileTitle(title) : Boolean;

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.

REFERENCE TYPE VALUES

title string

Boolean. True is returned ifthe title is accepted. False is returned ifthe title is rejected.

(I) Mpms.SetDataFile('RelaxMeasl'); Mpms.SetDataFileTitle('Field Relaxation

Measurement #1')

Mpms.OpenDataFile();

These commands change the title of the data file RelaxMeasl. 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.

MPMS EDC Language User's Manual 3-35

Page 70: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.6 Data File Commands

Chapter 3 EDC Commands

3.6.8 SetDataFileTime

Syntax

Description

Parameters

Return Type

Example

3-36

SetDataFileTime(time) : Boolean;

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. SetDa taFileTime must be called before the Wri teData command is called.

REFERENCE TYPE VALUES

time Double Seconds

Boolean. True is returned ifthe timestamp is accepted. False is returned if the timestamp is rejected.

(I) 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 I 00 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 MeasDa ta array ofrecords. This ensures that data is taken as quickly as possible.

MPMS EDC Language User's Manual Quantum Design

Page 71: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

3.6.9 WriteData

Syntax

Description

Parameters

Return Type

Example

Quantum Design

Section 3.6 Data File Commands

WriteData(data) : Boolean;

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.l discusses the SetDataFile command. Section 3.6.5 discusses the SetDataFileLabels command.

REFERENCE TYPE VALUES

data string Comma-delimited data item in string.

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

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

MPMS EDC Language User's Manual 3-37

Page 72: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.7 Utility Commands

Chapter 3 EDC Commands

3.7 Utility Commands

3.7.1 IsAborting

Syntax

Description

Return Type

Example

3-38

IsAborting() : Boolean;

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

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

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

except {Do not modify code in this exception handler} on EAbort do

begin

end;

Result .- Bad; 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.

MPMS EDC Language User's Manual Quantum Design

Page 73: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Chapter 3 EDC Commands

Section 3.7 Utility Commands

3.7.2 ExtractN umStr

Syntax

Description

Parameters

Return Type

Examples

Quantum Design

ExtractNumStr(input string, number string) : Boolean;

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

REFERENCE TYPE VALUES

input string string

number string string

Boolean. True is returned ifa number is found. False is returned ifa number is not found.

(1) var dataStr, numStr begin

string;

dataStr := 'NDCV+0.002341e+3'#$D#$A; success := Mpms.ExtractNumStr(dataStr, numStr);

This command searches the da taS tr 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.00234le+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.

MPMS EDC Language User's Manual 3-39

Page 74: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.7 Utility Commands

Chapter 3 EDC Commands

3.7.3

3.7.4

3-40

GetTimeStamp

Syntax

Description

Return Type

Example

GetTimeStamp() : Double;

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

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

(1) var presentTime : Double; presentTime := Mpms.GetTimeStamp();

This command gets the present timestamp from the MPMS software and assigns the value to the variable present Time.

GetTimeStampStr

Syntax

Description

Return Type

Example

GetTimeStampStr() : string;

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

Text string indicating the timestamp.

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

MPMS EDC Language User's Manual Quantum Design

Page 75: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

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

Get Times tamp 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 1January1970.

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

Page 76: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Section 3.8 Quick Reference Guide/or EDC Commands

Chapter 3 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

Set Temp 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

Page 77: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

References

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

1998. Magnetic Property Measurement System: MP MS 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

Page 78: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

nning .1-1'

Page 79: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Index

Control loop, aborting, 2-14

Data file commands, 3-30-3-37 and effect on EDC data file, 2-17

Delphi application as EDC compiler, 1-1, 1-2 providing EDC project template file, 1-2, 2-1 starting, 2-12 and using debugger to run EDC program, 2-15-2-16

EDCExitProc procedure, 2-4 EDC commands. See Data file commands; GPIB

communication commands; System environment commands; System measurement commands; Utility commands

EDC command syntax, 3-2 EDC data files

creating. See OpenDataFile command; WriteData command

extension for, 2-17, 3-30 format of, 2-17 plot appearance, defining. See SetAxisLimits

command; SetDataFileLabels command; SetDataFileTitle command; SetPlotAppearance command; SetPlotltems command

specifying base name for. See SetDataFile command specifying title of graph view. See SetDataFileTitle

command EDC language

comparing MPMSR2 EDC with MPMS MultiVu EDC, 1-2-1-3

and function of Delphi, 1-1, 1-2 and GPIB communications, 2-18. See also GPIB

communication commands installing, 1-5 measurement types supported, 1-2. See also System

measurement commands overview of functionality, 1-1 using. See EDC program

EDC option. See EDC language EDCPrgm.dpr file

as EDC project template file, 2-1 opening, 2-12

EDC program aborting sequence running, 2-13-2-14 building with EDC project template file, 2-1, 2-12 components of, 2-2-2-4 creating from existing EDC project template file, 2-12

export functions required to run, 2-3, 2-6 making generic, 2-6 MPMS MultiVu units required to run, 2-2 passing run-time value to, 2-8 running in Delphi debugger, 2-13, 2-15-2-16 running within sequence, 2-13 variable types used with, 2-3, 2-5 as Windows DLL, 1-2, 2-18 writing, 2-12

EDC project template file components of, 2-2-2-4 opening, 2-12 saving as new template, 2-12 using to build EDC program, 2-1

EDC sequence commands. See End EDC sequence command; Execute EDC sequence command; Initialize EDC sequence command

End EDC sequence command automatically added to sequence, 2-9, 2-10, 2-11 calling Finish function, 2-1, 2-9, 2-11 marking conclusion oflnitialize EDC block, 2-9, 2-10,

2-11 exception handler block, 2-13, 2-14. See also IsAborting

command ExecuteEDC function

accessing global variables, 2-8 as export function in EDC project template file, 2-1 frequency of usage, 2-8 and passing run-time value to EDC program, 2-8 performing EDC measurement, 2-8 return value, 2-6 using with Initialize function, 2-8

Execute EDC sequence command adding to sequence, 2-11 calling ExecuteEDC function, 2-1, 2-8, 2-11 frequency of usage, 2-11 inserting in Initialize EDC command block, 2-10, 2-11 passing text string to EDC program, 2-11 return value, 2-6

Export functions, 2-1, 2-6. See also ExecuteEDC function; Finish function; Initialize function

sequence commands calling, 2-1 using for generic operations, 2-6

Exports block, 2-3 External Device Control. See EDC language ExtractNumStr command, 3-39, 3-41. See also

ReadNumber command; SendReadNumber command

Quantum Design MPMS EDC Language User's Manual lndex-1

Page 80: Magnetic Property Measurement System EXTERAN DEVICE.pdf · Quantum Design Magnetic Property Measurement System External Device Control Language User's Manual For the MPMS MultiVu

Temperature, setting. See SetTemp command Timestamp

definition of, 2- I 7 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

Index-3