You are on page 1of 4

VisionPro Standard Course

Lab 13: Input/Output and Application Wizard

Digital Output (if IO Module is Available)


1. Load application MyResults.vpp
2. Open the Communication Explorer and go to Discrete I/O folder
3. Choose the USB‐1024‐LS module (or other if instructed by instructor)
4. Set up three lines to be outputs (lines 20‐22)
a. Heartbeat for the QuickBuild application
b. Data Ready Signal
c. Result from the Data Analysis tool

5. Enable the IO and note the results


6. Save application as MyDIO.vpp

TCP/IP Communication
1. Load application MyDIO.vpp
2. Open Communication Explorer and go to TCP/IP.
3. Set the Device Type to Server and the Port to 5001. You should notice that this new item is
added under the TCP/IP folder in Communication Explorer.

4. Select the new item to open the dialog to configure.


5. Select the first open cell under field to open the Select Field browser.
6. Add the PMAlign result for Translation X and Y as well as Rotation to send to a remote device via
TCP/IP.

7. Select Output Terminator to add carriage return and new line as well as your delimiter of choice.
8. Enable the IO.
9. Start a Command screen and type in “ipconfig” to get the IP Address of your PC. Make note of
this.
IP Address: _____________________________
10. Go to Windows Start  All Programs  Accessories  Communication and choose
Hyperterminal.
11. Under Connect using: select “TCP/IP (Winsock)
12. Take the IP Address that you wrote down and insert under the Host Address. Set the port to
5001.
13. Select OK and then connect this session by selecting the icon that looks like a phone with the
receiver down.
14. Now run the QB job. You should see the data being sent to the Hyperterminal dialog.

15. Save application as MyTCPIP.vpp and completely exit the QuickBuild environment.
Application Wizard
1. Launch the VisionPro Application Wizard.
a. Step through the wizard.
i. Select the recently saved MyResults.vpp APPLICATION file.
ii. Name you application Demo Plate Inspection.
iii. Ensure the Include QuickBuild access checkbox is checked.
iv. Add 8 tabs at the Operator Security Level, one for each of the datum analyzed
above. Also add their respective Posted Items and an input field that affects
that Posted Item for each tab. Try to achieve this structure:
1. Cognex Logo
a. Input Field: Accept Threshold
b. Posted Item: Score
c. Posted Item: Score Tolerance Status
2. Connector Pins
a. Posted Item: Standard Deviation
b. Posted Item: Score Tolerance Status
3. LEDs
a. Posted Item: Blob Count
b. Posted Item: Blob Count Tolerance Status
4. Focus Ring
a. Input Field: Maximum Results
b. Posted Item: Edge Count
c. Posted Item: Edge Count Tolerance Status
5. Connector Angle
a. Posted Item: Angle
b. Posted Items: Angle Tolerance Status
6. Camera Width
a. Posted Item: Measured Width
b. Posted Item: Measured Width Tolerance Status
7. Defects
a. Posted Item: Blob Count
b. Posted Item: Blob Count Tolerance Status
v. Tab one should look like this:

vi. Select where the application files should be created.


vii. Choose your preferred language for code generation.
viii. Optionally, save the configuration so you can import it next time you use the
Application Wizard.
ix. Launch the application.

2. Run the application continuously and change the demo plate image to track the results. Make
sure that PASS images are passing and FAIL images are failing. If this is not the case, click the
configuration button and open up QuickBuild to adjust settings. Be sure to save any changes
you make to the APPLICATION file.

You might also like