Search this site
English
Contact Us

Steps for Creating an Application Using GamryCOM

framework overviewIntroduction

Here are the basic steps for creating a basic application with GamryCOM. On the second page are error codes reported by GamryCOM. Please see the documentation and other example code for more information. The specifics of each step and errors vary depending on the programming environment used.

 

 Initialize Device List

  1. Create an IGamryDeviceList object.
  2. We recommend a three-second delay before proceeding in order to allow all of the connected Gamry Devices to initialize.
  3. IGamryDeviceList.EnumSections () returns a list of available devices.

Initialize the Pstat

  1. Create an IGamryPstat object.
  2. Initialize the object by calling IGamryPstat.Init () and pass in the requested device’s Section.
  3. Open the Pstat via IGamryPstat.Open ().

At this point, you may modify the Pstat’s settings via appropriate methods.

Initialize a Dtaq

  1. Create an IGamryDtaq object appropriate for the application, such as IGamryDtaqIv, for example.
  2. Initialize the Dtaq by calling the IGamryDtaq’s Init function and passing it your initialized Pstat object.
  3. Register callback functions for IGamryDtaq.OnDataDone and IGamryDtaq.OnDataAvailable.

Initialize a Signal

  1. Create an IGamrySignal object appropriate for the application, such as IGamrySignalArray, for example.
  2. Initialize the Signal by calling the IGamrySignal’s Init () function and passing it your initialize Pstat object, as well as its other required parameters.

Set Signal

  1. The Pstat needs to be notified of the Signal being used. Call the Pstat’s SetSignal () function, passing it the Signal Object that was initialized in the previous steps.

Depending on the programming environment you use, you may have to cast the initialized Signal to the more generic IGamrySignal for this step.

Acquire Data

    1. Call the Dtaq’s Run function.
    2. Begin acquiring data by either:
  • Polling for data on a certain interval
  • Using the OnDataAvailable callback mechanism
  • Retrieve data from the Dtaq by calling its Cook () method, passing in the number of data points requested.

Cook() returns a two-dimensional array of data points. See the Dtaq's documentation for details on its contents.

    1. Complete acquisition by:
  • Waiting for the OnDataDone callback mechanism
  • Calling the Dtaq’s Stop () method.

Close and clean up all objects.

 

Error Code

 

Description

3758096386

 

Device Load

3758096387

 

Address Invalid

3758096388

 

Address Used

3758096389

 

Device Allocation

3758096390

 

Device Not Responding

3758096391

 

IRQ Device Count

3758096392

 

IRQ Invalid

3758096393

 

IRQ Device Invalid

3758096394

 

Device Init

3758096395

 

Board Number Invalid

3758096396

 

Device Acq Mode

3758096397

 

Queue Allocation

3758096398

 

Device Control Mode

3758096399

 

Device Not Open

3758096400

 

Device Signal

3758096401

 

Device Signal Control

3758096402

 

Device Signal No Data

3758096403

 

Device Create Event

3758096404

 

IRQ VXD Load

3758096405

 

IRQ Unavailable

3758096406

 

IRQ Did Not Intall

3758096407

 

IRQ Create Thread

3758096408

 

IRQ Create Event

3758096409

 

Queue Full

3758096410

 

Queue Empty

3758096411

 

Queue Invalid

3758096412

 

Queue Event

3758096413

 

Alloc

3758096414

 

Event

3758096415

 

Invalid Key

3758096416

 

Invalid Classname

3758096417

 

Invalid Device

3758096418

 

Device List Load

3758096419

 

Register Device Notify

3758096420

 

Device Serial Number Not Unique

3758096421

 

Device Not Found

3758096422

 

Memory Object

3758096423

 

Device In Use

3758096424

 

Invalid Device Type

3758096425

 

Invalid Device Model

3758096426

 

Device Interface Not Found

3758096427

 

Device Needs Reset

3758096428

 

Queue Register

3758096429

 

List Invalid

3758096430

 

Device Not Authorized

3758227620

 

Invalid Signal Generation Parameters

2148007941

 

Reference Family Version Mismatch