You are on page 1of 9

VisionPro Standard Course

Lab 12: Data & Results Analysis with Application Wizard

1. Load your MyOCRMax.vpp APPLICATION file.


2. Open up CogJob 1.

3. Be sure the following output terminals are exposed from their respective tools:
a. CogPMAlign
i. Score
b. CogHistogram
i. Standard Deviation
c. CogBlob
i. Count
d. CogCaliper
i. Edge Pair Count
e. CogAngleLineLine
i. Angle
f. CogCaliper from Calibrated Units
i. Measured Width
g. CogBlob from PatInspect
i. Count
4. Create a CogDataAnalysis Tool and add a data entry channel for each of the items above.

5. Remove the default RunParams.Item[“Channel 0”].CurrentValue and add the input terminals for
each one of the newly created channels. . Make the proper connection between the inspection
results and the newly created channels.
6. Open the CogDataAnalysis Tool and set the proper Reject Low, Warn Low, Warn High, and
Reject High for your inspection. Test your inspection to make sure the PASS side always passes
and the FAIL side always FAILS. Also expose the ToleranceStatus of each of these values.

7. Add all the CogDataAnalysis Tool’s ToleranceStatus terminals to Posted Items.


8. Add all the CogDataAnalysis Tool’s CurrentValue terminals to Posted Items.
9. Save your APPLICATION as MyResults.vpp.

Inpection Designer
10. Load your MyResults.vpp APPLICATION file.
11. Open up CogJob 1.
12. Create a new CogToolBlock and place it after the CogDataAnalysis tool.
13. Open the CogToolBlock and add the input terminal of type Cognex.VisionPro.CogImage8Grey
and name it “InputImage”
14. Connect the InputImage terminal of the ToolBlock to the Image Source.OutputImage in the
CogJob and run the job once.

15. In the Tools tab of the ToolBlock, create a simplistic program to see if part has passed or failed
such as looking for the word “Pass” on the demo plate

a. Create a PMAlign tool to look for the word “Pass” and you should see a score of
something close to .99.

b. Set up this tool so that a match is found even when the word “FAIL” appears instead of
“PASS”. The score for the word “FAIL” should be very low (.30ish) when compared to
the model you set for the word “PASS.”

c. Make sure each image generates at least one PmAlign match result.

16. Add a ResultsAnalysis tool that is looking for the score of the PMAlign tool to be over .85. This is
done by creating an input and naming it “PMScore”.

17. Attach the created input terminal to the PMAlign score in the Tools pane of your ToolBlock.
18. Go back to your ResultsAnalysis tool and create a function called “ChkPass”. It should be a
GreaterThanOrEqual operator based on the PMScore (argument0) and the number .85
(argument1).
19. Finally, in the Output line, select ChkPass under Argument 1 so that the tool will be true if the
function ChkPass is true. Then close the tool.

20. Attach the Verification parameter to the database of images file you created in the second lab.
Do this by selecting the Verification icon.
21. Then select the “Connect to input database…” icon on the resulting window.

22. Select the image database that you had created in lab 2, then select OK.

23. Now select the “Edit input database…”


24. Click “Import images” button:

25. And select the appropriate grades for your images. When complete, close the window.

26. Now run the Verification.


27. If all goes well, everything should pass.

28. But in this case, it doesn’t. Why not? What could you do to make it work?

You might also like