1. Product Help Center
  2. dragonfly discovery
  3. dragonfly discovery Integration Guide

dragonfly methods

Methods that return a Task are asynchronous and will return immediately, before the operation is
complete. Calling these methods using ‘await’ from within ‘async’ methods will allow you to
determine when the operation is complete.


Dragonfly()

Creates the dragonfly object, setting up a connection to the dragonfly server object using the
default host and port.

Possible exception: dragonflyNotConnectedException


Dragonfly(string dragonflyHost, int dragonflyPort)

Creates the dragonfly object, setting up a connection to the dragonfly server object using
specified host and port.

Possible exception: dragonflyNotConnectedException


Dispose()

Disposes of the object and terminates the connection (if it still exists) with the dragonfly
application server object.


bool IsOK()

Returns true if the machine is OK, false otherwise.

Possible exception: dragonflyNotConnectedException


bool IsReady()

Returns true if the instrument is ready/idle, and available to start a task. It returns false if it is
currently in the middle of performing a task (e.g. running a dispense, aspirating, resetting, etc).

Possible exception: dragonflyNotConnectedException


bool CheckConnection()

Returns true if the dragonfly application is connected, false otherwise.

Actively checks whether there is still a connection to the dragonfly application. After calling this,
when there is no longer a connection, IsConnected will return false.

Without a call to this method first, IsConnected may return true even if there is not a connection,
because the dragonfly automation object may not have registered that the connection has been
lost.


Task ResetAsync()

Awaitable async method to Reset the dragonfly machine.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


void LoadExperimentFile(string filePath)

Attempts to load a dragonfly experiment (.dfx) file.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


void LoadCSVFile(string filePath)

Attempts to load a dragonfly platemap (.csv) file.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task RunAsync()

Runs a dispense of the currently selected layer, asynchronously. As this is an async method, it
should be used with the await operator.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


void StopRun()

Stops any current dispense run. This method issues a stop request and returns immediately. If no
dispense run is currently running, it has no effect.

Possible exceptions: dragonflyNotConnectedException , dragonflyException


Task RunSimulationAsync()

Runs a simulation dispense of the currently selected layer, asynchronously.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


void StopSimulation()

Stops any current simulation dispense run. This method issues a stop request and returns
immediately. If no simulation dispense run is currently running, it has no effect.

Possible exceptions: dragonflyNotConnectedException , dragonflyException


Task ParkAndReleaseAsync()

Parks the deck in the standard position, and releases the plate clamp, asynchronously.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


bool IsParkedAndReleased()

Returns true if the deck is in the parked position with the clamp released, false otherwise.

Possible exception: dragonflyNotConnectedException


Task ParkUnderLidAsync()

Parks the deck in the incubation position, asynchronously.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


bool IsParkedUnderLid()

Returns true if the deck is parked under the incubation lid, false otherwise.

Possible exception: dragonflyNotConnectedException


void SwitchLayer(int nextLayerIndex)

Changes the selected layer to the layer with the index passed in, if possible (i.e. if a layer at this
index exists). The index is 0-based.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException


void SwitchToNextLayer()

Changes the selected layer to the one after the currently selected layer, if there is one, otherwise
does nothing.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException


void SwitchToPreviousLayer()

Changes the selected layer to the one before the currently selected layer, if there is one, otherwise does nothing.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException


int GetCurrentLayerIndex()

Returns the 0-based index of the currently selected layer.

Possible exception: dragonflyNotConnectedException


int GetTotalNumberOfLayers()

Returns the total number of layers in the currently loaded experiment.

Possible exception: dragonflyNotConnectedException


string GetExperimentFolderPath()

Returns the folder path for the default location where dragonfly experiment and CSV files are
stored.

Possible exception: dragonflyNotConnectedException


List<int> GetSyringeVolumes()

Returns a list of values that describe the volume of liquid, in μl, in each syringe. List ordered in
accordance with the head index. Reported volumes may not be meaningful if this method is called while dragonfly is busy.

Possible exception: dragonflyNotConnectedException


List<bool> GetSyringesFitted()

Returns a list of bools that indicate which heads have syringes connected. List is ordered in
accordance with head indexes.

Possible exception: dragonflyNotConnectedException


Task MultiAspirate(int multiple)

Aspirates for the currently selected layer the specified number of times. The volume of liquid
aspirated will be limited by the capacity of the syringe. dragonfly considers the volume of liquid
already in the syringe before aspirating. For example, if MultiAspirate(2) is called twice, the second call will have no effect.

Note that this is an async method, so should be used with the await operator.

    await _dragonflyServer.MultiAspirate(MultiAspirateCount);

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task AspirateCurrentLayer()

Aspirates all syringes with assigned heads in the current layer. A layer must be selected, and
syringes must be fitted to all heads that have liquids assigned.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task AspirateToVolume(Dictionary <int, int> aspirateVolumeMap)

Requests that syringes aspirate the specified volume of liquid, in μl. Only syringes that are
required to aspirate should be included in the dictionary.

Note – the volume of liquid aspirated will be slightly greater than that requested. This is because
dragonfly over aspirates slightly in order to ensure that there is sufficient liquid for subsequent
dispenses. Typically, this volume is in the region of 5μl.

The dictionary key identifies the head index.

The dictionary value is the volume of liquid that should be aspirated, in μl.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task AspirateToMaxVolume(List<int> headIndexes)

Aspirates syringes to their maximum volume, identified by their head index. Syringes whose head indexes do not appear in the list will not aspirate.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task Purge(List<int> headIndexes)

Purges all heads in the list of head indexes that have a syringe fitted.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task PurgeAll()

Purges all heads that have a syringe fitted.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task PurgeAndRemove(List<int> headIndexes)

Purges and removes all heads in the list that have a syringe fitted.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task PurgeAndRemoveAll()

Purges and removes all heads that have a syringe fitted.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task EngageAll()

Engages all heads that have a syringe fitted.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task ConnectToAllAssignedPumps()

Attempts to establish a comms connection with every pump that is assigned to an AFR group.
Pumps will still need to be started once a connection has been established.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


bool AreAllAssignedPumpsConnected()

Returns true if a connection has been established with all pumps that are assigned to an AFR
group.

Possible exception: dragonflyNotConnectedException


bool AreAllAssignedPumpChannelsRunning()

Returns true if all pump channels that are assigned to an AFR group are running.

Possible exception: dragonflyNotConnectedException


Task StartAllAssignedPumpChannels()

Starts every pump channel that is assigned to an AFR group.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task StopAllPumpChannels()

Stops every pump channel that is currently running.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException ,
dragonflyException


Task TestAsync()

Used for async API testing.

Possible exceptions: dragonflyNotConnectedException , dragonflyBusyException


Next article - Events