Control Cameras#
Important
Expert function
Control Camera management is an Expert function: it requires knowledge of Cognex VisionPro and C# scripts, and is intended for experienced users. For information on Expert mode, see What it is and When it is needed.
Note
This page concerns the start_control_ command and the VisionPro scripts (available from software version v0.24). For the complete procedure, refer to Control Cameras and start_control_ command.
Responses and error messages#
Errors relating to the control script begin with #Error_Control_. The Not_Found case is not a software error: it means that the locator did not detect any object. Camera errors may be reported separately with the prefix #Error_Camera.
Response |
Meaning / recommended action |
|---|---|
|
Inspection completed with no detections: check the part, the image and the model. |
|
The parameter is not handled by the script: check the text after |
|
One of the expected tools is missing or has a different name. |
|
The record of the tool’s last run is not available. |
|
The |
|
The selected record does not contain a valid image. |
|
The execution of the VisionPro task generated an error. |
|
The script did not return a valid string. |
|
Acquisition problem: check the camera connection and status. |
Note
The sample script may also return #Error_Control_TOOL_RUN when the results of a tool are not available (for example #Error_Control_TOOL_RUN;Tool=2 if the error concerns tool 2). If at least one tool produces an execution error, the error is written at the beginning of the response.
Quick checks#
Check that the command has the trailing underscore (
start_control_) and that the parameter contains no spaces.Check that the ToolBlock input and output names are still
Image,Input_Control,Output_StringandOutput_Image.Check that the
Output_Imageoutput is configured as a compatibleCogRecord.Run Test Tool from the HMI even without a connected robot to isolate the problem from TCP communication: in this case the result is shown in the HMI but is not transmitted to the robot.
After every change to the script, repeat the quick acceptance test.