Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 15 of 18

VS-06 Smart Camera, VS-06 User's Manual, pages 141 to 150

Pages 141 to 150 of 172

The original document is the PDF (3.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the di-soric VS-06

Page 141

This is the Failed inspection’s literal data:

Allen-Bradley PLC Setup via Generic

F

VS-06 Smart Camera Guide

F-21

Page 142

Appendix

F

Allen-Bradley PLC Setup via Generic Ethernet Module

This is equivalent to the AutoVision inspection report:

F-22

VS-06 Smart Camera Guide

Page 143

Parameterize the Camera Again

VS-06 Smart Camera Guide

F-23

F Allen-Bradley PLC Setup via Generic

The Measure and Count Blob tools can be parameterized by the PLC so they always pass. The Decode tool can be parameterized so it always fails, either due to no decode, or a matchcode mismatch. Scroll the tag window so OUT.long, float and string are visible, then change them as shown here:

Page 144

Appendix

F

Allen-Bradley PLC Setup via Generic Ethernet Module

Trigger the Camera Again Trigger the camera twice, and you will see the Status results stay the same for all triggers: bool2 (decode+matchcode status) = 0 Why: Decode+Matchcode status always fails because the matchcode has been changed to “wrong code”, or there is no decode. bool1 (Measure status) and bool3 (count blob status) = 1 Why: The inspected values are now in tolerance. InspStat = 0 Why: The Decode tool fails, so the overall Inspection result is a Fail. PLC tags:

This concludes the EtherNet/IP demo.

F-24

VS-06 Smart Camera Guide

Page 145

G APPENDIX G

Demo PLC Code

G Demo PLC Code

This section describes how to use di-soric demo PLC code with a vision job and camera target. The EIP demo files can be found where AutoVision is installed, in the folder C:\di-soric\Vscape\Tutorials and Samples\VS-06\EIP demo. Open the EIP_demo.avp with AutoVision and download it to the camera. During PLC integration, import the 32-000003-lx.L5X file to create the camera’s demo tags and ladder logic.

VS-06 Smart Camera Guide

G-1

Page 146

Appendix

G

Demo PLC Code

Glossary of Terms The following terms are used in the description of di-soric demo PLC program.

Camera The di-soric Smart Camera used in this application, which has an EtherNet/IP communication interface.

User App The PLC logic code written by the end user or system integrator.

Demo Code The PLC logic code distributed by di-soric that can be imported into the PLC’s ladder logic area. It encapsulates most of the device Control and Status management. The demo code expects a demo vision job loaded on the camera. However, the demo code will operate whether or not the demo vision job is loaded on the camera.

Activate / Set High Writing a 1 value to a single Control bit, or any other bool bit.

Active A Control, Status, bool, or PLC logic “contact” in a 1 state.

Clear A Control, Status, bool, or PLC logic “contact” in a 0 state.

One Shot PLC tag write operation that is performed once, typically in reaction to an event. After a one shot operation, the PLC logic does not write to the same tag again unless another event occurs.

G-2

VS-06 Smart Camera Guide

Page 147

Demo Setup

The EIP demo files can be found where AutoVision is installed, where the default folder is C:\di-soric\Vscape\Tutorials and Samples\VS-06\EIP demo. 1.

Open EIP_demo.avp with AutoVision.

2.

To use pre-defined images, select the camera icon on the Camera tool.

3.

Browse to the EIP demo folder, select it, and click OK.

VS-06 Smart Camera Guide

G-3

Demo PLC Code

G

Vision Job Setup

Page 148

Appendix

G

Demo PLC Code

After the EIP demo folder has been enabled for image load, the camera icon will change to a folder:

4.

While in Edit mode, Try Out can be used to get an understanding of what to expect after the job is sent to the camera.

Before Try Out can be effective, the Measure, Decode, and Count Tool parameters must be specified. After job download, the tool parameters will be supplied by the PLC. Measure Tolerance:

Decode Matchstring:

Count Tolerance:

With these tool parameter configured as shown, Try Out will show the following Pass/Fail results.

G-4

VS-06 Smart Camera Guide

Page 149

Fail:

Demo PLC Code

G

Pass:

5.

Download the job to the camera.

6.

Add the camera and demo code to the PLC environment (see the next section).

PLC Demo Code Setup During PLC integration, import the 32-000003-lx.L5X file, found in the EIP demo folder, to create the camera’s demo tags and ladder logic. Please refer to Allen-Bradley PLC Setup.

Description of PLC Tags Read_MV_demo_mode Purpose This is intended for demonstration purposes only, to modify the operation of the demo code. It allows the first-time user to control the device directly

VS-06 Smart Camera Guide

G-5

Page 150

Appendix

G

Demo PLC Code with no assistance from the demo code, or allow the demo code to manage the Control and Status signals fully. The demo mode tag takes three different values, putting the demo code into one of three modes of operation: •

Exchange IO data only

•

Actively operate device controls, status, and demo data

•

Automatically trigger the device after one second of idle time

User App Method User app can set the demo mode with one of three values to define the demo code’s mode of operation. 0=Exchange IO data only In this mode, the user directly accesses the Read_MV_IO_internal tag set. The demo code only exchanges data with the camera, doing nothing to control the device or respond to events from it. 1=Operate device controls and respond to device events This is the default mode of the demo code. In this mode, the user app accesses the Read_MV_IO_user tag to control and monitor the camera. The user app must not access the Read_MV_IO_internal tag set. In this mode, the user activates the controls in Read_MV_IO_user.OUT.Control (Trigger, ResetCount, GoOnline, GoOffline, ResetError, ExeCmd), and the demo code handles the rest. 2=Auto-trigger In this mode, the demo code fully manages the Control and Status signals, the same as when the mode is set to 1. It also activates the camera’s trigger after one second of idle time. The timer used to drive the trigger is Read_MV_trigger_delay_timer. Demo Code Usage Depending on the mode, the demo code will run the appropriate level of code. •

G-6

In mode 0, only the IO exchange rungs are executed. All others are bypassed (ladder jmp).

VS-06 Smart Camera Guide