IVHooks interface : BarCodeMisread method

BarCodeMisread method
Event
A barcode misread occurred.
Description
VWorks software calls the BarCodeMisread method after a barcode misread occurs. The plugin must tell VWorks software what action to take.
Also, if an expected barcode is not found, VWorks software reports a barcode misread and calls the BarCodeMisread method.
Syntax
 
HRESULT BarCodeMisread(
[in] BSTR sXML,
[in, out] BSTR* sResultXML
);
Parameters
 
[in] A BarCodeMisread XML element containing information about the labware that was involved in the barcode misread.
[in, out] A Velocity11 XML element or a HookResults XML block that specifies the action to take after a barcode misread occurs. See “HookResults XML block” .
BarCodeMisread method input
VWorks software passes a BarCodeMisread XML element into the sXML parameter of the BarCodeMisread method. This XML element provides information about the labware involved in the barcode misread.
BarCodeMisread element
The BarCodeMisread element has the following attributes:
 
If the protocol has been saved, the value of this attribute is the protocol’s file path. If the protocol has not been saved, the value is the default protocol name.
Example of BarCodeMisread method input
The following sample code is a BarCodeMisread XML element that is received by the plugin from VWorks software as a string in the sXML parameter of the BarCodeMisread method. VWorks software tells the plugin that a barcode misread occurred on the south side of the tip box named NameofPlate.
 
version='1.0'>
<BarCodeMisread BarcodeSide='SOUTH_SIDE' BarcodeRead='NAW1001'
OriginalBarcode='NAW1002' PlateName='NameofPlate' InstanceNumber='1' DatabaseID='1'
Labware='384 V11 ST10 Tip Box 10734.102' Device='NameofDevice'
Location='NameofLocation' Path='C:\VWorks Workspace\Protocols\protocol1.pro'/>
BarCodeMisread output
The plugin returns either a Velocity11 XML element or a HookResults element in the sResultXML parameter of the BarCodeMisread method as follows:
 
Action VWorks software should take
Halt the protocol and prompt the user to resolve the misread.
Ignore the error and continue as if the misread has not occurred.
ResultType=LogMessage or ResultType=LogError
Velocity 11 element (Velocity11 XML element)
For the Velocity11 XML element, the Velocity11 element has the following attributes plus the md5sum and version attributes:
 
The value BarCodeMisreadResult.
Note: This value cannot be used unless the user selected Halt on bar code misreads in the Options dialog box.
The barcode to use if the value of the Action attribute is BCR_REPLACE.
If Action is not BCR_REPLACE, this attribute has no value.
Velocity 11 element (HookResults XML block)
For the HookResults XML block, the Velocity11 element has the following additional attribute:
 
Note: This value cannot be used unless the user selected Halt on bar code misreads in the Options dialog box.
Example of BarCodeMisread method output (Velocity11 XML element)
The following sample code is a Velocity11 XML element that is returned to VWorks software by the plugin as a string in the sResultXML parameter of the BarCodeMisread method. The plugin tells VWorks software to replace the barcode that was read with the barcode named A123456.
 
version='1.0' Action='BCR_REPLACE' BarcodeResult='A123456' />
Example of BarCodeMisread method output (HookResults XML block)
The following sample code is a HookResults XML block that is returned to VWorks software by the plugin as a string in the sResultXML parameter of the BarCodeMisread method. (See “HookResults XML block” .) The plugin tells the scheduler to pause the protocol after a barcode misread occurs. The plugin also tells VWorks software to quarantine the labware and to write the following Error-type message to the Main Log:
Plugin paused: Barcode is not in the database.
 
Action='BCR_QUARANTINE'>
<HookResults>
<Results>
<HookResult ResultType='LogError' ResultValue='Plugin paused: Barcode is not
in the database.' />
<HookResult ResultType='PauseExecution' ResultValue='True' />
</Results>
</HookResults>
Related information