Testing and debugging : Testing your VWorks plugin

Testing your VWorks plugin
IMPORTANT You should always thoroughly test your plugin using the IWorksTest utility before putting your plugin into production.
Before you begin
Compile your plugin and copy the appropriate *.dll files into the …\Agilent Technologies\VWorks\Plugins folder as follows:
Starting the IWorksTest utility
To start IWorksTest:
1
Open the …\Agilent Technologies\VWorks folder.
2
Double-click IWorksTest.exe.
 
3
In the IWorksTest dialog box that appears, select your plugin from the list at the top.
The names displayed in this list box are from the Device element’s Description attribute provided in the XML metadata. See “Device element” .
If your plugin is not on the list, make sure you copied all of the proper *.dll and TLB files into the …\Agilent Technologies\VWorks\Plugins folder.
Note: You can add breakpoints to your code to determine if the plugin is invoked when IWorksTest is started.
Reviewing and saving your XML metadata
IMPORTANT Your plugin will not load if the XML metadata is not well-formed.
To review your XML metadata:
1
In the MetaData area, click one of the following buttons to display all or one of the root nodes:
If you provided a 32x32 bitmap icon for the device, the icon should be displayed on the right side of the IWorksTest dialog box.
2
a
Click the Dump MetaData button.
b
Enter a File name with an .xml extension so you can open the file in an XML editor or in a Web browser.
c
Click Save.
Testing device initialization
To test the device initialization:
1
Select the Device node in the MetaData area.
2
Click Initialize.
IWorksTest calls the IWorksDriver Initialize method. See “Initialize method” .
If the device is powered on, you can verify that your plugin can communicate with the device and perform any required initialization such as “home the device’s motors.”
If the device is powered off, you can test the plugin’s ability to handle that error condition.
Testing the diagnostics dialog box
To test the diagnostics dialog box for your device:
1
2
Click Diags.
IWorksTest calls the IWorksDiags ShowDiagsDialog method. See “ShowDiagsDialog method” .
By selecting different user privileges, you can test the behavior of the diagnostics dialog box under different security levels without having to log in to VWorks software as a different user.
Testing commands
To test individual commands:
1
In the MetaData area, expand Commands and then select the command you want to run.
2
In the Command area, specify the parameter values you want to pass in the method call.
3
Click Command.
IWorksTest calls the IWorksDriver Command method using the parameter values you specified in step 2. See “Command method” .
Testing IRobotDriver methods
If your plugin implements the IRobotDriver interface, you can check two of its methods using IWorksTest: CheckPlatePresent and Move. See “CheckPlatePresent method” and “Move method” .
To test IRobotDriver methods:
1
In the MetaData area, expand Devices and then expand Robot.
2
Check microplate presence for the CheckPlatePresent method
Move microplate for the Move method
3
In the Command area, specify the parameter values you want to pass in the method call.
4
Click Command.
IWorksTest calls the selected method using the parameter values you specified in step 3.
Related information