Hardware manual

Impact Reference Guide TCP-IP Logger
4-121 Datalogic Automation Inc.
successful = Scriptor.setProperty("Panel 1.Save Vision Program.File To Save",
"BearingOCR.vp, Locate.vp");
}
if(successful)
{
successful = Scriptor.executeMethod("Panel 1.Save Vision Program.Save Pro-
gram");
}
if(successful)
{
// wait for all the loads to complete
String saveCompleted = "false";
while(saveCompleted.equals("false"))
{
saveCompleted = Scriptor.getProperty("Panel 1.Save Vision Program.Save
Successful");
Scriptor.sleep(200); // sleep 200 milliseconds
if(saveCompleted == null) // couldn't get save successful property
{
successful = false;
Scriptor.displayPrompt("Error getting save successful status");
break;
}
}
}
Run a script with CPM Runtime
The script runs when CPM Runtime is started by adding switches to the command line. Once CPM Runtime
has opened the specified Control Panel, the specified script file is opened and interpreted. When the script is
completed, the loaded Control Panel Application is unloaded and CPM Runtime exits.
To edit the CPM Runtime command line
1. Find the CPM Runtime icon on the desktop.
2. Right click on the icon.
3. Select Properties from the menu.
4. Click the Shortcut tab.
The CPM Runtime command line appears in the Target field on the Properties dialog. The default com-
mand line is:
"C:\Datalogic\IMPACT\Applications\jre\bin\javaw.exe" -XX:+UseParallelGC
-Xmx400m -Xms64m -Xrs -jar "C:\Datalogic\IMPACT\Applications\CPM\CPMRE.jar"
5. These command line options can be added to the end of the default command line to call the script cre-
ated with the Scriptor control.
-p "file.cp" (file.cp = path to Control Panel Application)
-scr "file.bsh" (file.bsh = path to user-written script file)
-v (make the CPM Runtime frame visible)
6. When you have finished editing the command line, click OK to close the Properties editor dialog.
TCP-IP Logger
The TCP-IP Logger control receives data from a vision program TCP/IP Out tool and writes it to a text file.
This control is not displayed on the Control Panel Canvas. To see it, click the Select Design View Options