Library Routines

<< Click to Display Table of Contents >>

Navigation:  Explain™ Control Language  >

Library Routines

Description

The Gamry Framework™ comes with a built-in set of general-purpose library functions and classes. The Framework library contains both compiled C and Explain routines. These library routines provide essential services such as I/O, time-keeping, potentiostat-control and curve-acquisition.

 

Each Gamry Instruments application also uses library functions and classes that are specifically designed for that application's measurements. These items are discussed in the Operator's Manuals for each application.

 

Gamry tip bulb

Please visit our website and support page at https://www.gamry.com/support-2/documentation-downloads/ if you need a specific manual for an instrument.

 

Coding Guidelines

We use UPPERCASE names to refer to class names and Mixed-Case names to refer to object names:

 

LABEL refers to a class.

Label refers to an object.

 

Because Explain is case-sensitive, LABEL and Label are two completely different names. In this manual, when a Mixed-Case object name is the same as a UPPERCASE class name, you may assume the object is of that class.

 

When an ASCII <tab> character appears in sample output, it is indicated as:

 

TEXT <tab> MORE TEXT

 

The terms CURVE and Curve object are used in this section to refer to the various classes of objects that acquire and hold run-time data. An example is the OCV class.

 

The Functions

 

 

Calculate the absolute value of a number.

Calculate exponent of a number.

Convert a quantity to an INDEX.

Find a frequency that rejects line (mains) noise.

Calculate natural logarithm of a number.

Calculate base-10 logarithm of a number.

Convert Real and Imaginary to Modulus.

Convert Real and Imaginary to Phase.

Calculate number raised to a power.

Generate a random number.

Convert quantity to floating point.

Round off a REAL to N decimal places.

Calculate square root of a number.

 

Trigonometry Functions

 

Arc Cosine.

Arc Sine.

Arc Tangent.

Cosine.

Hyperbolic Cosine.

Convert Degrees to Radians.

Normalize an angle to ±360°.

Normalize an angle to ±2π.

Convert Radians to Degrees.

Sine.

Hyperbolic Sine.

Tangent.

Hyperbolic Tangent.

 

Complex-number Functions

 

Add two complex numbers.

Returns the complex conjugate of a complex number.

Calculate the cosine of a complex number.

Divide two complex numbers.

Returns the imaginary component of a complex number.

Compare the values two complex numbers.

Calculate the magnitude of a complex number.

Multiply two complex numbers.

New complex number.

Calculate the phase of a complex number in radians.

Returns the real component of a complex number.

Set the imaginary component of a complex number.

Set the real component of a complex number.

Output the value of a complex number to the STDOUT window.

Complex.Sin()

Calculate the sine of a complex number.

Subtract two complex numbers.

Calculate the tangent of a complex number.

 

Array Functions

 

Gives the dimensions of an array.

Returns the value or object contained in an array element.

Stores a value or object in an array element.

 

String Functions

 

Convert a character to an ASCII number.

Convert an ASCII number to a character.

Check if character is alphanumeric.

Check if character is a letter.

Check if character is numeric.

Check if character is lowercase letter.

Check if character is a punctuation character.

Check if character is a white-space character.

Check if character is uppercase letter.

Check if character is a hexadecimal digit.

Compare two strings.

Get the ith character in a string.

Calculate length of string.

Convert string to lowercase.

Set ith character in a string.

Convert string to uppercase.

 

Time Functions

 

Generate a string containing a date.

Set a variable to the current time.

Generate a string containing a time.

 

Statistical Functions

 

Calculate mean of a data set.

Calculate statistics on one data set.

Calculate statistics between two data sets.

 

Delay and Program Control Functions

 

Immediately abort a script.

Halt script until F2-Skip button selected.

Launch a child script.

Launch a child script and wait for completion.

Pause script for a set number of seconds.

Tell a script to sleep until a specified time.

Allows a user to continue or abort.

Start up a Windows® application.

Let other Windows programs gain control.

 

Output Functions

 

Used in output of data from a class CGEN object.

Prints the Iquant to a string.

Prints the results of a Ivt experiment to the Output file.

Prints the status of the Ivt to a string.

Used in output of data from a class IVT object.

Prints the Label to the current Output.

Prints a label object out to a string.

Output to the current output file.

Output to file with automatic newline.

Output an item to a STRING.

 

Video Display Functions

 

Reports a fatal error and terminates the run.

Updates the headline above the data curve.

Creates, displays, and operates a message box.

 

