plates[ ] object
The VWorks JavaScript interpreter provides a plates[ ] object that can be accessed by a script. plates[ ] is a VWorks-defined array of plate objects that provides access to properties of one or more microplates upon which the current task is operating. You use the plates[ ] object only for subprocess tasks that reference at least one microplate. For subprocess tasks that do not employ microplates, such as the curly-brace task, the plates[ ] object is not relevant.
 
*To access microplate properties in a non-subprocess task, use the plate object.
 
In a subprocess, the plates[ ] object is defined only for those tasks that employ a microplate, such as Aspirate or Dispense. Each element in the plates[ ] object references a single microplate that is referenced by the current instance of the task. The array elements refer to actual process plates, not just instances of a plate. The first element of the plates[ ] object is the first plate associated with that subprocess task. Therefore, plates[0] in the Aspirate task refers to the Source plate, while in the Dispense task, plates[0] is the Destination plate.
The array elements are in the order that they appear in the task. For example, the Dilute to Final Volume task uses two microplates: Source (plate[0]) and Destination (plate[1]). Suppose the task is in a loop and a Change Instance task changes the Destination microplate each time through the loop. The Source microplate remains plates[0] and the Destination microplate remains plates[1] each time the Dilute to Final Volume task is performed.
Properties
 
*You can list plates[ ] properties only for a subprocess task that has at least one microplate associated with it.
 
You can list the plate properties of each plate[n]. For example, you can list the properties for plate[0] and plate[1] to identify and determine the differences between them.
To list the plates[ ] properties in the Main Log:
1 Open a protocol.
2 In the Protocol area, select a subprocess task that references at least one microplate.
3 In the Task Parameters area, click Advanced Settings.
4 Type the following in the Script to be executed before task area:
for (x in plates[n])
{
print ("plates[n]." + x + " =" + plates[n][x]);
}
Where n is the array index.
5 Run the protocol. The plate properties appear in the Main Log.
The plates[ ] properties are the same as the plate properties. For the list and description of the plate properties, see plate object.
Methods
Methods are JavaScript functions invoked through an object. The plates[ ] object has the following methods, available on those systems with the volume-tracking database option. Use these methods to track microplate-specific data.
Note: You can use the plates[n].getUserData() method to retrieve information stored by the plate.setUserData() method.
 
Method
Description
plates[n].setUserData(string key, string value)
Stores the value under the key in a database record associated with this microplate. The data is retained across runs.
The method is only available if the database is installed.
plates[n].getUserData(string key)
Returns the value stored earlier using plates[n].setUserData or plate.setUserData. (See plate object.)
The method is only available if the database is installed.
plates[n].reportErrorToPlugin(string error)
Calls the VWorks Hooks ScriptPlateError method to pass error to the Hooks plugin.
plates[n].setBarcode(SIDE, string barcode)
Manually stores the barcode data in plates[n].barcode[SIDE].
For example:
plates[0].setBarcode(WEST, ”A1234”)
Related information
 
For information about...
See...
Using JavaScript in the VWorks software
VWorks-defined functions
Other VWorks-defined objects
Using JavaScript utilities
JavaScript task
Startup and cleanup protocols