IWorksDriver interface : IsLocationAvailable method

IsLocationAvailable method
Description
VWorks software calls the IsLocationAvailable method (repeatedly) during task scheduling to ask the plugin whether the target location is available for a labware-handling process.
This method was created for complicated multi-robot systems to prevent one robot from reaching into the envelope of another robot, which could cause a robot crash.
The IsLocationAvailable method prevents VWorks software from scheduling tasks on devices with complicated geometry or very long processes until preconditions are met. This method is not meant to preempt the scheduler or to wait for a precondition to occur.
IMPORTANT The IsLocationAvailable method should take as little time as possible, as it is called repeatedly during scheduling.
Syntax
 
HRESULT IsLocationAvailable(
[in] BSTR LocationAvailableXML,
[out,retval] VARIANT_BOOL *Available
);
Parameters
 
[in] A LocationAvailable XML block that contains information about the target location.
[out, retval] Indicates whether the target location is available for a labware-handling process.
VARIANT_TRUE = The target location is available for a labware-handling process
VARIANT_FALSE = The target location is not available for a labware-handling process
IsLocationAvailable method input
VWorks software passes a LocationAvailable XML block into the LocationAvailableXML parameter of the IsLocationAvailable method.
LocationAvailable XML block
The LocationAvailable XML block contains the LocationAvailable element and all its children. This XML block provides information about the target location. The contents of the LocationAvailable XML block are different for storage and non-storage devices.
The plugin uses the information from the LocationAvailable XML block to determine whether the target location is available for a labware-handling process. Although most plugins return TRUE directly, some plugins determine availability according to the task name and the location name.
XML structure
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<LocationAvailable>
<StorageLocation>
<Location />
</StorageLocation>
<Command />
</LocationAvailable>
XML elements and attributes
See “LocationAvailable XML block components” .
Example of IsLocationAvailable method input
The following sample code is a LocationAvailable XML block that is received by the plugin from VWorks software as a string in the LocationAvailableXML parameter of the IsLocationAvailable method. VWorks software asks the plugin if the target location named Cassette 1, Slot 1 on the storage device named Plate Hub Carousel  1 is available for a labware-handling process.
 
<LocationAvailable Device='Plate Hub Carousel - 1' IsRelidding='0'
IsSimulating='0' IsSourceLocation='0' Labware='1536 Black Greiner'
Location='Cassette 1, Slot 1' PlateDevice='Plate Hub Carousel - 1'
PlateLocation='Cassette 1, Slot 1' PlateName='process - 1' >
<StorageLocation >
<Location Group='0' MaxStackHeight='460' Offset='0' Type='1' />
</StorageLocation>
<Command Compiler='0' Editor='0' NextTaskToExecute='1' RequiresRefresh='0'
TaskRequiresLocation='1' VisibleAvailability='1' />
</LocationAvailable>
IsLocationAvailable method output
The plugin returns VARIANT_TRUE or VARIANT_FALSE in the Available parameter of the IsLocationAvailable method.
VARIANT_TRUE
When the plugin returns VARIANT_TRUE in the Available parameter, the scheduler does one of the following:
Calls the MakeLocationAvailable method and begins a command cycle on the device (see “MakeLocationAvailable method” )
Calls the IsLocationAvailable method again at a later time
Even if the plugin returns the value VALIANT_TRUE, VWorks software might not use the location, as explained in the next section.
VARIANT_FALSE
When a task is executing at a device location, VWorks software knows that the location is unavailable, or busy. Therefore, VWorks software will not do either of the following:
Call the IsLocationAvailable method
Most plugins return VARIANT_TRUE in response to this method; however, if a task is not executing, but the location should still be considered unavailable, the plugin should return VARIANT_FALSE.
Example of an unavailable location
When the gantry on the Bravo moves around, it blocks access to deck locations that are not occupied. This interference might last awhile. Returning VARIANT_FALSE allows the scheduler to move on and see what else it can do in the system.
Related information