Updates runner window status display.

Secondary update runner window status display.

Asks operator a multiple-choice question.

Opens a dialog box for inputting parameters.

Sends output to the STDOUT window.

Brings STDOUT window to foreground.

Warns operator; waits for OK button to proceed.

 

Class and Object Manipulation Functions

 

Makes a particular curve the active curve.

Places a data point in the Cgen object's data array.

Returns the number of points actually acquired in a Cgen object.

Extracts a data column from a Cgen object.

Extracts a single data item from a Cgen object.

Create a new object of the class CGEN class.

Helps to define the real-time display of a Cgen object.

Returns a string containing the Cgen object's tag.

Reads the Active Cell flag from a channel object.

Reads the sample area from a channel object.

Reads the test identifier string from a channel object.

Creates a channel object.

Prints the Channel object's notes information to the output file.

Allows a script to set the Active Cell flag in a channel object.

Reads the name of a chemical system from a channel object.

Dynamically add a class variable.

Dynamically add an instance variable.

Numerical sorting of classes.

Place class name in a STRING.

Dynamically create a class.

Informs Setup() what to do with the DLGSPACE object.

Generates a new DLGSPACE object.

Reports the Aux A/D setting.

Reports the number of the Active Cell (if any).

Releases communications with multiplexer.

Creates a new ECM8 object.

Reports Inactive Cell control mode of one selected ECM8 channel.

Acquires the use of an ECM8.

Changes the Aux A/D setting.

Changes the active cell setting.

Set the Inactive Cell control mode for one or more ECM8 channels.

Reports the version number of the ECM8 firmware.

Return a class given a STRING.

Creates a new constant-current signal generator.

Changes the parameters of an existing constant-current signal generator.

Reports the number of the Active Cell (if any).

Releases communications with multiplexer.

Creates a new IMX object.

Reports Inactive Cell control mode of one selected IMX8 channel.

Acquires the use of an IMX8.

Changes the active cell setting.

Set the Inactive Cell control mode for one or more IMX8 channels.

Allows an Iquant to be edited, saved, and restored in Setup().

Creates and initializes a new Iquant object.

Prints an Iquant to the current Output file.

Sets the value of the Iquant.

Copies the current value of a Iquant into an INDEX.

Makes the real-time plot of the Ivt object the Active plot.

Returns the number of points actually acquired in an Ivt object.

Creates and returns an object of the class DATACOL.

Extracts a single data item from an Ivt object.

Creates a new Ivt object.

Runs the curve.

Formats the real-time display of an class IVT curve.

Allows Label objects to be edited, saved, and restored in Setup().

Creates a new label.

Allows the script to set a label's string from within Explain™.

Copies the Label text into a STRING.

Dynamically creates a new object.

 

Disk File Setup Functions

 

Recover an old setup on disk.

Save a setup on disk.

 

Miscellaneous Functions

 

Dynamically acquire DLL library function.

Allows a channel to be displayed and modified in a Setup dialog box.

Read an *.INI file value.

Enables or disables the Ivt termination limits.

Avoids premature stopping of a curve caused by noise.

Sets up threshold conditions which must be met before Ivt.StopAt() tests are performed.

Gives various parameters.

Dynamically load a DLL library.

Set an *.INI file value.

class VARIABLEANDUNITS

Interconvert units.

Determine size of a VECTOR.

Generate a new VECTOR.

 

The Classes

 

Mathematical Classes

 

Complex number class.

 

Parameter Classes having Dialog license suitable for Setup

 

Sets up multiplexed experiments.

Generates white space in Setup().

An integer parameter for general use.

A short string for general use.

A multi-line string too long to SAVE/SAVE.

Complex class: 1 class TOGGLE, 1 class QUANT.

An output file.

A potential with vs. Eref and vs. Eoc info.

A real parameter for general use.

Radio button selection.

String used for descriptive purposes.

An on/off parameter for general use.

Complex class: 1 class TOGGLE, 2 QUANTs.

 

Instrument Driver Classes

 

An ECM8 Multiplexer.

An IMX8 Multiplexer.

A potentiostat.

 

Classes having Signal licenses used by Curve Functions

 

A constant current.

A constant-voltage signal.

 

Curve Classes

 

Generic curve class.

A generic name for all this group's classes.

Generic class IVT curve used for conditioning.

Curve to measure open-circuit potential.

 

Miscellaneous Classes

 

Array class which can hold any object.

Hold data extracted from class CURVE object.

 

Related Topics