Contents

Mitsubishi VS20M-11F310 Sensor Connection Guide PDF

1 of 144
1 of 144

Summary of Content for Mitsubishi VS20M-11F310 Sensor Connection Guide PDF

Vision Sensor Connection Guide

-VS20M-11F310 -VS80M-100-E -VS20M-12F410 -VS80M-100 -VS20M-13F410 -VS80M-200-E -VS20C-12F410 -VS80M-200-ER -VS20C-13F410 -VS80M-200 -VS70M-600-E -VS80M-200-R -VS70M-600-ER -VS80M-400-E -VS70M-600 -VS80M-400-ER -VS70M-600-R -VS80M-400 -VS70M-800-E -VS80M-400-R -VS70M-800-ER -VS80M-202-E -VS70M-800 -VS80M-202-ER -VS70M-800-R -VS80M-202 -VS70M-802-E -VS80M-202-R -VS70M-802-ER -VS80M-402-E -VS70M-802 -VS80M-402-ER -VS70M-802-R -VS80M-402 -VS70C-600-R -VS80M-402-R -VS70C-800-R -VS80C-100 -VS70C-802-R -VS80C-200-R

-VS80C-400-R -VS80C-202-R -VS80C-402-R

This product is designed and manufactured by Cognex Corporation. *Note that the warranty and general specifications of this product differ from that of programmable controller products.

SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The precautions given in this manual are concerned with this product only. For the safety precautions for other modules, refer to their respective user's manuals. In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".

Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious consequences. Observe the precautions of both levels because they are important for personal and system safety. Make sure that the end users read this manual and then keep the manual in a safe place for future reference.

[Installation Precautions]

[Security Precautions]

[Installation Precautions]

WARNING Before handling the product, touch a conducting object such as a grounded metal to discharge the

static electricity from your body. Failure to do so may cause the vision sensor to fail or malfunction. Be sure to install an I/O connector module to a main module. If not installed, dust or water-proof

performance may not be obtained.

WARNING To maintain the security (confidentiality, integrity, and availability) of the programmable controller and

the system against unauthorized access, denial-of-service (DoS) attacks, computer viruses, and other cyberattacks from external devices via the network, take appropriate measures such as firewalls, virtual private networks (VPNs), and antivirus solutions.

CAUTION IP protection rating is guaranteed only when all the connectors are connected with cables or sealed

with sealing caps. The cable is designed to connect with its key aligned with the keyway of the connector on the Vision

Sensor. Do not force the connections or damage may occur.

WARNING Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.

CAUTION Indicates that incorrect handling may cause hazardous conditions, resulting in minor or moderate injury or property damage.

1

2

[Wiring Precautions]

[Startup and Maintenance Precautions]

[Disposal Precautions]

CAUTION Use only 24 VDC and observe the indicated polarity. Otherwise, fire or damage may result. The frame ground terminal of the I/O module and the shield ground of each connector (RS232 OUT

port and SENSOR port) are internally conducting. The system ground is designed on the condition that a ground connection is provided. The ground potential may affect the vision sensor and peripheral devices such as programmable controllers via cables. For safe operation, it is recommended to connect all the ground connections securely.

CAUTION Do not clean the Vision Sensor with highly irritating or corrosive solvent such as caustic alkali solution,

methyl ethyl ketone (MEK), and gasoline. Doing so may cause a fault.

CAUTION When disposing of this product, treat it as industrial waste.

CONDITIONS OF USE FOR THE PRODUCT (1)This vision sensor shall be used in conditions;

i) where any problem, fault or failure occurring in the vision sensor, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the vision sensor for the case of any problem, fault or failure occurring in the vision sensor.

(2)This vision sensor has been designed and manufactured for the purpose of being used in general industries. MITSUBISHI ELECTRIC SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY THIS VISION SENSOR THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR WARNING CONTAINED IN MITSUBISHI ELECTRIC USER'S, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL BULLETINS AND GUIDELINES FOR the VISION SENSOR. ("Prohibited Application") Prohibited Applications include, but not limited to, the use of the vision sensor in; Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the public could be affected if any problem or fault occurs in the vision sensor. Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User. Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator, Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other applications where there is a significant risk of injury to the public or property.

Notwithstanding the above restrictions, Mitsubishi Electric may in its sole discretion, authorize use of the vision sensor in one or more of the Prohibited Applications, provided that the usage of the vision sensor is limited only for the specific applications agreed to by Mitsubishi Electric and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the vision sensors are required. For details, please contact the Mitsubishi Electric representative in your region.

(3)Mitsubishi Electric shall have no responsibility or liability for any problems involving programmable controller trouble and system trouble caused by DoS attacks, unauthorized access, computer viruses, and other cyberattacks.

3

4

INTRODUCTION Thank you for purchasing the Mitsubishi Electric FA sensor, MELSENSOR. This manual describes the network connections to use the vision sensors listed below. Before using the product, please read this manual and relevant manuals carefully, and develop familiarity with the functions and performance of the MELSENSOR vision sensor to handle the product correctly. Please make sure that the end users read this manual.

Available vision sensors

INSTALLATION To connect a vision sensor, the following must be installed on a networked personal computer.

In-Sight Explorer Download In-Sight Explorer from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Engineering tool Install any of the following engineering software, depending on the programmable controller system used. GX Works3 GX Works2

Profile To configure communication between a programmable controller and a vision sensor with an engineering tool, a profile of the vision sensor needs to be registered to the engineering tool. A profile is data that stores information of a connected device (such as a model name.) By registering the profile to an engineering tool, vision sensors are added to "Module List" in the "Ethernet Configuration" window and the "CC-Link IEF Basic Configuration" window. For details on how to register a profile, refer to the following manual. GX Works2 Version 1 Operating Manual (Common) GX Works3 Operating Manual Download the profile of a vision sensor from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

EtherNet/IP Configuration Tool for RJ71EIP91 For the EtherNet/IP connection, network settings are required by using EtherNet/IP Configuration Tool for RJ71EIP91. Download EtherNet/IP Configuration Tool for RJ71EIP91 from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

EDS file To configure communication between an RJ71EIP91 or FX5-ENET/IP and a vision sensor with EtherNet/IP Configuration Tool, registering an EDS file to EtherNet/IP Configuration Tool is required. An EDS file is data that stores information of a connected device (such as a model name). For details on how to register an EDS file, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module User's Manual (Application) MELSEC iQ-F FX5-ENET/IP User's Manual The EDS file for a vision sensor can be downloaded from the Mitsubishi Electric FA website.

Product name

Model

VS20 VS20M-11F310, VS20M-12F410, VS20M-13F410, VS20C-12F410, VS20C-13F410

VS70 VS70M-600-E, VS70M-600-ER, VS70M-600, VS70M-600-R, VS70M-800-E, VS70M-800-ER, VS70M-800, VS70M-800-R, VS70M-802-E, VS70M-802-ER, VS70M-802, VS70M-802-R, VS70C-600-R, VS70C-800-R, VS70C-802-R

VS80 VS80M-100-E, VS80M-100, VS80M-200-E, VS80M-200-ER, VS80M-200, VS80M-200-R, VS80M-400-E, VS80M-400-ER, VS80M-400, VS80M- 400-R, VS80M-202-E, VS80M-202-ER, VS80M-202, VS80M-202-R, VS80M-402-E, VS80M-402-ER, VS80M-402, VS80M-402-R, VS80C-100, VS80C-200-R, VS80C-400-R, VS80C-202-R, VS80C-402-R

www.MitsubishiElectric.co.jp/fa

5

6

CONTENTS SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

CHAPTER 1 CC-Link IE Field Network Basic CONNECTION 10 1.1 System Configuration Example for Connecting a Vision Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Connection and wiring of a vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.2 Basic Operations for a CC-Link IE Field Network Basic Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Basic operation process for a CC-Link IE Field Network Basic connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Signals used for a CC-Link IE Field Network Basic connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.3 Setting the Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Registering a profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

1.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

CHAPTER 2 SLMP SCANNER CONNECTION 37 2.1 System Configuration Example for Connecting a Vision Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Connection and wiring of a vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.2 Basic Operations for an SLMP Scanner Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Basic operation process for an SLMP scanner connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Basic operations for an SLMP scanner connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Signals used for an SLMP scanner connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

2.3 Setting the Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Registering a profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

2.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 2.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Controlling the vision sensor by using native mode commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

CHAPTER 3 I/O CONNECTION 71 3.1 System Configuration Example for Connecting a Vision Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Connection and wiring of a vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

3.2 Setting the Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.3 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

3.4 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 3.5 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

C O

N TE

N TS

3.6 Using CIO-MICRO I/O module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

CHAPTER 4 EtherNet/IP CONNECTION 92 4.1 System Configuration Example for Connecting a Vision Sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Connection and wiring of a vision sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4.2 Basic Operations for an EtherNet/IP Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Basic operation process for cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Input/Output Assemblies used for cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Basic operation process for message (Explicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

4.3 Setting the Vision Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Writing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Configuring communication settings in EtherNet/IP Configuration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

4.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 4.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Checking operations of cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Checking operations of message (Explicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139

7

8

RELEVANT MANUALS

e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated tool. e-Manual has the following features: Required information can be cross-searched in multiple manuals. Other manuals can be accessed from the links in the manual. Hardware specifications of each part can be found from the product figures. Pages that users often browse can be bookmarked. Sample programs can be copied to an engineering tool.

Manual name [manual number] Description Available form Vision Sensor Connection Guide [BCN-P5999-0861](this manual)

Procedures for connecting a vision sensor to a MELSEC programmable controller to control a vision system through a CC-Link IE Field Network Basic connection, an SLMP connection, an I/O connection, or an EtherNet/IP connection

e-Manual PDF

Vision Sensor VS20 User's Manual [SH-081769ENG]

Functions, installation methods, system configuration, and required hardware components, etc. of the vision sensor VS20

Print book

e-Manual PDF

Vision Sensor VS70 User's Manual [SH-081889ENG]

Functions, installation methods, system configuration, and required hardware components, etc. of the vision sensor VS70

Print book

e-Manual PDF

Vision Sensor VS80 User's Manual [SH-081891ENG]

Functions, installation methods, system configuration, and required hardware components, etc. of the vision sensor VS80

Print book

e-Manual PDF

TERMS Unless otherwise specified, this manual uses the following terms.

Term Description Buffer memory Memory in an intelligent function module to store data such as setting values and monitor values.

For CPU modules, it refers to memory to store data such as setting values and monitor values of the Ethernet function, or data used for data communication of the multiple CPU system function.

CC-Link IE Field Network Basic A factory automation network using standard Ethernet. Data is periodically exchanged between a master station and slave stations using link devices (cyclic transmission).

Cyclic transmission A function by which data are periodically exchanged among stations on the same network

Discrete online Online status set to a vision sensor by a user interface

EDS file Data that stores information of an EtherNet/IP connection device (such as a model name)

Engineering tool GX Works3. A tool used for setting up programmable controllers, programming, debugging, and maintenance.

EtherNet/IP An industrial network protocol that adapts CIP (Common Industrial Protocol) to standard Ethernet

EtherNet/IP Configuration Tool EtherNet/IP Configuration Tool for RJ71EIP91. A tool for setting the EtherNet/IP network configuration.

GX Works2 A generic product name for SWnDND-GXW2 and SWnDNC-GXW2. ('n' indicates its version.) GX Works2 corresponding to MELSOFT Navigator is the product later than GX Works2 Version 1.11M.

GX Works3 A generic product name for SWnDND-GXW3 ('n' indicates its version.)

Job A file created with the vision sensor setup tool to control a vision sensor. The file extension is 'Job.' (*.Job)

Job ID A number used to identify the job. The number is added to the front of a file name.

Module label A label that represents one of memory areas (I/O signals and buffer memory areas) specific to each module in a given character string. For the module used, GX Works3 automatically generates this label, which can be used as a global label.

Native mode command A command to control a vision sensor

Poll interval An interval to periodically send a read request to external devices (such as programmable controllers, robot controllers)

Profile Data that stores information of a connected device (such as a model name)

Refresh Processing to transfer data between link devices in a network module and devices in a CPU module

Remote I/O (RX/RY) RX: Bit data input from a slave station to the master station. RY: Bit data output from the master station to a slave station.

Remote register (RW/RWw) RWr: Word data input from a slave station to the master station. RWw: Word data output from the master station to a slave station.

Rotation tolerance A parameter for specifying the angle of detected pattern rotating

RPI An abbreviation for Requested Packet Interval. A communication cycle that is decided by the originator during communications between EtherNet/IP devices.

SLMP An abbreviation for SeamLess Message Protocol. The protocol to access the programmable controller connected from the external device to the SLMP corresponding device, or connected to the SLMP corresponding device.

SLMP scanner A function to periodically read from and write to external devices (such as programmable controllers, robot controllers) by using the SLMP protocol

Soft event A function to assign an operation set in a spreadsheet as an event, and to trigger a specific operation of a job by using an execution bit of SoftEvent

Spreadsheet A programming interface of In-Sight Explorer for programming by using image processing functions and control functions

Vision sensor setup tool In-Sight Explorer. A tool for setting a vision sensor.

Vision sensor VS20 A generic term for VS20M-11F310, VS20M-12F410, VS20M-13F410, VS20C-12F410, and VS20C- 13F410

Vision sensor VS70 A generic term for VS70M-600-E, VS70M-600-ER, VS70M-600, VS70M-600-R, VS70M-800-E, VS70M-800-ER, VS70M-800, VS70M-800-R, VS70M-802-E, VS70M-802-ER, VS70M-802, VS70M- 802-R, VS70C-600-R, VS70C-800-R, and VS70C-802-R

Vision sensor VS80 A generic term for VS80M-100-E, VS80M-100, VS80M-200-E, VS80M-200-ER, VS80M-200, VS80M- 200-R, VS80M-400-E, VS80M-400-ER, VS80M-400, VS80M-400-R, VS80M-202-E, VS80M-202-ER, VS80M-202, VS80M-202-R, VS80M-402-E, VS80M-402-ER, VS80M-402, VS80M-402-R, VS80C-100, VS80C-200-R, VS80C-400-R, VS80C-202-R, and VS80C-402-R

9

10

1 CC-Link IE Field Network Basic CONNECTION This chapter explains the procedure for connecting a vision sensor VS20 to a programmable controller and controlling the vision sensor with CC-Link IE Field Network Basic connection. For details on CC-Link IE Field Network Basic, refer to the following manual. CC-Link IE Field Network Basic Reference Manual

1.1 System Configuration Example for Connecting a Vision Sensor

The following figure shows the system configuration for connecting a vision sensor VS20.

CC-Link IE Field Network Basic connection is available for other vision sensors (VS70 and VS80). For details on the system configuration, refer to the user's manual of the vision sensor used.

USB cable Programmable controller

Ethernet cable

Ethernet cable

Ethernet cable (COGNEX product)

Breakout cable (COGNEX product)

Vision sensor

100 V power supply

Switching hub

24 VDC power supply

Engineering tool Vision sensor profile for engineering tool Vision sensor setup tool

1 CC-Link IE Field Network Basic CONNECTION 1.1 System Configuration Example for Connecting a Vision Sensor

1

Configurations The devices used in the system configuration are as follows.

Required equipment Mitsubishi Electric products

COGNEX products

*1 Download this product from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Commercial products

For available devices for the system configuration, refer to the user's manual of the vision sensor used.

Vision sensor VS20M-13F410

Programmable controller Power supply: R62P CPU module: R08CPU Base: R35B

Engineering tool GX Works3

Vision sensor profile for engineering tool*1

Vision sensor setup tool In-Sight Explorer

Ethernet cable Breakout cable

Switching hub Ethernet cable USB cable (Type Mini-B) 24 VDC power supply

1 CC-Link IE Field Network Basic CONNECTION 1.1 System Configuration Example for Connecting a Vision Sensor 11

12

Connection and wiring of a vision sensor This section shows the procedure for connecting and wiring a vision sensor.

Operating procedure 1. Check that the 24 VDC power supply is OFF.

2. Connect an I/O wire or a serial wire of a breakout cable to an appropriate device (such as a programmable controller).

3. Connect the 24 VDC (red wire) and GND (black wire) of a breakout cable to the corresponding terminals on the power supply.

4. Connect the M12 connector of the breakout cable to the Power, I/O and RS-232 connector of the vision sensor.

5. Connect the Ethernet cable's M12 connector to the vision sensor's Ethernet connector.

6. Turn ON the 24 VDC power supply.

Precautions When connecting a vision sensor and a programmable controller, simultaneously turn ON the power of the vision sensor

and programmable controller, or first turn ON the power of the programmable controller. Cut unused wires or protect them with insulating materials. Be careful not to short-circuit with 24 VDC wires. The cable is designed to connect with its key aligned with the keyway of the connector on the Vision Sensor. Do not force

the connections or damage may occur.

For details on the connection with a vision sensor, refer to the user's manual of the vision sensor used.

1 CC-Link IE Field Network Basic CONNECTION 1.1 System Configuration Example for Connecting a Vision Sensor

1

1.2 Basic Operations for a CC-Link IE Field Network

Basic Connection Basic operation process for a CC-Link IE Field Network Basic connection With a CC-Link IE Field Network Basic connection, data communication (cyclic transmission) is periodically performed between a master station (programmable controller) and a slave station (vision sensor) using link devices. Remote input and output (RY and RX), and remote registers (RWr and RWw) are used for data communication. Status block (RX) and output data block (RWr) are link devices to send data from a vision sensor to a master station (programmable controller). Control block (RY) and input data block (RWw) are link devices to send data from a master station (programmable controller) to a vision sensor.

RX, RWr

RY, RWw

RX, RWr

RY, RWw

Device

Device

Link refresh

Link refresh

Link scan

Output data block

Status block

Control block

Input data block

1 CC-Link IE Field Network Basic CONNECTION 1.2 Basic Operations for a CC-Link IE Field Network Basic Connection 13

14

Signals used for a CC-Link IE Field Network Basic connection The following shows the I/O signals for a master station (programmable controller) in a CC-Link IE Field Network Basic connection. For details on each data, refer to the help of vision sensor setup tool.

Precautions Do not write data to '(Reserved)' bits in remote I/O signals (RX/RY). Doing so may cause an unexpected error.

Remote I/O signals (RX/RY) Control blocks (RY) Control blocks (RY) are output signals for a master station (programmable controller) to control a vision sensor. Control block list

Control block details

RY7 RY6 RY5 RY4 RY3 RY2 RY1 RY0 Set Offline (Reserved) Execute

Command Inspection Results Ack

Buffer Results Enable

Trigger Trigger Enable

RYF RYE RYD RYC RYB RYA RY9 RY8 (Reserved)

RY17 RY16 RY15 RY14 RY13 RY12 RY11 RY10 (Reserved) Clear Exposure

Complete Clear Error (Reserved) Set User Data

RY1F RY1E RY1D RY1C RY1B RY1A RY19 RY18 Soft Event 7 Soft Event 6 Soft Event 5 Soft Event 4 Soft Event 3 Soft Event 2 Soft Event 1 Soft Event 0

RY20..RY3F User Data (Bit Area)

Bit Data name Description (Application) 0 Trigger Enable To enable an image capturing trigger by 'Trigger.'

ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

1 Trigger To start (trigger) image capturing. ON: Image capturing is started. OFF:

The following conditions must be satisfied to start image capturing properly: "Industrial Ethernet" is selected in the [Set Up Image] [Trigger] tab in the vision sensor

setup tool. (Page 20 Creating a new job) The vision sensor is online. 'Trigger Enable' and 'Trigger Ready' are turned ON.

2 Buffer Results Enable To enable the buffer for read results. New read results are stored in the buffer queue of a vision sensor. To acquire the next read results, turn ON 'Inspection Results Ack'. ON: The buffer for read results is enabled. OFF: The buffer for read results is disabled.

3 Inspection Results Ack To respond to receiving the latest read results. A vision sensor turns 'Results Valid' OFF when recognizing that this bit turns ON. If 'Buffer Results Enable' is turned ON, the next read results are read out from the buffer queue when receiving a response. ON: Read results are received. OFF:

4 Execute Command To load a job of the job ID specified to 'Command.' ON: Job load is executed. OFF:

Until 'Command Completed' is turned ON, the ON state for this bit must be retained. The following conditions must be satisfied to start job load properly: A vision sensor is set to offline by 'Set Offline.' A job of the job ID specified to 'Command' exists.

5 to 6 (Reserved)

1 CC-Link IE Field Network Basic CONNECTION 1.2 Basic Operations for a CC-Link IE Field Network Basic Connection

1

Status blocks (RX) Status blocks (RX) are input signals for a master station (programmable controller) to acquire the status of a vision sensor (status). Status block list

Status block details

7 Set Offline To make a vision sensor offline while this bit is ON. ON: A vision sensor is set to offline. OFF:

8 to 15 (Reserved)

16 Set User Data To notify a vision sensor that the 'User Data' field was updated. ON: 'User Data' field update is notified. OFF:

A vision sensor updates data defined in the [Format Input Data] tab of a communication setting with the vision sensor setup tool when this bit is turned ON. The timing of contents in the 'User Data' field to be applied depends on whether "Enable User Data Bypass" is selected or not; that can be selected from [Sensor] [Network Settings] "Industrial Ethernet Protocols" "CC-Link IE Field Basic" the [Settings] button "Enable User Data Bypass." Selected: Applied when 'Set User Data' is turned ON Unselected: Applied when 'Set User Data' is turned ON and a trigger is input

17 (Reserved)

18 Clear Error To clear an error and error code signal. When multiple errors occur, the next error and error code are set by turning this bit OFF. ON: Error clear is executed. OFF:

19 Clear Exposure Complete To turn 'Exposure Complete' OFF. 'Exposure Complete' does not turn ON while this bit is ON. ON: Exposure completion is cleared. OFF:

20 to 23 (Reserved)

24 to 31 Soft Event To enable a soft event trigger in a spreadsheet. A related software event in a spreadsheet is executed by turning this bit ON.

32 to 63 (Reserved)

RX7 RX6 RX5 RX4 RX3 RX2 RX1 RX0 Online Offline Reason Missed Acq (Reserved) Trigger Ack Trigger Ready

RXF RXE RXD RXC RXB RXA RX9 RX8 Error Command Failed Command

Completed Command Executing

Results Valid Results Buffer Overrun

Inspection Completed

System Busy

RX17 RX16 RX15 RX14 RX13 RX12 RX11 RX10 (Reserved) Job Pass Exposure

Complete (Reserved) (Reserved) Set User Data

Ack

RX1F RX1E RX1D RX1C RX1B RX1A RX19 RX18 Soft Event Ack 7 Soft Event Ack 6 Soft Event Ack 5 Soft Event Ack 4 Soft Event Ack 3 Soft Event Ack 2 Soft Event Ack 1 Soft Event Ack 0

RX20..RX3F Inspection Results (Bit Area)

Bit Data name Description (Application) 0 Trigger Ready This bit turns ON when 'Trigger Enable' is set and an image capturing trigger can be received.

ON: An image capturing trigger can be received. OFF: An image capturing trigger cannot be received.

1 Trigger Ack This bit shows that a vision sensor recognizes 'Trigger' is ON, and an image capturing trigger is received. Until 'Trigger' is turned OFF, the ON state for this bit is retained. ON: An image capturing trigger is received. OFF:

2 (Reserved)

Bit Data name Description (Application)

1 CC-Link IE Field Network Basic CONNECTION 1.2 Basic Operations for a CC-Link IE Field Network Basic Connection 15

16

Remote registers (RWr and RWw) Output data blocks (RWr)

3 Missed Acq This bit shows that image capturing is failed. This bit is turned OFF if the next image capturing is succeeded. ON: Image capturing is failed. OFF:

4 to 6 Offline Reason This bit shows the cause of a vision sensor being offline by three bits. 0: Online 1: Job is being edited. 2: Offline is set by a discrete signal. 3: Offline is set by a predefined protocol.

7 Online This bit shows the online/offline status. When a vision sensor is offline, the reason is shown in the 'Offline Reason' field. ON: Online OFF: Offline

8 System Busy This bit shows that a vision sensor is executing or loading a job, or responding to user inputs. ON: System busy OFF:

9 Inspection Completed This bit is inverted every time when an inspection is completed and a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is sent to a programmable controller.

10 Results Buffer Overrun This bit shows that a vision sensor discards a series of read results after the buffer for read results becomes full. When the next read results are stored in the buffer queue properly, this bit is turned OFF. Only when 'Buffer Results Enable' is enabled, this bit is enabled. ON: Read results are discarded. OFF:

11 Results Valid This bit shows that a series of inspection results is available ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass' fields contain valid data). Until 'Inspection Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

12 Command Executing This bit shows that job load is executed. ON: Job load is being executed. OFF:

13 Command Completed This bit is turned ON when job load is completed. When a job load command is not completed properly, 'Command Failed' is also turned ON. ON: Job load is completed. OFF:

14 Command Failed This bit is turned ON when job load is not completed properly. It is turned OFF when a new job is loaded by a programmable controller. When changing a job by using the vision sensor setup tool, this bit is not changed. ON: Job load is failed. OFF:

15 Error This bit is turned ON when an error occurred. ON: Error occurred. OFF:

16 Set User Data Ack This bit is turned ON when 'Set User Data' command execution is completed. ON: 'Set User Data' command execution is completed. OFF:

17 to 18 (Reserved)

19 Exposure Complete This bit is turned ON when an exposure for a vision sensor is completed. It is turned OFF by 'Clear Exposure Complete.' When 'Clear Exposure Complete' is set to ON, the OFF state of this bit is retained. ON: Exposure is completed. OFF:

20 Job Pass This bit is turned ON when the latest job is passed. It is turned OFF when a job is failed. ON: Inspection result is passed. OFF:

21 to 23 (Reserved)

24 to 31 Soft Event Ack This bit shows that a vision sensor received a soft event command.

32 to 63 (Reserved)

Bit Data name Description (Application)

1 CC-Link IE Field Network Basic CONNECTION 1.2 Basic Operations for a CC-Link IE Field Network Basic Connection

1

Output data blocks (RWr) are link devices to send data from a vision sensor to a master station (programmable controller). Output data block list

Output data block details

Input data blocks (RWw) Input data blocks (RWw) are link devices for a vision sensor to receive data from a master station (programmable controller). Input data block list

Input data block details

For details on each data to control a vision sensor, refer to the help of vision sensor setup tool. Enter "CC-Link IE Field Network Basic" as a keyword in the [Search] tab of Help, and refer to the explanation of the data.

RWr0 RWr1 RWr2 RWr3 RWr4 RWr5.. Current Job ID Error Code Acquisition ID Inspection ID Inspection Result Code Inspection Results

Word Data name Description (Application) 0 Current Job ID Job ID of a job being executed is stored.

If no job ID is specified for the job, '65535 (0xFFFF)' is stored.

1 Error Code This shows an error occurred in 16-bit integer. 0x0000: No error 0x0100: An image capturing trigger is generated when the image capturing trigger is disabled. 0x0101: An image capturing trigger is generated when a vision sensor is offline. 0x0400: Another command execution command is generated when a command is being

executed. 0x0401: Job load is requested when a vision sensor is online.

2 Acquisition ID Image capturing ID associated with the image capturing is stored. This can be used to synchronize image capturing and inspection results.

3 Inspection ID Inspection ID associated with a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is stored.

4 Inspection Result Code Any inspection result code specified for "Result code" of the WriteResultsBuffer function in the vision sensor setup tool (spreadsheet) is stored.

5 or later Inspection Results The data defined in the [Format Output Data] tab of a communication setting with the vision sensor setup tool is stored.

RWw0 RWw1.. Command User Data

Word Data name Description (Application) 0 Command To specify job IDs (0 to 999).

1 or later User Data Data buffer to transfer data from a programmable controller to a vision sensor. This can be used for the following application: To update the data defined in the [Format Input Data] tab of a communication setting with the vision sensor setup tool: Store data to be updated in the data format defined in the [Format Input Data] tab.

1 CC-Link IE Field Network Basic CONNECTION 1.2 Basic Operations for a CC-Link IE Field Network Basic Connection 17

18

1.3 Setting the Vision Sensor Start the vision sensor setup tool to set the vision sensor.

Setting an IP address to a personal computer Set the IP address (192.168.3.3) to a personal computer.

Connecting the vision sensor Start the vision sensor setup tool to set the vision sensor. 1. Start the vision sensor setup tool.

Click the [Add] button.

2. Add the vision sensor to the network. Add the vision sensor to the network. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor

1

3. Connect to the vision sensor. Click the [Connect] button to connect to the vision sensor.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor 19

20

Creating a new job As an example, set a CE mark for inspection target. 1. Create a new job.

Click the [New Job] button.

2. Adjust so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Click the [Set Up Image] button. Select the [Trigger] tab. Select "Industrial Ethernet". Click the [Live Video] button to adjust the image. After adjusting the image, click the [Live Video] button again.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor

1

3. Set a tool. Click the [Locate Part] button. Select "Pattern". Click the [Add] button.

4. Set a model on the position to be detected. Set a model. (CE mark is selected.) Click the [OK] button. Check that Name is "Pattern_1".

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor 21

22

Configuring a communication setting 1. Configure the communication setting (CC-Link IE Field Network Basic).

Click the [Communication] button. Click the [Add Device] button.

2. Add the CC-Link IE Field Network Basic. Configure a device setting. Device: PLC/Motion Controller Manufacturer: Mitsubishi Protocol: CC-Link IE Field Basic Click the [OK] button. When the message "Protocol Service Change Required" appears, click the [OK] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor

1

3. Add the data to be transmitted in the cyclic transmission of the CC-Link IE Field Network Basic. Select the [Format Output Word Data] tab. Click the [Add] button. Select the data to add in the following order. Pattern_1.Pass Pattern_1.Fail Job.Inspection_Count Click the [OK] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor 23

24

Saving the job

The running job can be changed (loaded) to another job by prefixing a numeric value to a file name. For the procedure to change jobs, refer to the following section. Page 36 Changing jobs (loading another job)

1. Name the created job. Click the [Save Job] button. Click the [Save As] button.

2. Enter a file name and save the job. Enter an arbitrary file name. Click the [Save] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor

1

Restarting the vision sensor Turn the power of the vision sensor OFF and ON to restart.

3. Set startup options for the vision sensor. Click the [...] button under "Job". Select the checkbox of "Load Job on Startup". Select the file name saved in step 2. Select the checkbox of "Start the Sensor in Online Mode". Click the [OK] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Vision Sensor 25

26

1.4 Setting a Programmable Controller Set parameters of a programmable controller in an engineering tool.

Registering a profile Register a profile of the vision sensor in an engineering tool.

Profiles need to be registered when an engineering tool project is closed.

1. Start an engineering tool. 2. Resister a profile.

Select [Tool] [Profile Management] [Register]. Select the profile obtained previously. Click the [Register] button.

1 CC-Link IE Field Network Basic CONNECTION 1.4 Setting a Programmable Controller

1

Setting a programmable controller Set parameters of a programmable controller. 1. Select a CPU module and a program language in the "New" screen.

Select [Project] [New]. The "New" screen appears. Set a CPU module and a program language. Series: RCPU Type: R08 Program Language: Ladder Click the [OK] button. Click the [OK] button.

2. Set the module parameter. Double-click "Module Parameter" in the "Navigation" window. The "R08CPU Module Parameter" screen appears. Set "IP Address" and "To Use or Not to Use CC-Link IEF Basic Setting." IP Address: 192.168.3.2 To Use or Not to Use CC-Link IEF

Basic Setting: Use Double-click the " " of "Network Configuration Settings." The "CC-Link IEF Basic Configuration" screen appears. (Page 28 "CC- Link IEF Basic Configuration" screen) Double-click the " " of "Refresh Settings." The screen to set the device of the refresh target appears. (Page 28 Refresh settings) Click the [Apply] button to end the parameter settings.

1 CC-Link IE Field Network Basic CONNECTION 1.4 Setting a Programmable Controller 27

28

"CC-Link IEF Basic Configuration" screen Detect the connected vision sensor. Make sure to turn ON the power of the programmable controller in advance.

For the system configuration in which the automatic detection function of connected devices is not supported, a vision sensor can be added by dragging and dropping a corresponding device in "Vision Sensor" from "CC- Link IEF Basic Module (Mitsubishi Electric Corporation)" in "Module List." The parameter settings are as follows: "RX/RY Setting" - "Points": 64 (1 Occupied Station) "IP Address": 192.168.3.1 (IP address of a vision sensor set in the vision sensor setup tool)

Refresh settings

Click the [Detect Now] button. Read the displayed message, and click

the [Yes] button. Check that the connected vision sensor

is displayed. Select [Close with Reflecting the Setting]. For details on the automatic detection function of connected devices, refer to the following: iQ Sensor Solution Reference Manual

Set "Target," "Device Name," and "Start" on the "CPU Side." Click the [Apply] button to end the parameter settings.

Link side CPU side

Device name Target Device name Points Start End RX Specify Device X 64 01000 0103F

RY Specify Device Y 64 01000 0103F

RWr Specify Device W 32 00000 0001F

RWw Specify Device W 32 01000 0101F

1 CC-Link IE Field Network Basic CONNECTION 1.4 Setting a Programmable Controller

1

Creating a program Create a program using the devices set in the refresh settings.

Devices used in the program

Program example

Precautions Use 'Trigger Ack' (X1001) to set an interlock when checking 'Inspection Completed' (X1009).

Signal Signal name Description Remarks SM1536 Cyclic transmission status This signal turns ON when the cyclic transmission starts. CC-Link IE Field Network Basic

Reference ManualSD1536.0 Cyclic transmission status for each station (station No.1)

The cyclic transmission status for each station is stored. The status of the station No.1 is stored to bit 0.

X1000 Trigger Ready The reception status of 'Trigger Enable' (Y1000) is stored. ON: Trigger is enabled. OFF: Trigger is disabled.

Refresh device for RX0

X1001 Trigger Ack The reception status of 'Trigger' (Y1001) is stored. ON: With trigger OFF: Without trigger

Refresh device for RX1

X1007 Online The online status of a vision sensor is stored. ON: Online OFF: Offline

Refresh device for RX7

X1009 Inspection Completed This signal is changed (toggled) at the completion of an inspection of a vision sensor.

Refresh device for RX9

Y1000 Trigger Enable 'Trigger' (Y1001) is enabled while this signal is ON. Refresh device for RY0

Y1001 Trigger By turning this signal OFF and ON, an image capture is started.

Refresh device for RY1

M0 Online command 'Trigger Enable' (Y1000) turns ON to make a vision sensor online while this signal is ON.

M1 Trigger directive By turning this signal OFF and ON, 'Trigger' (Y1001) is turned ON, and an image capture is performed.

M200 Communication condition satisfied flag (station No.1)

This signal turns ON while the cyclic transmission with the station No.1 is performed.

(0): Check that the cyclic transmission is normally performed between the master station (programmable controller) and the station No.1 (vision sensor). When the cyclic transmission is normally performed, the program in line (4) and later are executed. (4): Enable a trigger on the vision sensor. (7): Request the start of the image capture to the vision sensor. ('Trigger' (Y1001) turns ON.) (12): The processing for the completion of the image capture of the vision sensor is performed.

(0) SM1536 SD1536.0

MC N0 M200

M200N0

(4) M0 X1007 Y1000

(7) M1 X1000 X1001 Y1001

SET Y1001

(12) X1001 X1009

RST Y1001

X1009 RST M1

(20) MCR N0

(21) END

1 CC-Link IE Field Network Basic CONNECTION 1.4 Setting a Programmable Controller 29

30

Timing chart of a CC-Link IE Field Network Basic connection A timing chart when controlling a vision sensor using a programmable controller is shown below. To enable a trigger from a programmable controller, turn ON 'Trigger Enable' (RY0). When 'Trigger' (RY1) is turned ON while 'Trigger Ready' (RX0) is ON by turning ON 'Trigger Enable' (RY0), the status of the vision sensor is output to 'Trigger Ack' (RX1) and 'Inspection Completed' (RX9). The status of 'Inspection Completed' (RY9) is changed (toggled) at the completion of an inspection.

RY0:Trigger Enable

RY1:Trigger

RX0:Trigger Ready

Read image processing

Inspection Processing

RX9:Inspection Completed

RX1:Trigger Ack

Turn ON/OFF with the PLC (Program).

Turn ON/OFF the vision sensor automatically.

When the inspection is completed, the ON/OFF status is inverted.

Processing Processing

Processing Processing

1 CC-Link IE Field Network Basic CONNECTION 1.4 Setting a Programmable Controller

1

1.5 Writing Data to a Programmable Controller Write the parameters and program set in an engineering tool to the programmable controller.

Writing to the programmable controller

Restarting the programmable controller After writing the parameters and program, reset the programmable controller to RUN.

1. Turn ON the programmable controller. 2. Write parameters and program to the programmable controller in the "Online Data Operation" screen.

Select [Online] [Write to PLC]. Click the [Parameter + Program] button. Click the [Execute] button.

1 CC-Link IE Field Network Basic CONNECTION 1.5 Writing Data to a Programmable Controller 31

32

1.6 Checking Operations Check the operation by controlling the vision sensor using the programmable controller.

Making the vision sensor online Make the vision sensor online and start the communication with the programmable controller.

Enabling a trigger on the vision sensor Enable a trigger on the vision sensor to acquire the inspection results.

Check that the operating status is "Online".

1. Display device values. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M0" for "Device Name". Click the [Start Monitoring] button.

2. Enable a trigger on the vision sensor. Turn "M0" ON to turn 'Trigger Enable' (Y1000) ON.

3. Trigger a device. Turn "M1" ON to turn 'Trigger' (Y1001) ON.

1 CC-Link IE Field Network Basic CONNECTION 1.6 Checking Operations

1

Checking inspection results Check the inspection results. 1. Check the completion of the inspection.

Input "X1000" in "Device Name". Click the [Start Monitoring] button. Check that the bit of 'Inspection Completed' (X1009) is changed (toggled).

2. Check the inspection results. Enter "W0" for "Device Name". Click the [Start Monitoring] button. Check the following information. 'Job PASS' (W5.0): This bit turns ON

when the set inspection target is detected in the captured image.

'Job FAIL' (W6.0): This bit turns ON when the set inspection target is not detected in the captured image.

'Number of jobs inspected' (W7): The number of times the device is triggered is stored.

1 CC-Link IE Field Network Basic CONNECTION 1.6 Checking Operations 33

34

Changing a recognition parameter When locating a target object using the pattern in the location tool, the rotation tolerance of the target object can be changed to 90.

Parameter items need to be added to the list in the [Format Input Word Data] tab in advance to change parameter values. More than one parameter item can be selected.

1. Make the vision sensor offline with the vision sensor setup tool. 2. Add parameter items to the list in the [Format Input Word Data] tab.

Click the [Add] button. Select the [Format Input Word Data] tab and click the [Add] button.

Select "Pattern_1.Rotation Tolerance". Click the [OK] button.

3. Save the job and make the vision sensor online. (Page 24 Saving the job)

1 CC-Link IE Field Network Basic CONNECTION 1.6 Checking Operations

1

4. Set "Pattern_1.Rotation Tolerance" as a parameter to be changed.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'W1000' for "Device Name". Click the [Start Monitoring] button. Enter '90' for 'User Data' (W1001) of a remote register (RWw).

5. Change parameter values. Enter 'Y1000' for "Device Name". Turn ON 'Set User Data' (Y1010) of a remote output.

Enter 'X1000' for "Device Name". By completing the settings, 'Set User Data Ack' (X1010) of a remote input turns ON. After that, turn OFF 'Set User Data' (Y1010).

6. Trigger a device. Enter 'Y1000' for "Device Name". Turn ON 'Trigger' (Y1001) of a remote output.

1 CC-Link IE Field Network Basic CONNECTION 1.6 Checking Operations 35

36

Changing jobs (loading another job) The following shows the procedure to load the job file "1Test". The number '1' prefixed to the file name indicates an ID. By setting this ID number to 'Command' (W1000) of a remote resister (RWw), the job ("1Test") can be loaded.

To load a job, the file name of the job need to begin with an ID number. When loading a job, make a vision sensor offline.

1. Set an ID number of a job. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'W1000' for "Device Name". Click the [Start Monitoring] button. Enter '1' for 'Command' (W1000) of a remote register (RWw).

2. Change jobs (load another job). Enter 'Y1000' for "Device Name". Turn ON 'Set Offline' (Y1007) of a remote output to make the vision sensor offline. Turn ON 'Execute Command' (Y1004) of a remote output to load a job.

Enter 'X1000' for "Device Name". When the loading of the job is completed, 'Command Completed' (X100D) of a remote input is turned ON. After that, turn OFF 'Execute Command' (Y1004) and 'Set Offline' (Y1007).

1 CC-Link IE Field Network Basic CONNECTION 1.6 Checking Operations

2

2 SLMP SCANNER CONNECTION This chapter explains the procedure for connecting a vision sensor VS20 to a programmable controller and controlling the vision sensor with SLMP scanner connection.

2.1 System Configuration Example for Connecting a Vision Sensor

The following figure shows the system configuration for connecting a vision sensor VS20.

SLMP scanner connection is available for other vision sensors (VS70 and VS80). For details on the system configuration, refer to the user's manual of the vision sensor used.

USB cable Programmable controller

Ethernet cable

Ethernet cable

Ethernet cable (COGNEX product)

Breakout cable (COGNEX product)

Vision sensor

100 V power supply

Switching hub

24 VDC power supply

Engineering tool Vision sensor profile for engineering tool Vision sensor setup tool

2 SLMP SCANNER CONNECTION 2.1 System Configuration Example for Connecting a Vision Sensor 37

38

Configurations The devices used in the system configuration are as follows.

Required equipment Mitsubishi Electric products

COGNEX products

*1 Download this product from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Commercial products

For available devices for the system configuration, refer to the user's manual of the vision sensor used.

Vision sensor VS20M-13F410

Programmable controller Power supply: R62P CPU module: R08CPU Base: R35B

Engineering tool GX Works3

Vision sensor profile for engineering tool*1

Vision sensor setup tool In-Sight Explorer

Ethernet cable Breakout cable

Switching hub Ethernet cable USB cable (Type Mini-B) 24 VDC power supply

2 SLMP SCANNER CONNECTION 2.1 System Configuration Example for Connecting a Vision Sensor

2

Connection and wiring of a vision sensor This section shows the procedure for connecting and wiring a vision sensor.

Operating procedure 1. Check that the 24 VDC power supply is OFF.

2. Connect an I/O wire or a serial wire of a breakout cable to an appropriate device (such as a programmable controller).

3. Connect the 24 VDC (red wire) and GND (black wire) of a breakout cable to the corresponding terminals on the power supply.

4. Connect the M12 connector of the breakout cable to the Power, I/O and RS-232 connector of the vision sensor.

5. Connect the Ethernet cable's M12 connector to the vision sensor's Ethernet connector.

6. Turn ON the 24 VDC power supply.

Precautions When connecting a vision sensor and a programmable controller, simultaneously turn ON the power of the vision sensor

and programmable controller, or first turn ON the power of the programmable controller. Cut unused wires or protect them with insulating materials. Be careful not to short-circuit with 24 VDC wires. The cable is designed to connect with its key aligned with the keyway of the connector on the Vision Sensor. Do not force

the connections or damage may occur.

For details on the connection with a vision sensor, refer to the user's manual of the vision sensor used.

2 SLMP SCANNER CONNECTION 2.1 System Configuration Example for Connecting a Vision Sensor 39

40

2.2 Basic Operations for an SLMP Scanner Connection

Basic operation process for an SLMP scanner connection

Vision sensor

Set poll interval

While the trigger is on, communication between data import and the completion of inspection is performed regardless of the poll interval.

PLC

Reading CPU device Reading control area

Reading control area

Reading control area Trigger ON

Writing status

Writing status

Writing inspection results

Reading control area

Reading CPU device

Set the trigger instruction Bit of CPU device to ON with the sequence

Reading the control area using the vision sensor and accepting the trigger

Updating the status bit block and output word block

Updating the status bit block and output word block

Updating the status bit block and output word block

The vision sensor sends the inspection results, and the "Inspection Completed status and the "Results Valid" status.

Inspection Im

port

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection

2

Basic operations for an SLMP scanner connection In SLMP scanner connection, a vision sensor reads a control block from a programmable controller in the poll interval set with the vision sensor setup tool, and processing according to the change of the bit information in the control block is performed. In addition, the status of the processing is written to the corresponding bit in the status block. By assigning devices of a programmable controller to each of the defined data blocks (including control block), a vision sensor can be controlled using the devices. The following shows the functions of six data blocks.

Data Blocks Description Control block This block is used to perform control instructions (such as trigger) to a vision sensor. Bit information is used for the

control instructions. The vision sensor is controlled by turning ON and OFF the devices set to the control block.

Status block This block indicates the status of a vision sensor. The status can be checked with bit information.

Input data block This block is used to input application data (including parameters for inspection) from a programmable controller. The application data is input with word information.

Output data block This block is used by a vision sensor to output application data (including inspection results) to a programmable controller. The application data is output as word data.

String command block This block is used to set commands (string commands) to control a vision sensor. The commands are set with word information.

String command result block This block is used to output the results controlled by commands. The results are output as word information.

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection 41

42

Signals used for an SLMP scanner connection The following shows the details of six data blocks defined to control a vision sensor.

Precautions Do not write data to '(Reserved)' bits and words in data blocks. Doing so may cause an unexpected error.

Data blocks Control blocks Control block list

Control block details

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Set Offline (Reserved) Execute

Command Inspection Results Ack

Buffer Results Enable

Trigger Trigger Enable

Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 (Reserved)

Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 (Reserved) Clear Exposure

Complete Clear Error Initiate String

Command Set User Data

Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 Soft Event 7 Soft Event 6 Soft Event 5 Soft Event 4 Soft Event 3 Soft Event 2 Soft Event 1 Soft Event 0

Bit Data name Description (Application) 0 Trigger Enable To enable an image capturing trigger by 'Trigger.'

ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

1 Trigger To start (trigger) image capturing. ON: Image capturing is started. OFF:

The following conditions must be satisfied to start image capturing properly: "Industrial Ethernet" is selected in the [Set Up Image] [Trigger] tab in the vision sensor

setup tool. (Page 49 Creating a new job) The vision sensor is online. 'Trigger Enable' and 'Trigger Ready' are turned ON.

2 Buffer Results Enable To enable the buffer for read results. New read results are stored in the buffer queue of a vision sensor. To acquire the next read results, turn ON 'Inspection Results Ack.' ON: The buffer for read results is enabled. OFF: The buffer for read results is disabled.

3 Inspection Results Ack To respond to receiving the latest read results. A vision sensor turns 'Results Valid' OFF when recognizing that this bit turns ON. If 'Buffer Results Enable' is turned ON, the next read results are read out from the buffer queue when receiving a response. ON: Read results are received. OFF:

4 Execute Command To load a job of the job ID specified to 'Command.' ON: Job load is executed. OFF:

Until 'Command Completed' is turned ON, the ON state for this bit must be retained. The following conditions must be satisfied to start job load properly: A vision sensor is set to offline by 'Set Offline.' A job of the job ID specified to 'Command' exists.

5 to 6 (Reserved)

7 Set Offline To make a vision sensor offline while this bit is ON. ON: A vision sensor is set to offline. OFF:

8 to 15 (Reserved)

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection

2

Status blocks Status block list

Status block details

16 Set User Data To notify a vision sensor that the 'User Data' field was updated. ON: 'User Data' field update is notified. OFF:

A vision sensor updates data defined in the [Format Input Data] tab of a communication setting with the vision sensor setup tool when this bit is turned ON.

17 Initiate String Command To read data from the 'String Command' field and execute a command. ON: Native mode command is executed. OFF:

18 Clear Error To clear an error and error code signal. When multiple errors occur, the next error and error code are set by turning this bit OFF. ON: Error clear is executed. OFF:

19 Clear Exposure Complete To turn 'Exposure Complete' OFF. 'Exposure Complete' does not turn ON while this bit is ON. ON: Exposure completion is cleared. OFF:

20 to 23 (Reserved)

24 to 31 Soft Event To enable a soft event trigger in a spreadsheet. A related software event in a spreadsheet is executed by turning this bit ON.

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Online Offline Reason Missed Acq (Reserved) Trigger Ack Trigger Ready

Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Error Command Failed Command

Completed Command Executing

Results Valid Results Buffer Overrun

Inspection Completed

System Busy

Bit 23 Bit 22 Bit 21 Bit 20 Bit 19 Bit 18 Bit 17 Bit 16 (Reserved) Job Pass Exposure

Complete String Command Error

String Command Ack

Set User Data Ack

Bit 31 Bit 30 Bit 29 Bit 28 Bit 27 Bit 26 Bit 25 Bit 24 Soft Event Ack 7 Soft Event Ack 6 Soft Event Ack 5 Soft Event Ack 4 Soft Event Ack 3 Soft Event Ack 2 Soft Event Ack 1 Soft Event Ack 0

Bit Data name Description (Application) 0 Trigger Ready This bit turns ON when 'Trigger Enable' is set and an image capturing trigger can be received.

ON: An image capturing trigger can be received. OFF: An image capturing trigger cannot be received.

1 Trigger Ack This bit shows that a vision sensor recognizes 'Trigger' is ON, and an image capturing trigger is received. Until 'Trigger' is turned OFF, the ON state for this bit is retained. ON: An image capturing trigger is received. OFF:

2 (Reserved)

3 Missed Acq This bit shows that image capturing is failed. This bit is turned OFF if the next image capturing is succeeded. ON: Image capturing is failed. OFF:

4 to 6 Offline Reason This bit shows the cause of a vision sensor being offline by three bits. 0: Online 1: Job is being edited. 2: Offline is set by a discrete signal. 3: Offline is set by a predefined protocol.

7 Online This bit shows the online/offline status. When a vision sensor is offline, the reason is shown in the 'Offline Reason' field. ON: Online OFF: Offline

8 System Busy This bit shows that a vision sensor is executing or loading a job, or responding to user inputs. ON: System busy OFF:

Bit Data name Description (Application)

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection 43

44

Input data blocks Input data block list

Input data block details

9 Inspection Completed This bit is inverted every time when an inspection is completed and a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is sent to a programmable controller.

10 Results Buffer Overrun This bit shows that a vision sensor discards a series of read results after the buffer for read results becomes full. When the next read results are stored in the buffer queue properly, this bit is turned OFF. Only when 'Buffer Results Enable' is enabled, this bit is enabled. ON: Read results are discarded. OFF:

11 Results Valid This bit shows that a series of inspection results is available ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass' fields contain valid data). Until 'Inspection Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

12 Command Executing This bit shows that job load is executed. ON: Job load is being executed. OFF:

13 Command Completed This bit is turned ON when job load is completed. When a job load command is not completed properly, 'Command Failed' is also turned ON. ON: Job load is completed. OFF:

14 Command Failed This bit is turned ON when job load is not completed properly. It is turned OFF when a new job is loaded by a programmable controller. When changing a job by using the vision sensor setup tool, this bit is not changed. ON: Job load is failed. OFF:

15 Error This bit is turned ON when an error occurred. ON: Error occurred. OFF:

16 Set User Data Ack This bit is turned ON when 'Set User Data' command execution is completed. ON: 'Set User Data' command execution is completed. OFF:

17 String Command Ack This bit is turned ON when a native mode command execution is completed. ON: Native mode command execution is completed. OFF:

18 String Command Error This bit is turned ON when a native mode command execution is failed. ON: Native mode command execution is failed. OFF:

19 Exposure Complete This bit is turned ON when an exposure for a vision sensor is completed. It is turned OFF by 'Clear Exposure Complete.' When 'Clear Exposure Complete' is set to ON, the OFF state of this bit is retained. ON: Exposure is completed. OFF:

20 Job Pass This bit is turned ON when the latest job is passed. It is turned OFF when a job is failed. ON: Inspection result is passed. OFF:

21 to 23 (Reserved)

24 to 31 Soft Event Ack This bit shows that a vision sensor received a soft event command.

Word 0 Word 1 Word 2.. Command (Reserved) User Data

Word Data name Description (Application) 0 Command To specify job IDs (0 to 999).

1 (Reserved)

2 or later User Data Data buffer to transfer data from a programmable controller to a vision sensor. This can be used for the following application: To update the data defined in the [Format Input Data] tab of a communication setting with the

vision sensor setup tool: Store data to be updated in the data format defined in the [Format Input Data] tab.

Bit Data name Description (Application)

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection

2

Output data blocks Output data block list

Output data block details

String command blocks String command block list

String command block details

String command result blocks String command result block list

String command result block details

For details on the data block functions to control a vision sensor, refer to the help of vision sensor setup tool. Enter "SLMP scanner" as a keyword in the [Search] tab of Help, and refer to the explanation of the data block.

Word 0 Word 1 Word 2 Word 3 Word 4 Word 5.. Current Job ID Error Code Acquisition ID Inspection ID Inspection Result Code Inspection Results

Word Data name Description (Application) 0 Current Job ID Job ID of a job being executed is stored.

If no job ID is specified for the job, '65535 (0xFFFF)' is stored.

1 Error Code This shows an error occurred in 16-bit integer. 0x0000: No error 0x0100: An image capturing trigger is generated when the image capturing trigger is disabled. 0x0101: An image capturing trigger is generated when a vision sensor is offline. 0x0400: Another command execution command is generated when a command is being

executed. 0x0401: Job load is requested when a vision sensor is online. 0x0402: Job ID that does not exist is specified in the 'Command' field for the execution.

2 Acquisition ID Image capturing ID associated with the image capturing is stored. This can be used to synchronize image capturing and inspection results.

3 Inspection ID Inspection ID associated with a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is stored.

4 Inspection Result Code Any inspection result code specified for "Result code" of the WriteResultsBuffer function in the vision sensor setup tool (spreadsheet) is stored.

5 or later Inspection Results The data defined in the [Format Output Data] tab of a communication setting with the vision sensor setup tool is stored.

Word 0 Word 1.. String Command Length String Command

Word Data name Description (Application) 0 String Command Length Data length of native mode command stored in 'String Command' field is saved in bytes.

1 or later String Command Native mode command and the terminator are stored.

Word 0 Word 1 Word 2.. Result Code String Command Result Length String Command Result

Word Data name Description (Application) 0 String Command Result Code The execution result of a native mode command is stored.

'1' is returned when the execution is succeeded; however, a different failure code is returned depending on the native mode command when it is failed. For details of the failure code, refer to the topic of each native mode command.

1 String Command Result Length Data length of data stored in 'String Command Result' field is saved in bytes.

2 or later String Command Result The result string of a native mode command is stored in ASCII text.

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection 45

46

2 SLMP SCANNER CONNECTION 2.2 Basic Operations for an SLMP Scanner Connection

2

2.3 Setting the Vision Sensor Start the vision sensor setup tool to set the vision sensor.

Setting an IP address to a personal computer Set the IP address (192.168.3.3) to a personal computer.

Connecting the vision sensor Start the vision sensor setup tool to set the vision sensor. 1. Start the vision sensor setup tool.

Click the [Add] button.

2. Add the vision sensor to the network. Add the vision sensor to the network. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor 47

48

3. Connect to the vision sensor. Click the [Connect] button to connect to the vision sensor.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor

2

Creating a new job As an example, set a CE mark for inspection target. 1. Create a new job.

Click the [New Job] button.

2. Adjust so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Click the [Set Up Image] button. Select the [Trigger] tab. Select "Industrial Ethernet." Click the [Live Video] button to adjust the image. After adjusting the image, click the [Live Video] button again.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor 49

50

3. Set a tool. Click the [Locate Part] button. Select "Pattern". Click the [Add] button.

4. Set a model on the position to be detected. Set a model. (CE mark is selected.) Click the [OK] button. Check that Name is "Pattern_1".

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor

2

Configuring a communication setting 1. Configure the communication setting (SLMP scanner).

Click the [Communication] button. Click the [Add Device] button.

2. Add the SLMP scanner. Configure a device setting. Device: PLC/Motion Controller Manufacturer: Mitsubishi Protocol: SLMP Scanner Click the [OK] button. When the message "Protocol Service Change Required" appears, click the [OK] button.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor 51

52

SLMP response from a programmable controller may be delayed due to online operation to the programmable controller, etc., making connections disconnected in some cases. Ensure a sufficient margin for the timeout time.

Shortening the poll interval also shortens the interval to monitor the programmable controller status.

Assigning devices

Device addressing

3. Set the SLMP Scanner. Setting contents are as follows. Controller Type: iQ-R/Q/L Series (3E

Frame) IP Address: 192.168.3.2 Host Port: 12289 (Port number set

for the Ethernet parameter in an engineering tool)

Timeout (ms): 1000 Poll interval (ms): 100

Select the [Device Addressing] tab. Set a selected device, offset, and the number of devices to each of the six data blocks as shown left. (Page 52 Device addressing)

Name Selected Device Offset Number of Devices Control D-Data Register 1000 2

Status D-Data Register 1002 2

Output Block D-Data Register 1010 8

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor

2

Outputting to the programmable controller As an example, set "Pass," "Fail," and "Inspection_Count" to the output data block (D1015 to D1017). 1. Set data to be output from the vision sensor to the programmable controller.

Select the [Format Output Data] tab. Click the [Add] button.

2. Select the data to be output to the programmable controller. Select "Pattern_1 inspection result (PASS/FAIL)". Select "Job.Inspection_Count". Click the [OK] button.

3. The output result to the programmable controller is displayed.

Device Address: D1015 to D1017 Message size (words): 3 Items corresponding to the device address can be changed by using the [Up] and [Down] buttons. As an example, sort as above. D01015: Pattern_1.Pass D01016: Pattern_1.Fail D01017: Job.Inspection_Count

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor 53

54

Saving the job

The running job can be changed (loaded) to another job by prefixing a numeric value to a file name. For the procedure to change jobs, refer to the following section. Page 67 Changing jobs (loading another job)

1. Name the created job. Click the [Save Job] button. Click the [Save As] button.

2. Enter a file name and save the job. Enter an arbitrary file name. Click the [Save] button.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor

2

Restarting the vision sensor Turn the power of the vision sensor OFF and ON to restart.

3. Set startup options for the vision sensor. Click the [...] button under "Job". Select the checkbox of "Load Job on Startup". Select the file name saved in step 2. Select the checkbox of "Start the Sensor in Online Mode". Click the [OK] button.

2 SLMP SCANNER CONNECTION 2.3 Setting the Vision Sensor 55

56

2.4 Setting a Programmable Controller Set parameters of a programmable controller in an engineering tool.

Registering a profile Register a profile of the vision sensor in an engineering tool.

Profiles need to be registered when an engineering tool project is closed.

1. Start an engineering tool. 2. Resister a profile.

Select [Tool] [Profile Management] [Register]. Select the profile obtained previously. Click the [Register] button.

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

Setting a programmable controller Set parameters of a programmable controller. 1. Select a CPU module and a program language in the "New" screen.

Select [Project] [New]. The "New" screen appears. Set a CPU module and a program language. Series: RCPU Type: R08 Program Language: Ladder Click the [OK] button. Click the [OK] button.

2. Set the module parameter. Double-click "Module Parameter" in the "Navigation" window. The "R08CPU Module Parameter" screen appears. Set "IP Address," "Enable/Disable Online Change," and "Communication Data Code." IP Address: 192.168.3.2 Enable/Disable Online Change:

Enable All (SLMP) Communication Data Code: Binary Double-click [External Device Configuration]. The "Ethernet Configuration" screen appears. ( Page 58 "Ethernet Configuration" screen) Click the [Apply] button to end the settings.

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller 57

58

"Ethernet Configuration" screen Detect the connected vision sensor. Make sure to turn ON the power of the programmable controller in advance.

For the system configuration in which the automatic detection function of connected devices is not supported, a vision sensor can be added by dragging and dropping a corresponding device in "Vision Sensor" from "Ethernet Device (Mitsubishi Electric Corporation)" in "Module List." The parameter settings are as follows: "Protocol": TCP "PLC" - "Port No.": 12289 (SLMP port number set in the vision sensor setup tool) "Sensor/Device" - "IP Address": 192.168.3.1 (IP address of a vision sensor set in the vision sensor setup

tool)

Click the [Detect Now] button. Read the displayed message, and

click the [Yes] button. Check that the connected vision

sensor is displayed. Select [Close with Reflecting the Setting]. For details on the automatic detection function of connected devices, refer to the following: iQ Sensor Solution Reference Manual

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

Creating a program Create a program to control a vision sensor using the devices set in the vision sensor setup tool.

Devices used in the program

Program example

Precautions Use 'Trigger Ack' (D1002.1) to set an interlock when checking 'Inspection Completed' (D1002.9).

Signal Signal name Description D1002.0 Trigger Ready The reception status of 'Trigger Enable' (D1000.0) is stored.

ON: Trigger is enabled. OFF: Trigger is disabled.

D1002.1 Trigger Ack The reception status of 'Trigger' (D1000.1) is stored. ON: With trigger OFF: Without trigger

D1002.7 Online The online status of a vision sensor is stored. ON: Online OFF: Offline

D1002.9 Inspection Completed This signal is changed (toggled) at the completion of an inspection of a vision sensor.

D1000.0 Trigger Enable 'Trigger' (D1000.1) is enabled while this signal is ON.

D1000.1 Trigger By turning this signal OFF and ON, an image capture is started.

M0 Online command 'Trigger Enable' (D1000.0) turns ON to make a vision sensor online while this signal is ON.

M1 Trigger directive By turning this signal OFF and ON, 'Trigger' (D1000.1) is turned ON, and an image capture is performed.

(0): Enable a trigger on the vision sensor. (3): Request the start of the image capture to the vision sensor. ('Trigger' (D1000.1) turns ON.) (8): The processing for the completion of the image capture of the vision sensor is performed.

(0) M0 D1002.7 D1000.0

(3) M1 D1002.0 D1002.1 D1000.1

SET D1000.1

(8) D1002.1 D1002.9

RST D1000.1

D1002.9 RST M1

(16) END

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller 59

60

Timing chart of SLMP scanner connection A timing chart when controlling a vision sensor using a programmable controller is shown below. To enable the trigger from a programmable controller, turn ON 'Trigger Enable' of the control block. When 'Trigger' of the control block is turned ON while 'Trigger Ready' of the status block is ON by turning ON 'Trigger Enable,' the status of the vision sensor is output to 'Trigger Ack' and 'Inspection Completed' of the status block. The status of 'Inspection Completed' is changed (toggled) at the completion of an inspection.

Trigger Enable

Trigger

Trigger Ready

Inspection Completed

Trigger Ack

Read image processing

Inspection Processing

Turn ON/OFF with the PLC (Program).

Turn ON/OFF the vision sensor automatically.

When the inspection is completed, the ON/OFF status is inverted.

Processing Processing

Processing Processing

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

2.5 Writing Data to a Programmable Controller Write the parameters and program set in an engineering tool to the programmable controller.

Writing to the programmable controller

Restarting the programmable controller After writing the parameters and program, reset the programmable controller to RUN.

1. Turn ON the programmable controller. 2. Write parameters and program to the programmable controller in the "Online Data Operation" screen.

Select [Online] [Write to PLC]. The "Online Data Operation" screen appears. Select the [Parameter + Program] button. Click the [Execute] button.

2 SLMP SCANNER CONNECTION 2.5 Writing Data to a Programmable Controller 61

62

2.6 Checking Operations Check the operation by controlling the vision sensor using the programmable controller.

Making the vision sensor online Make the vision sensor online and start the communication with the programmable controller.

Check that the operating status is "Online".

Select the [Communication] button. Click "SLMP Scanner". Check that "Connected." is displayed.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

2

Enabling a trigger on the vision sensor Enable a trigger on the vision sensor to acquire the inspection results. 1. Display device values.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M0" for "Device Name". Click the [Start Monitoring] button.

2. Enable a trigger on the vision sensor. Turn "M0" ON to turn 'Trigger Enable' (D1000.0) ON.

3. Trigger a device. Turn "M1" ON to turn 'Trigger' (D1000.1) ON.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 63

64

Checking inspection results Check the inspection results. 1. Check the completion of the inspection.

Enter "D1000" for "Device Name". Click the [Start Monitoring] button. Check that the bit of 'Inspection Completed' (D1002.9) is changed (toggled).

2. Check the inspection results. Check the following information. 'Job PASS' (D1015.0): This bit turns

ON when the set inspection target is detected in the captured image.

'Job FAIL' (D1016.0): This bit turns ON when the set inspection target is not detected in the captured image.

'Number of jobs inspected' (D1017): The number of times the device is triggered is stored.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

2

Changing a recognition parameter When locating a target object using the pattern in the location tool, the rotation tolerance of the target object can be changed to 90. 1. Make the vision sensor offline with the vision sensor setup tool. 2. Add parameter items to the list in the [Format Input Data] tab.

Click the [Communication] button. Enter the following information to the cells in the "Input Block" row in the [Device Addressing] tab. Selected Device: D - Data Register Offset: 2000 Number of Devices: 3

Select the [Format Input Data] tab and click the [Add] button.

Select "Pattern_1.Rotation Tolerance". Click the [OK] button.

3. Save the job and make the vision sensor online. (Page 54 Saving the job)

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 65

66

Parameter items need to be added to the list in the [Format Input Data] tab in advance to change parameter values. More than one parameter item can be selected. Set the number of devices of "Input Block," depending on the number and size of parameters. When the number entered in "Number of devices" is smaller than the total size of the parameter items added to the list in the [Format Input Data] tab, a warning mark is displayed next to "Message size (words)".

4. Set "Pattern_1.Rotation Tolerance" as a parameter to be changed. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'D2000' for "Device Name". Click the [Start Monitoring] button. Enter '90' for 'User Data' (D2002) of an input data block.

5. Change parameter values. Enter 'D1000' for "Device Name". Turn ON 'Set User Data' (D1001.0) of a control block. By completing the settings, 'Set User Data Ack' (D1003.0) of a status block turns ON. After that, turn OFF 'Set User Data' (D1001.0).

6. Trigger a device. Turn ON 'Trigger' (D1000.1) of a control block.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

2

Changing jobs (loading another job) The following shows the procedure to load the job file "1Test". The number '1' prefixed to the file name indicates an ID. By setting this ID number to 'Command' (D2000) of an input data block, the job ("1Test") can be loaded.

To load a job, the file name of the job need to begin with an ID number. When loading a job, make a vision sensor offline.

1. Set an ID number of a job. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'D2000' for "Device Name". Click the [Start Monitoring] button. Enter '1' for 'Command' (D2000) of an input data block.

2. Change jobs (load another job). Enter 'D1000' for "Device Name". Turn ON 'Set Offline' (D1000.7) of a control block to make the vision sensor offline. Turn ON 'Execute Command' (D1000.4) of a control block to load a job. When the loading of the job is completed, 'Command Completed' (D1002.D) of a status block is turned ON. After that, turn OFF 'Execute Command' (D1000.4) and 'Set Offline' (D1000.7).

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 67

68

Controlling the vision sensor by using native mode commands The vision sensor can be controlled by using native mode commands. As an example, send the native mode command "GF (Get File)" to acquire the file name of the job in use.

Setting the vision sensor

Set an appropriate number of devices in the "Command" row for command length (size). Set an appropriate number of devices in the "Command Result" row for the size of the data to be acquired.

Acquiring a file name Send the native mode command "GF" to acquire a file name.

1. Make the vision sensor offline with the vision sensor setup tool. 2. Set devices in the [Device Addressing] tab. 3. Save the job and make the vision sensor online. (Page 54 Saving the job)

Enter the following information to the cells in the "Command" row. Selected Device: D - Data Register Offset: 3000 Number of Devices: 20 Enter the following information to the cells in the "Command Result" row. Selected Device: D - Data Register Offset: 3050 Number of Devices: 50

1. Set a native command and a command length. Create a ladder program as shown left with an engineering tool. Set the native command "GF" and

the line feed code of terminator "CR/ LF" for 'String Command' (D3001) of a string command block.

Set the native command length for 'String Command Length' (D3000) of a string command block.

Perform the online program change function.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

2

2. Check that the command and the command length are set correctly. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'D3000' for "Device Name". Click the [Start Monitoring] button. Check that the following information is set. D3000: 4 (character length) D3001: "GF" (native mode

command) D3002: 2573 (line feed code of

terminator: (CR/LF))

3. Send the native mode command. Enter 'D1000' for "Device Name". Turn ON 'Initiate String Command' (D1001.1) of a control block. 'String Command Ack' (D1003.1) of a status block turns ON. After that, turn OFF 'Initiate String Command' (D1001.1).

4. Check the acquired data. Enter 'D3050' for "Device Name". The information in the following string command result blocks can be acquired. 'Result Code' (D3050): '1'

(successfully completed) 'String Command Result Length'

(D3051): 9 (file name length) 'String Command Result' (from

D3052 to D3056): "1test.job" (file name)

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 69

70

For details on the native mode commands to control a vision sensor, refer to the help of vision sensor setup tool. Enter "Native Mode Commands" as a keyword in the [Search] tab of Help, and refer to the explanation of Native Mode Commands.

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

3

3 I/O CONNECTION This chapter explains the procedure for connecting a vision sensor VS20 to a programmable controller and controlling the vision sensor with I/O connection.

3.1 System Configuration Example for Connecting a Vision Sensor

The following figure shows the system configuration for connecting a vision sensor VS20.

I/O connection is available for other vision sensors (VS70 and VS80). For details on the system configuration, refer to the user's manual of the vision sensor used.

I/O wire

I/O module (COGNEX product)

USB cable Programmable controller

Ethernet cable

I/O module cable (COGNEX product)

100 V power supply

Switching hub Vision sensor

Ethernet cable

Ethernet cable (COGNEX product)

24 VDC power supply

Engineering tool Vision sensor setup tool

3 I/O CONNECTION 3.1 System Configuration Example for Connecting a Vision Sensor 71

72

Configurations The devices used in the system configuration are as follows.

Required equipment Mitsubishi Electric products

COGNEX products

*1 Download this product from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Commercial products

For available devices for the system configuration, refer to the user's manual of the vision sensor used.

Vision sensor VS20M-13F410

Programmable controller Power supply: R62P CPU module: R08CPU Base: R35B Input module: RX40C7 Output module: RY40NT5P

Engineering tool GX Works3

Vision sensor setup tool In-Sight Explorer*1

Ethernet cable I/O module cable I/O module CIO-1400 I/O extension module

Switching hub Ethernet cable USB cable (Type Mini-B) 24 VDC power supply I/O wire

3 I/O CONNECTION 3.1 System Configuration Example for Connecting a Vision Sensor

3

Connection and wiring of a vision sensor This section shows the procedure for connecting and wiring a vision sensor.

Ethernet cable connection 1. Connect the Ethernet cable's M12 connector to the vision sensor's Ethernet connector.

2. Connect the Ethernet cable's RJ-45 connector to the switching hub or personal computer, as applicable.

Connecting an I/O module (CIO-1400 I/O extension module) and an input/output module 1. Check that the 24 VDC power supply is OFF.

2. Connect a CIO-1400 I/O extension module and an input/output module as shown in the following figure.

Precautions Use only 24 VDC and observe the indicated polarity. When connecting a vision sensor and a programmable controller, simultaneously turn ON the power of the vision sensor

and programmable controller, or first turn ON the power of the programmable controller. Cut unused wires or protect them with insulating materials. Be careful not to short-circuit with 24 VDC wires. The cable is designed to connect with its key aligned with the keyway of the connector on the Vision Sensor. Do not force

the connections or damage may occur.

For details on the connection with a vision sensor, refer to the user's manual of the vision sensor used.

24 VDC power supply

High-speed output 1 High-speed output 0

24 VDC Trigger

24 VDC GND

General-purpose input 1 Input common

General-purpose output 3 General-purpose output 2

Output common

3 I/O CONNECTION 3.1 System Configuration Example for Connecting a Vision Sensor 73

74

3.2 Setting the Vision Sensor Start the vision sensor setup tool to set the vision sensor.

Setting an IP address to a personal computer Set the IP address (192.168.3.3) to a personal computer.

Connecting the vision sensor Start the vision sensor setup tool to set the vision sensor. 1. Start the vision sensor setup tool.

Click the [Add] button.

2. Add the vision sensor to the network. Add the vision sensor to the network. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button.

3 I/O CONNECTION 3.2 Setting the Vision Sensor

3

3. Connect to the vision sensor. Click the [Connect] button to connect to the vision sensor.

3 I/O CONNECTION 3.2 Setting the Vision Sensor 75

76

Creating a new job As an example, set a CE mark for inspection target. 1. Create a new job.

Click the [New Job] button.

2. Adjust so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Click the [Set Up Image] button. Select the [Trigger] tab. Select "Camera". Click the [Live Video] button to adjust the image. After adjusting the image, click the [Live Video] button again.

3 I/O CONNECTION 3.2 Setting the Vision Sensor

3

3. Set a tool. Click the [Locate Part] button. Select "Pattern". Click the [Add] button.

4. Set a model on the position to be detected. Set a model. (CE mark is selected.) Click the [OK] button. Check that Name is "Pattern_1".

3 I/O CONNECTION 3.2 Setting the Vision Sensor 77

78

I/O settings 1. Set inputs and outputs (I/O connection).

Click the [Inputs/Outputs] button. Select "De-Energize While Offline". Click the [I/O Module] button.

2. Select an I/O module. Set "CIO-1400" in "Select I/O Module". Click the [OK] button. Check "De-Energize While Offline".

3. Set I/O signals. Set inputs and outputs. Click the [Details] button in the row of '3'.

3 I/O CONNECTION 3.2 Setting the Vision Sensor

3

Setting I/O signals

Input Signal Type Job Result 1 Online/Offline Undefined

Output Signal Type Job Result Direct 0 Job Result Pattern_1.Pass

Direct 1 Job Result Pattern_1.Fail

2 Online/Offline Undefined

3 Job completion Undefined

4. Set output details. Set "1000" (1 second) in pulse length. Click the [OK] button.

3 I/O CONNECTION 3.2 Setting the Vision Sensor 79

80

Saving the job 1. Name the created job and save it.

Click the [Save Job] button. Click the [Save As] button. Select the file name saved in "Startup Job" after saving the job.

2. Enter a file name and save the job. Enter an arbitrary file name. Click the [Save] button.

3 I/O CONNECTION 3.2 Setting the Vision Sensor

3

Restarting the vision sensor Turn the power of the vision sensor OFF and ON to restart.

3. Set startup options for the vision sensor. Click the [...] button under "Job". Select the checkbox of "Load Job on Startup". Select the file name saved in step 2. Select the checkbox of "Start the Sensor in Online Mode". Click the [OK] button.

3 I/O CONNECTION 3.2 Setting the Vision Sensor 81

82

3.3 Setting a Programmable Controller Set parameters of a programmable controller and create a program in an engineering tool.

Setting a programmable controller Set parameters of a programmable controller. 1. Start an engineering tool. 2. Select a CPU module and a program language in the "New" screen.

Select [Project] [New]. The "New" screen appears. Set a CPU module and a program language. Series: RCPU Type: R08 Program Language: Ladder Click the [OK] button. Click the [OK] button.

3 I/O CONNECTION 3.3 Setting a Programmable Controller

3

3. Set the system parameter. Double-click [System Parameter] in the "Navigation" window to set input/ output modules. Select [I/O Assignment Setting]. Set "RX40C7" for slot 0 and "RY40NT5P" for slot 1. Click the [OK] button.

3 I/O CONNECTION 3.3 Setting a Programmable Controller 83

84

Creating a program Create a program to control a vision sensor using I/O signals set in the vision sensor setup tool.

Devices used in the program Signal Signal name Description Remarks X0 Pattern_1.Pass This signal turns ON when the inspection target set in

Pattern_1 is detected in the captured image. ON: Pattern match OFF: Pattern mismatch or capture not implemented

When the vision sensor is not in the online status, this signal turns OFF.

X1 Pattern_1.Fail This signal turns ON when the inspection target set in Pattern_1 is detected in the captured image. ON: Pattern mismatch OFF: Pattern match or capture not implemented

When the vision sensor is not in the online status, this signal turns OFF.

X2 Online This signal turns ON when a vision sensor is online. ON: Online OFF: Offline, or discrete online

X3 Job completion This signal turns ON for the set time when the image capture processing is completed.

For the settings of ON time, refer to I/O settings. (Page 78 I/O settings)

Y10 Trigger When the trigger setting of the vision sensor is set to "Camera," an image capture is performed by turning this signal OFF and ON. To perform the image capture again, turn the signal ON and OFF, and then turn it OFF and ON.

It becomes enabled only when the vision sensor is online.

Y12 Online request Turn this signal ON to change the vision sensor in discrete online status to online. Turn this signal OFF to change the vision sensor to discrete online status.

If the vision sensor is offline, it will not go online even if it is turned ON.

M0 Online command 'Online Request' (Y12) turns ON to make a vision sensor online while this signal is ON.

M1 Trigger directive By turning this signal OFF and ON, 'Trigger' (Y10) is turned ON, and an image capture is performed.

M10 Pattern_1.Pass This signal turns ON when the inspection target set in Pattern_1 is detected in the captured image. ON: Pattern match OFF: Pattern mismatch or capture not implemented

It becomes the same status as X0.

M11 Pattern_1.Fail This signal turns ON when the inspection target set in Pattern_1 is detected in the captured image. ON: Pattern match OFF: Pattern mismatch or capture not implemented

It becomes the same status as X1.

3 I/O CONNECTION 3.3 Setting a Programmable Controller

3

Program example

Timing chart of an I/O connection The following shows a timing chart.

(0): Enable a trigger on the vision sensor. (2): Request the start of the image capture to the vision sensor. ('Trigger' (Y10) turns ON.) (7): "M0" turns ON when the inspection target set in Pattern_1 is detected in the captured image. (9): "M1" turns ON when the inspection target set in Pattern_1 is not detected in the captured image. (11): The processing for the completion of the image capture of the vision sensor is performed.

(1) The bit turns ON for one second (set time period).

(0) M0 Y12

(2) M1 X2 X3 Y10

SET Y10

(7) X0 M10

(9) X1 M11

(11) X3

RST Y10

RST M1

(14) END

(1) (1)

Online request (Y12)

Turn ON/OFF with the PLC (Program).

Turn ON/OFF the vision sensor automatically.

Trigger (Y10)

Online status (X2)

Import/inspection processing of the vision sensor image

Job end (X3)

Pattern_1 PASS (X0)

Pattern_1 FAIL (X1)

Match Mismatch

ProcessingProcessing

3 I/O CONNECTION 3.3 Setting a Programmable Controller 85

86

3.4 Writing Data to a Programmable Controller Write the parameters and program set in an engineering tool to the programmable controller.

Writing to the programmable controller

Restarting the programmable controller After writing the parameters and program, reset the programmable controller to RUN.

1. Start the programmable controller. 2. Write parameters and program to the programmable controller in the "Online Data Operation" screen.

Select [Online] [Write to PLC]. The "Online Data Operation" screen appears. Click the [Parameter + Program] button. Click the [Execute] button.

3 I/O CONNECTION 3.4 Writing Data to a Programmable Controller

3

3.5 Checking Operations Check the operation by controlling the vision sensor using the programmable controller.

Making the vision sensor online Make the vision sensor online and start the communication with the programmable controller.

Enabling a trigger on the vision sensor Enable a trigger on the vision sensor to acquire the inspection results.

Check that the operating status is "Online".

1. Display device values. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M0" for "Device Name". Click the [Start Monitoring] button.

2. Make the vision sensor online. Turn "M0" ON to turn 'Online Request' (Y12) ON.

3 I/O CONNECTION 3.5 Checking Operations 87

88

Checking inspection results Check the inspection results.

3. Trigger a device. Turn "M1" ON to turn 'Trigger' (Y10) ON.

1. Check the inspection results. Check the following information. 'Pattern_1.Pass' (M10): This bit turns

ON when the set inspection target is detected in the captured image.

'Pattern_1.Fail' (M11): This bit turns ON when the set inspection target is not detected in the captured image.

3 I/O CONNECTION 3.5 Checking Operations

3

3.6 Using CIO-MICRO I/O module An IP address needs to be set to use a CIO-MICRO I/O module. This section shows the procedure to set an IP address to a CIO-MICRO I/O module.

For the vision sensors that can be connected to a CIO-MICRO I/O module, refer to the user's manuals of vision sensors.

1. Set inputs and outputs (I/O connection). Click the [Inputs/Outputs] button. Click the [I/O Module] button. Set items as follows. Select I/O Module: CIO-Micro Connect To: cioMicro_xxxxxx Select the [Change Settings] button.

3 I/O CONNECTION 3.6 Using CIO-MICRO I/O module 89

90

2. Set the network of the I/O module. Set items as follows. IP Address: 192.168.3.4 Subnet Mask: 255.255.255.0 Click the [OK] button. Click the [OK] button.

3. Select the I/O module. Select the checkbox of [De- Energize While Offline].

3 I/O CONNECTION 3.6 Using CIO-MICRO I/O module

3

3 I/O CONNECTION 3.6 Using CIO-MICRO I/O module 91

92

4 EtherNet/IP CONNECTION This chapter explains the procedure for connecting a vision sensor VS20 to a programmable controller and controlling the vision sensor with an EtherNet/IP connection.

4.1 System Configuration Example for Connecting a Vision Sensor

The following figure shows the system configuration for connecting a vision sensor.

EtherNet/IP connection is available for other vision sensors (VS70 and VS80). For details on the system configuration, refer to the user's manual of the vision sensor used.

USB cable

Engineering tool Vision sensor setup tool

Programmable controller

Ethernet cable

Ethernet cable

Ethernet cable (COGNEX product)

Breakout cable (COGNEX product)

Vision sensor

100 VAC power supply

Switching hub

24 VDC power supply

EtherNet/IP Configuration Tool

4 EtherNet/IP CONNECTION 4.1 System Configuration Example for Connecting a Vision Sensor

4

Configurations The devices used in the system configuration are as follows.

Required equipment Mitsubishi Electric products

*1 Download this product from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

COGNEX products

*1 Download this product from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Commercial products

For available devices for the system configuration, refer to the user's manual of the vision sensor used.

Vision sensor VS20M-13F410

Programmable controller Power supply: R62P CPU module: R08CPU Base: R35B EtherNet/IP network interface module: RJ71EIP91

Engineering tool GX Works3

EtherNet/IP network configuration tool*1

EtherNet/IP Configuration Tool for RJ71EIP91 (EtherNet/IP Configuration Tool)

EDS file EDS file for a vision sensor*1

Vision sensor setup tool In-Sight Explorer*1

Ethernet cable Breakout cable

Switching hub Ethernet cable USB cable (Type Mini-B) 24 VDC power supply

4 EtherNet/IP CONNECTION 4.1 System Configuration Example for Connecting a Vision Sensor 93

94

Connection and wiring of a vision sensor This section shows the procedure for connecting and wiring a vision sensor.

Operating procedure 1. Check that the 24 VDC power supply is OFF.

2. Connect an I/O wire or a serial wire of a breakout cable to an appropriate device (such as a programmable controller).

3. Connect the 24 VDC (red wire) and GND (black wire) of a breakout cable to the corresponding terminals on the power supply.

4. Connect the M12 connector of the breakout cable to the Power, I/O and RS-232 connector of the vision sensor.

5. Connect the Ethernet cable's M12 connector to the vision sensor's Ethernet connector.

6. Turn ON the 24 VDC power supply.

Precautions When connecting a vision sensor and a programmable controller, simultaneously turn ON the power of the vision sensor

and programmable controller, or first turn ON the power of the programmable controller. Cut unused wires or protect them with insulating materials. Be careful not to short-circuit with 24 VDC wires. The cable is designed to connect with its key aligned with the keyway of the connector on the Vision Sensor. Do not force

the connections or damage may occur.

For details on the connection with a vision sensor, refer to the user's manual of the vision sensor used.

4 EtherNet/IP CONNECTION 4.1 System Configuration Example for Connecting a Vision Sensor

4

4.2 Basic Operations for an EtherNet/IP Connection Overview An EtherNet/IP connection uses the following object model. The Vision Object included in this object model enables to use data such as a trigger, status, and result.

*1 For details, refer to the following: Page 97 Input/Output Assemblies used for cyclic (Implicit) communications

The Vision Object consists of attributes (data) and services (functions). For details on attributes and services, refer to the help of vision sensor setup tool.

Communication methods An EtherNet/IP connection has two types of the communication methods: cyclic (Implicit) communications and message (Explicit) communications.

Cyclic (Implicit) communications Cyclic (Implicit) communications are the method where data communications are periodically performed with the set interval by using the Assembly Object. Some attributes of the Vision Object are exposed in the Assembly Object.

Message (Explicit) communications Message (Explicit) communications are the method where a message is sent to a specific device (vision sensor) when desired, and the device (vision sensor) that received the message sends a response. Attributes can be accessed by using the services of the Vision Object via message (Explicit) communications.

An EtherNet/IP network interface module (RJ71EIP91) is used for an EtherNet/IP connection between a programmable controller and a vision sensor. For details on an RJ71EIP91, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module User's Manual (Startup)

Vision sensor

Identity Object

Ethernet Link Object

TCP/IP Object

Other Internal Objects

Vision Object

Inputs * Outputs *

Assembly Object

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection 95

96

Basic operation process for cyclic (Implicit) communications The Class 1 instance communications function of an EtherNet/IP network interface module (RJ71EIP91) is used for cyclic (Implicit) communications. Cyclic (Implicit) communications perform data communications periodically with the Requested Packet Interval (hereafter abbreviated as RPI) set in an RJ71EIP91, and the specified buffer memory is updated. Data communications are performed between the originator (RJ71EIP91) that sends the connection request and the target (vision sensor) that receives the connection request. In addition, defined Input/Output Assemblies are used to transmit data. Cyclic (Implicit) communications establish a connection between an RJ71EIP91 and a vision sensor; therefore, it is suitable for receiving measured data from inspection tools and for detecting an error early.

(1): Turn ON 'EtherNet/IP communication start request' (Y10). (2): Connection open (3): Response (normal) (4): Store data in the buffer memory at the RPI interval. (5): Acquire the stored data. (6): Store data in the buffer memory. (7): Send the data of the buffer memory at the RPI interval.

RJ71EIP91

(1)

(2)

(3)

(4)

(5)

(6)

(7)

Device

Device

Originator

Buffer memory

Buffer memory

'Class1 Input Area'

(Un\G65536 to Un\G98303)

CPU module

'Class1 Output Area'

(Un\G196608 to Un\G229375)

Target

Output data

Vision sensor

Input data

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection

4

Input/Output Assemblies used for cyclic (Implicit) communications The Assembly Object is used for cyclic (Implicit) communications. For details on each assembly data, refer to the help of vision sensor setup tool.

Precautions Do not change the value of the '(Reserved)' area in the Input/Output Assemblies. Doing so may cause an unexpected error.

Input Assembly The Input Assembly is input signals for a programmable controller to acquire the status of a vision sensor. The instance 13 of the Input Assembly contains status information and inspection results.

Input Assembly list Instance Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 13 0 Online Offline Reason Missed Acq (Reserved) Trigger Ack Trigger

Ready

1 Error Command Failed

Command Completed

Command Executing

Results Valid Results Buffer Overrun

Inspection Completed

System Busy

2 (Reserved) (Reserved) (Reserved) Job Pass Exposure Complete

(Reserved) (Reserved) Set User Data Ack

3 SoftEvent Ack 7

SoftEvent Ack 6

SoftEvent Ack 5

SoftEvent Ack 4

SoftEvent Ack 3

SoftEvent Ack 2

SoftEvent Ack 1

SoftEvent Ack 0

4 Error Code (16-bit integer)

5

6 (Reserved)

7

8 Current Job ID (16-bit integer)

9

10 Acquisition ID (16-bit integer)

11

12 Inspection ID (16-bit integer)

13

14 Inspection Result Code (16-bit integer)

15

16 Inspection Results 0

to to

499 Inspection Results 483

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection 97

98

Details on the Input Assembly Byte Bit Data name Description (Application) 0 0 Trigger Ready This bit turns ON when 'Trigger Enable' is set and an image capturing trigger can be received.

ON: An image capturing trigger can be received. OFF: An image capturing trigger cannot be received.

1 Trigger Ack This bit shows that a vision sensor recognizes 'Trigger' is ON, and an image capturing trigger is received. Until 'Trigger' is turned OFF, the ON state for this bit is retained. ON: An image capturing trigger is received. OFF:

2 (Reserved)

3 Missed Acq This bit shows that image capturing is failed. This bit is turned OFF if the next image capturing is succeeded. ON: Image capturing is failed. OFF:

4 Offline Reason This bit shows the cause of a vision sensor being offline by three bits. 0: Online 1: Job is being edited. 2: Offline is set by a discrete signal. 3: Offline is set by a predefined protocol.

5

6

7 Online This bit shows the online/offline status. When a vision sensor is offline, the reason is shown in the 'Offline Reason' field. ON: Online OFF: Offline

1 0 System Busy This bit shows that a vision sensor is executing or loading a job, or responding to user inputs. ON: System busy OFF:

1 Inspection Completed This bit is inverted every time when an inspection is completed and a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is sent to a programmable controller.

2 Results Buffer Overrun This bit shows that a vision sensor discards a series of read results after the buffer for read results becomes full. When the next read results are stored in the buffer queue properly, this bit is turned OFF. Only when 'Buffer Results Enable' is enabled, this bit is enabled. ON: Read results are discarded. OFF:

3 Results Valid This bit shows that a series of inspection results is available ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass' fields contain valid data). Until 'Inspection Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

4 Command Executing This bit shows that job load is executed. ON: Job load is being executed. OFF:

5 Command Completed This bit is turned ON when job load is completed. When a job load command is not completed properly, 'Command Failed' is also turned ON. ON: Job load is completed. OFF:

6 Command Failed This bit is turned ON when job load is not completed properly. It is turned OFF when a new job is loaded by a programmable controller. When changing a job by using the vision sensor setup tool, this bit is not changed. ON: Job load is failed. OFF:

7 Error This bit is turned ON when an error occurred. ON: Error occurred. OFF:

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection

4

2 0 Set User Data Ack This bit is turned ON when 'Set User Data' command execution is completed. ON: 'Set User Data' command execution is completed. OFF:

1 (Reserved)

2 (Reserved)

3 Exposure Complete This bit is turned ON when an exposure for a vision sensor is completed. It is turned OFF by 'Clear Exposure Complete.' When 'Clear Exposure Complete' is set to ON, the OFF state of this bit is retained. ON: Exposure is completed. OFF:

4 Job Pass This bit is turned ON when the latest job is passed. It is turned OFF when a job is failed. ON: Inspection result is passed. OFF:

5 (Reserved)

6 (Reserved)

7 (Reserved)

3 0 Soft Event Ack This bit shows that a vision sensor received a soft event command.

1

2

3

4

5

6

7

Byte Data name Description (Application) 4 Error Code (16-bit integer) This shows an error occurred in 16-bit integer.

0x0000: No error 0x0100: An image capturing trigger is generated when the image capturing trigger is disabled. 0x0101: An image capturing trigger is generated when a vision sensor is offline. 0x0400: Another command execution command is generated when a command is being executed. 0x0401: Job load is requested when a vision sensor is online. 0x0402: Job ID that does not exist is specified in the 'Command' field for the execution.

5

6 (Reserved)

7

8 Current Job ID (16-bit integer) Job ID of a job being executed is stored. If no job ID is specified for the job, '65535 (0xFFFF)' is stored.9

10 Acquisition ID (16-bit integer) Image capturing ID associated with the image capturing is stored. This can be used to synchronize image capturing and inspection results.11

12 Inspection ID (16-bit integer) Inspection ID associated with a series of inspection results ('Inspection ID,' 'Inspection Result Code,' 'Inspection Results,' and 'Job Pass') is stored.13

14 Inspection Result Code (16-bit integer)

Any inspection result code specified for "Result code" of the WriteResultsBuffer function in the vision sensor setup tool (spreadsheet) is stored.15

16 Inspection Results 0 The data defined in the [Format Output Data] tab of a communication setting with the vision sensor setup tool is stored.to to

499 Inspection Results 483

Byte Bit Data name Description (Application)

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection 99

10

Output Assembly The Output Assembly is output signals for a programmable controller to control a vision sensor. The instance 22 of the Output Assembly contains control signals, software event signals, and any user data required for the trigger and inspection.

Output Assembly list

Details on the Output Assembly

Instance Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 22 0 Set Offline (Reserved) Execute

Command Inspection Results Ack

Buffer Results Enable

Trigger Trigger Enable

1 (Reserved)

2 (Reserved) Clear Exposure Complete

Clear Error (Reserved) Set User Data

3 SoftEvent 7 SoftEvent 6 SoftEvent 5 SoftEvent 4 SoftEvent 3 SoftEvent 2 SoftEvent 1 SoftEvent 0

4 Command

5

6 (Reserved)

7

8 User Data 0

to to

495 User Data 487

Byte Bit Data name Description (Application) 0 0 Trigger Enable To enable an image capturing trigger by 'Trigger.'

ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

1 Trigger To start (trigger) image capturing. ON: Image capturing is started. OFF:

The following conditions must be satisfied to start image capturing properly: "Industrial Ethernet" is selected in the [Set Up Image] [Trigger] tab in the vision sensor setup tool.

(Page 105 Creating a new job) The vision sensor is online. 'Trigger Enable' and 'Trigger Ready' are turned ON.

2 Buffer Results Enable To enable the buffer for read results. New read results are stored in the buffer queue of a vision sensor. To acquire the next read results, turn ON 'Inspection Results Ack'. ON: The buffer for read results is enabled. OFF: The buffer for read results is disabled.

3 Inspection Results Ack To respond to receiving the latest read results. A vision sensor turns 'Results Valid' OFF when recognizing that this bit turns ON. If 'Buffer Results Enable' is turned ON, the next read results are read out from the buffer queue when receiving a response. ON: Read results are received. OFF:

4 Execute Command To load a job of the job ID specified to 'Command.' Until 'Command Completed' is turned ON, the ON state for this bit must be retained. ON: Job load is executed. OFF:

The following conditions must be satisfied to start job load properly: A vision sensor is set to offline by 'Set Offline.' A job of the job ID specified to 'Command' exists.

5 (Reserved)

6 (Reserved)

7 Set Offline To make a vision sensor offline while this bit is ON. ON: A vision sensor is set to offline. OFF:

0 4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection

4

1 0 (Reserved)

1

2

3

4

5

6

7

2 0 Set User Data To notify a vision sensor that the 'User Data' field was updated. A vision sensor updates data defined in the [Format Input Data] tab of a communication setting with the vision sensor setup tool when this bit is turned ON. ON: 'User Data' field update is notified. OFF:

1 (Reserved)

2 Clear Error To clear an error and error code signal. When multiple errors occur, the next error and error code are set by turning this bit OFF. ON: Error clear is executed. OFF:

3 Clear Exposure Complete

To turn 'Exposure Complete' OFF. 'Exposure Complete' does not turn ON while this bit is ON. ON: Exposure completion is cleared. OFF:

4 (Reserved)

5 (Reserved)

6 (Reserved)

7 (Reserved)

3 0 SoftEvent To enable a soft event trigger in a spreadsheet. A related software event in a spreadsheet is executed by turning this bit ON.1

2

3

4

5

6

7

Byte Data name Description (Application) 4 Command To specify job IDs (0 to 999).

5

6 (Reserved)

7

8 User Data 0 Data buffer to transfer data from a programmable controller to a vision sensor. This can be used for the following application: To update the data defined in the [Format Input Data] tab of a communication setting with the vision

sensor setup tool: Store data to be updated in the data format defined in the [Format Input Data] tab.

to to

495 User Data 487

Byte Bit Data name Description (Application)

4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection 101

10

Basic operation process for message (Explicit) communications The client function of UCMM message communications of an EtherNet/IP network interface module (RJ71EIP91) is used for message (Explicit) communications. Message (Explicit) communications send a message to a vision sensor, and the vision sensor that received the message sends a response. Unlike cyclic (Implicit) communications, data communications are performed without establishing a connection between an RJ71EIP91 and a vision sensor; therefore, it is suitable for operations that are not frequently performed.

(1): Turn ON 'EtherNet/IP communication start request' (Y10). (2): Store data in the buffer memory. (3): Command request (4): Command processing execution (5): Command response (6): Acquire the stored data.

RJ71EIP91

(1)

(2)

(3)

(5)

(6)

(4)

CPU module

Device

Device

Client

Buffer memory

Buffer memory

'UCMM data link request

command (No.1)' (Un\G393280 to Un\G394047)

'UCMM data link receive command

(No.1)' (Un\G394048 to Un\G394815)

Server

Input data

Vision sensor

Output data

2 4 EtherNet/IP CONNECTION 4.2 Basic Operations for an EtherNet/IP Connection

4

4.3 Setting the Vision Sensor Start the vision sensor setup tool to set the vision sensor.

Setting an IP address to a personal computer Set the IP address (192.168.3.3) to a personal computer.

Connecting the vision sensor Start the vision sensor setup tool to set the vision sensor. 1. Start the vision sensor setup tool.

Click the [Add] button.

2. Add the vision sensor to the network. Add the vision sensor to the network. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button.

4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor 103

10

3. Connect to the vision sensor. Click the [Connect] button to connect to the vision sensor.

4 4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor

4

Creating a new job As an example, set a CE mark for inspection target. 1. Create a new job.

Click the [New Job] button.

2. Adjust so that the lens captures an inspection target in [Set Up Image], and configure the settings to acquire the image. Click the [Set Up Image] button. Select the [Trigger] tab. Select "Industrial Ethernet." Click the [Live Video] button to adjust the image. After adjusting the image, click the [Live Video] button again.

4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor 105

10

3. Set a tool. Click the [Locate Part] button. Select "Pattern." Click the [Add] button.

4. Set a model on the position to be detected. Set a model. (CE mark is selected.) Click the [OK] button. Check that Name is "Pattern_1."

6 4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor

4

Configuring a communication setting 1. Configure the communication setting (EtherNet/IP).

Click the [Communication] button. Click the [Add Device] button.

2. Add the EtherNet/IP. Configure a device setting. Device: Other Protocol: EtherNet/IP Click the [OK] button. When the message "Protocol Service Change Required" appears, click the [OK] button.

4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor 107

10

Outputting to the programmable controller As an example, set PASS, FAIL, and the number of inspections to the output data. 1. Set data to be output from the vision sensor to the programmable controller.

Select the [Format Output Data] tab. Click the [Add] button.

2. Select the data to be output to the programmable controller. Select the following data. Pattern_1.Pass Pattern_1.Fail Job.Inspection_Count Click the [OK] button.

3. The output result to the programmable controller is displayed.

Output data to the programmable controller Message size (bytes): 6 The order to output can be changed by using the [Up] and [Down] buttons. As an example, sort as above. Pattern_1.Pass Pattern_1.Fail Job.Inspection_Count

8 4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor

4

Saving the job

The running job can be changed (loaded) to another job by prefixing a numeric value to a file name. For the procedure to change jobs, refer to the following section. Page 135 Changing jobs (loading another job)

1. Name the created job. Click the [Save Job] button. Click the [Save As] button.

2. Enter a file name and save the job. Enter an arbitrary file name. Click the [Save] button.

4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor 109

11

Restarting the vision sensor Turn the power of the vision sensor OFF and ON to restart.

3. Set startup options for the vision sensor. Click the [...] button under "Job." Select the checkbox of "Load Job on Startup." Select the file name saved in step 2. Select the checkbox of "Start the Sensor in Online Mode." Click the [OK] button.

1test.jop

1test.jop

0 4 EtherNet/IP CONNECTION 4.3 Setting the Vision Sensor

4

4.4 Setting a Programmable Controller Set parameters of a programmable controller and create a program in an engineering tool.

Setting a programmable controller Set parameters of a programmable controller. 1. Start an engineering tool. 2. Select a CPU module and a program language in the "New" screen.

Select [Project] [New]. The "New" screen appears. Set a CPU module and a program language. Series: RCPU Type: R08 Program Language: Ladder Click the [OK] button. Click the [OK] button.

3. Add a network module in the "Add New Module" screen. Right-click "Module Information" in the "Navigation" window, and select [Add New Module] in the shortcut menu. Set the items in "Module Selection." Module Type: Network Module Module Name: RJ71EIP91 Mounting Slot No.: 0 Start I/O No. Specification: Not Set

If "RJ71EIP91" is not in the pull-down list of "Module Name," install EtherNet/ IP Configuration Tool for RJ71EIP91 before setting a programmable controller. Click the [OK] button.

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 111

11

4. Set to use module labels. Click the [Setting Change] button.

Select "Yes" for "Use Module Label." Click the [OK] button.

Click the [OK] button.

2 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Precautions When selecting "Disable" for "Block assurance per connection," data inconsistency may occur. To prevent data inconsistency, use the following module FBs and select "Enable" for "Block assurance per connection." M+RJ71EIP91_Class1GetInputData M+RJ71EIP91_Class1SetOutputData For details on the module FB, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module Function Block Reference

The "Block assurance per connection" setting in the module parameter is not available for FX5-ENET/IP. '16: Perform data assurance' must be written in 'Block assurance specification per connection' (Un\G5000) of the buffer memory. For details, refer to the following: MELSEC iQ-F FX5-ENET/IP User's Manual

5. Set module parameters of the network module. Double-click the module name (RJ71EIP91) in the "Navigation" window. Select "Basic Setting," and set "Mode Settings," "IP Address," and "Subnet Mask." Mode Settings: Online IP Address: 192.168.3.60 Subnet Mask: 255.255.255.0

Select "Application Setting," and select "Enable" for "Block assurance per connection."

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 113

11

Writing parameters Write the set parameters to a programmable controller. (Page 129 Writing to the programmable controller)

4 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Configuring communication settings in EtherNet/IP Configuration Tool For cyclic (Implicit) communications, use EtherNet/IP Configuration Tool to set the EtherNet/IP network configuration and the trigger type, RPI, etc. for each connection in an EtherNet/IP network interface module (RJ71EIP91).

For details on EtherNet/IP Configuration Tool, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module User's Manual (Application)

Communication settings for an EtherNet/IP connection 1. Start EtherNet/IP Configuration Tool. 2. Enter an IP address.

In the "Add New Element" window, enter the IP address (192.168.3.60) that is set for an RJ71EIP91 in an engineering tool.

3. Add an EDS file. Select [Library] [Add]. The "EDS Management" screen appears.

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 115

11

Click the [Next] button.

Click the [Browse] button and specify a necessary EDS file. Click the [Next] button.

Check that the EDS file is added properly and click the [Next] button.

6 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Click the [Finish] button.

4. Add a vision sensor in the network configuration setting. In the [Device Library] tab, right-click a vision sensor under the tree of "EtherNet/IP Devices," and select [Insert in Configuration] from the shortcut menu.

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 117

11

In the [General] tab, set the connection number and IP address of the device. Number: 001 IP Address: 192.168.3.1 (IP address of the vision sensor)

Select the [Connections] tab to set Class 1 instance communications. Select "General," and set parameters as follows: Input Size: 100 bytes Input Mode: Point to Point Request Packet Interval (RPI): 10 ms Output Size: 100 bytes Output Mode: Point to Point Request Packet Interval (RPI): 10 ms

Set the packet size to be larger than the input/output data size. Click the [OK] button.

8 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Precautions Settings that are written to an EtherNet/IP network interface module (RJ71EIP91) in EtherNet/IP Configuration Tool are applied at either of the following timings: 'EtherNet/IP communication start request' (Y10) is turned from OFF to ON. An execution command of a module FB is turned from OFF to ON.

Check that the vision sensor is added in the network configuration setting.

5. Write the settings. Click (Online command.) on the command bar. Click (Download the current configuration in the module.) on the command bar.

Select the checkbox of "configuration.apa" of "File to Download." Click the [Download] button.

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 119

12

Creating a program The following shows the procedure to create a program. Page 120 Creating a program for cyclic (Implicit) communications Page 125 Creating a program for message (Explicit) communications

Creating a program for cyclic (Implicit) communications Create a program for controlling a vision sensor via cyclic (Implicit) communications.

Devices used in the program Device Device name Description M0 Image Capturing Trigger Enable

command 'Trigger Enable' (D1000.0) is turned ON and an image capturing trigger is enabled.

M1 Image Capturing Trigger command 'Trigger' (D1000.1) is turned ON and an image is captured when this device is turned ON.

M10 ID storage area initialization completion

Initializing the storage area for the ID is completed.

M11 Inspection Completed Inspection is completed.

M12 Inspection ID acquisition completion Acquiring the latest inspection ID is completed.

M100 Input execution command Processing for acquiring input data is performed when this device is turned ON.

M110 Input execution status The execution status of processing for acquiring input data is output. ON: Execution in progress OFF: Not executed

M111 Output execution status The execution status of processing for setting output data is output. ON: Execution in progress OFF: Not executed

M120 Input normal completion Processing for acquiring input data is normally completed if this device is ON.

M121 Output normal completion Processing for setting output data is normally completed if this device is ON.

M130 Input error completion Processing for acquiring input data is completed with an error if this device is ON.

M131 Output error completion Processing for setting output data is completed with an error if this device is ON.

M132 Communication error detection A communication error is detected if this device is ON.

M200 Communication stop command Communication is stopped when this device is turned ON.

D100 Image capturing ID storage area The image capturing ID used for verification is stored temporarily.

D101 Inspection ID storage area The inspection ID used for verification is stored temporarily.

D102 Inspection result of "Pattern_1" (Pass)

The inspection result of "Pattern_1" (Pass) is stored.

D103 Inspection result of "Pattern_1" (Fail) The inspection result of "Pattern_1" (Fail) is stored.

D104 Job.Inspection_Count The job inspection count is stored.

D1000.0 Trigger Enable An image capturing trigger is enabled while this device is ON.

D1000.1 Trigger An image is captured when this device is turned ON.

D1050.0 Trigger Ready The reception availability status of an image capturing trigger is stored. ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

D1050.1 Trigger Ack The reception status of an image capturing trigger is stored. ON: With an image capturing trigger OFF: Without an image capturing trigger

D1050.7 Online The online status of a vision sensor is stored. ON: Online OFF: Offline

D1050.9 Inspection Completed The status of this device is inverted every time when an inspection of a vision sensor is completed and the result is sent to a programmable controller.

D900 Input error code An error code is stored when processing for acquiring input data is completed with an error.

D905 Input connection communication error code

An error code is stored when a connection communication error occurs (when 200H is stored in 'Input error code' (D900)).

D910 Output error code An error code is stored when processing for setting output data is completed with an error.

D915 Output connection communication error code

An error code is stored when a connection communication error occurs (when 200H is stored in 'Output error code' (D910)).

D999 EtherNet/IP connection number The connection number of a connected device that is set in EtherNet/IP Configuration Tool is stored.

0 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Module labels used in the program

D1000 to D1049

Output data Devices in which output data is stored.

D1050 to D1099

Input data Devices in which input data is stored.

Module label Function Device EIP91_1 Module label

EIP91_1.bSts_ModuleReady Module Ready X0

EIP91_1.bSts_CommunicationReady Communication Ready X1F

EIP91_1.bSts_CommunicationDuringStartup EtherNet/IP communication in process X10

EIP91_1.bSet_CommunicationStartupRequest EtherNet/IP communication start request Y10

Device Device name Description

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 121

12

Program example

2 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

*1 For details on the module FB, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module Function Block Reference

(0): Enable an image capturing trigger on the vision sensor. (24): Request the start of the image capture to the vision sensor. (Turn 'Trigger Enable' (D1000.1) ON.) (29): Perform the processing for the completion of the image capture of the vision sensor. (50): Verify the image capturing ID and the inspection ID, and acquire the inspection result. (68): Check the communication status and turn ON the input execution command. (74): Acquire input data by using the module FB (M+RJ71EIP91_Class1GetInputData*1) of an RJ71EIP91. (326): Set output data by using the module FB (M+RJ71EIP91_Class1SetOutputData*1) of an RJ71EIP91. (578): Stop communication.

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 123

12

Timing chart of cyclic (Implicit) communications A timing chart when controlling a vision sensor by using a program of the program example via cyclic (Implicit) communications is shown below. To enable a trigger from a programmable controller, turn ON 'Trigger Enable' (RY0) of the Output Assembly. When 'Trigger' of the Output Assembly is turned ON while 'Trigger Ready' of the Input Assembly is ON, the status of the vision sensor is output to 'Trigger Ack' and 'Inspection Completed' of the Input Assembly. The status of 'Inspection Completed' of the Input Assembly is inverted at the completion of inspection.

Trigger Enable

Trigger

Trigger Ready

Trigger Ack

Inspection Completed

When the decode is completed, the ON/OFF status is changed.

Processing Processing

Processing Processing

Read image processing

Image inspection processing

Turn ON/OFF with the PLC (Program).

The vision sensor turns ON/OFF automatically.

4 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Creating a program for message (Explicit) communications Create a program for acquiring the job file name of a vision sensor via message (Explicit) communications by using native mode commands.

Devices used in the program

Module labels used in the program

Device Device name Description M0 UCMM data link request command

data initialization command Data of the UCMM data link request command is initialized when this device is turned ON.

M1 Native mode command string initialization command

The string of a native mode command is initialized when this device is turned ON.

M2 UCMM data link request command data store command

Data of the UCMM data link request command is stored when this device is turned ON.

M3 UCMM data link request command execution command

The UCMM data link request command is executed when this device is turned ON.

M10 Communication stop command UCMM communications are stopped when this device is turned ON.

M100 Communication error detection A communication error is detected if this device is ON.

D50 Native mode command terminator The line feed code of terminator 'CR/LF' is stored.

D90 Number of words in UCMM data link request data

The number of words in UCMM data link request data is stored.

D91 Remainder of dividing the number of words in UCMM data link request data

The remainder of dividing the number of words in UCMM data link request data is stored.

D100 Native mode command string The string of a native mode command is stored.

D151 UCMM data link request target IP address (upper)

"HC0A8 (192 168)" is stored as the IP address (upper) to which a UCMM data link request is sent.

D150 UCMM data link request target IP address (lower)

"H0301 (003 001)" is stored as the IP address (lower) to which a UCMM data link request is sent.

D152 UCMM data link request service number

The service code "H34 (SendNativeCmd)" is stored.

D153 UCMM data link request class ID The class ID "H78 (Vision Object)" is stored.

D154 UCMM data link request instance ID The instance ID "H1" is stored.

D155 UCMM data link request attribute ID The attribute ID "H0" is stored.

D190 Number of words in UCMM data link receive data

The number of words in UCMM data link receive data is stored.

D191 Remainder of dividing the number of words in UCMM data link receive data

The remainder of dividing the number of words in UCMM data link receive data is stored.

D200 UCMM data link receive data start address

UCMM data link receive data is stored.

Module label Function Device EIP91_1.bSts_ModuleReady Module Ready X0

EIP91_1.bSts_CommunicationReady Communication Ready X1F

EIP91_1.bSet_CommunicationStartupRequest EtherNet/IP communication start request Y10

EIP91_1.stnUCMMCommandArea[1].unSet_Request_TargetIPAddress_D UCMM data link request command (No.1) Target IP Address

U0\G393281

EIP91_1.stnUCMMCommandArea[1].uSet_Request_Service_D UCMM data link request command (No.1) Service U0\G393283

EIP91_1.stnUCMMCommandArea[1].uSet_Request_Class_D UCMM data link request command (No.1) Class U0\G393286

EIP91_1.stnUCMMCommandArea[1].uSet_Request_Instance_D UCMM data link request command (No.1) Instance U0\G393287

EIP91_1.stnUCMMCommandArea[1].uSet_Request_Attribute_D UCMM data link request command (No.1) Attribute U0\G393288

EIP91_1.stnUCMMCommandArea[1].uSet_Request_DataLength_D UCMM data link request command (No.1) Data length

U0\G393289

EIP91_1.stnUCMMCommandArea[1].unSet_Request_RequestData_D UCMM data link request command (No.1) Request data

U0\G393312

EIP91_1.bnSet_UCMMSendRequest_D[1] UCMM data link execution request U0\G393216.0

EIP91_1.bnSts_UCMMSendRequestAcceptance_D[1] UCMM data link execution request acceptance U0\G393232.0

EIP91_1.bnSts_UCMMSendCompletion_D[1] UCMM data link execution completion U0\G393248.0

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 125

12

EIP91_1.stnUCMMCommandArea[1].uResult_Response_ResultStorageArea_ D

UCMM data link receive command (No.1) Result storage area

U0\G394048

EIP91_1.stnUCMMCommandArea[1].unResult_Response_ReceiveData_D UCMM data link receive command (No.1) Receive data

U0\G394080

EIP91_1.stnUCMMCommandArea[1].uResult_Response_DataLength_D UCMM data link receive command (No.1) Data length

U0\G394057

Module label Function Device

6 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

Program example

4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller 127

12

(0): Perform the processing for starting communications. (4): Initialize data of the UCMM data link request command. (17): Initialize the native mode command string ("GF"). (25): Store data of the UCMM data link request command. (77): Perform UCMM communications. (86): Store response data and reset the command request.

8 4 EtherNet/IP CONNECTION 4.4 Setting a Programmable Controller

4

4.5 Writing Data to a Programmable Controller Write the parameters and program set in an engineering tool to the programmable controller.

Writing to the programmable controller

Restarting the programmable controller After writing the parameters and program, reset the programmable controller and switch to RUN.

1. Turn ON the programmable controller. 2. Write parameters and program to the programmable controller in the "Online Data Operation" screen.

Select [Online] [Write to PLC]. The "Online Data Operation" screen appears. Click the [Parameter + Program] button. Click the [Execute] button.

4 EtherNet/IP CONNECTION 4.5 Writing Data to a Programmable Controller 129

13

4.6 Checking Operations Check the operation by controlling the vision sensor using the programmable controller. Page 130 Checking operations of cyclic (Implicit) communications Page 136 Checking operations of message (Explicit) communications

Checking operations of cyclic (Implicit) communications Use a created program to check the operation. (Page 120 Creating a program for cyclic (Implicit) communications)

Making the vision sensor online Make the vision sensor online and start the communication with the programmable controller.

Check that the operating status is "Online."

0 4 EtherNet/IP CONNECTION 4.6 Checking Operations

4

Enabling a trigger on the vision sensor Enable a trigger on the vision sensor to acquire the inspection results. 1. Display device values.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M0" for "Device Name". Click the [Start Monitoring] button.

2. Enable a trigger on the vision sensor. Turn "M0" ON to turn 'Trigger Enable' (D1000.0) ON.

3. Trigger a device. Turn "M1" ON to turn 'Trigger' (D1000.1) ON.

4 EtherNet/IP CONNECTION 4.6 Checking Operations 131

13

Checking inspection results Check the inspection results. 1. Check the completion of the inspection.

Enter 'D1050' for "Device Name." Click the [Start Monitoring] button. Check that the bit of 'Inspection Completed' (D1050.9) is changed (toggled).

2. Check the inspection results. Check the following information. 'Job PASS' (D1058.0): This bit turns

ON when the set inspection target is detected in the captured image.

'Job FAIL' (D1059.0): This bit turns ON when the set inspection target is not detected in the captured image.

'Number of jobs inspected' (D1060): The number of times the device is triggered is stored.

2 4 EtherNet/IP CONNECTION 4.6 Checking Operations

4

Changing a recognition parameter When locating a target object using the pattern in the location tool, the rotation tolerance of the target object can be changed to 90.

Parameter items need to be added to the list in the [Format Input Data] tab in advance to change parameter values. More than one parameter item can be selected.

1. Make the vision sensor offline with the vision sensor setup tool. 2. Add parameter items to the list in the [Format Input Data] tab.

Click the [Communication] button. Select the [Format Input Data] tab and click the [Add] button.

Select "Pattern_1.Rotation Tolerance." Click the [OK] button.

3. Save the job and make the vision sensor online. (Page 109 Saving the job)

4 EtherNet/IP CONNECTION 4.6 Checking Operations 133

13

4. Set "Pattern_1.Rotation Tolerance" as a parameter to be changed. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'D1000' for "Device Name." Click the [Start Monitoring] button. Enter '90' for 'User Data' (D1004) of the Output Assembly.

5. Change parameter values. Turn 'Set User Data' (D1001.0) of the Output Assembly ON.

Enter 'D1050' for "Device Name." By completing the settings, 'Set User Data Ack' (D1051.0) of the Input Assembly turns ON. After that, turn OFF 'Set User Data' (D1001.0).

6. Trigger a device. Enter 'D1000' for "Device Name." Turn 'Trigger' (D1000.1) of the Output Assembly ON.

4 4 EtherNet/IP CONNECTION 4.6 Checking Operations

4

Changing jobs (loading another job) The following shows the procedure to load the job file "1Test." The number '1' prefixed to the file name indicates an ID. By setting this ID number to 'Command' (D1002) of the Output Assembly, the job ("1Test") can be loaded.

To load a job, the file name of the job need to begin with an ID number. When loading a job, make a vision sensor offline.

1. Set an ID number of a job. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter 'D1000' for "Device Name." Click the [Start Monitoring] button. Enter '1' for 'Command' (D1002) of the Output Assembly.

2. Change jobs (load another job). Turn ON 'Set Offline' (D1000.7) of the Output Assembly to make the vision sensor offline. Turn ON 'Execute Command' (D1000.4) of the Output Assembly to load a job.

Enter 'D1050' for "Device Name." When the loading of the job is completed, 'Command Completed' (D1050.D) of the Input Assembly is turned ON. After that, turn OFF 'Execute Command' (D1000.4) and 'Set Offline' (D1000.7).

4 EtherNet/IP CONNECTION 4.6 Checking Operations 135

13

Checking operations of message (Explicit) communications Acquire response data by sending native mode commands to a vision sensor from a programmable controller. Use a created program to check the operation. (Page 125 Creating a program for message (Explicit) communications)

Making the vision sensor offline Select [Sensor] [Online] in the vision sensor setup tool to set the online status to offline.

Checking read results Check the execution result of native mode commands in an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor] with an engineering tool. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M0" for "Device Name." Click the [Start Monitoring] button.

2. Prepare transmission data of the UMCC data link request command and native mode commands. Turn ON 'UCMM data link request command data initialization command' (M0), 'Native mode command string initialization command' (M1), then 'UCMM data link request command data store command' (M2).

3. Check command length. Enter "D100" for "Device Name." Check that the native mode command "GF" is displayed in "String" of "D100." Check that the line feed code of terminator "2573" (CR/LF) is displayed in "Current Value" of "D101."

4. Execute the native mode command. Enter "M0" for "Device Name." Turn 'UCMM data link request command execution command' (M3) ON.

6 4 EtherNet/IP CONNECTION 4.6 Checking Operations

4

5. Check response data. Enter "D200" for "Device Name." Check that the file name "1test.job" is displayed in "String" of "D202" to "D206."

4 EtherNet/IP CONNECTION 4.6 Checking Operations 137

138

REVISIONS *The manual number is given on the bottom left of the back cover.

Japanese manual number: BCN-P5999-0860-F

2017 MITSUBISHI ELECTRIC CORPORATION

Revision date *Manual number Description May 2017 BCN-P5999-0861-A First edition

February 2018 BCN-P5999-0861-B Added or modified parts Chapter 1, Chapter 2, Chapter 3

June 2018 BCN-P5999-0861-C Added or modified parts Section 1.3, Section 1.6, Section 2.3, Section 2.6

March 2019 BCN-P5999-0861-D Added or modified parts Section 1.6, Section 2.6, Section 3.6

January 2020 BCN-P5999-0861-E Added or modified parts INTRODUCTION, RELEVANT MANUALS

July 2021 BCN-P5999-0861-F Added or modified parts SAFETY PRECAUTIONS, CONDITIONS OF USE FOR THE PRODUCT, INTRODUCTION, RELEVANT MANUALS, TERMS, Section 1.2, Section 1.4, Section 2.2, Section 2.4, Chapter 4

This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.

TRADEMARKS Cognex and In-Sight are either registered trademarks or trademarks of Cognex Corporation. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies. In some cases, trademark symbols such as '' or '' are not specified in this manual.

139

14

0

BCN-P5999-0861-F(2107)

Cognex Corporation www.cognex.com

Specifications subject to change without notice.

When exported from Japan, this manual does not requir

Manualsnet FAQs

If you want to find out how the VS20M-11F310 Mitsubishi works, you can view and download the Mitsubishi VS20M-11F310 Sensor Connection Guide on the Manualsnet website.

Yes, we have the Connection Guide for Mitsubishi VS20M-11F310 as well as other Mitsubishi manuals. All you need to do is to use our search bar and find the user manual that you are looking for.

The Connection Guide should include all the details that are needed to use a Mitsubishi VS20M-11F310. Full manuals and user guide PDFs can be downloaded from Manualsnet.com.

The best way to navigate the Mitsubishi VS20M-11F310 Sensor Connection Guide is by checking the Table of Contents at the top of the page where available. This allows you to navigate a manual by jumping to the section you are looking for.

This Mitsubishi VS20M-11F310 Sensor Connection Guide consists of sections like Table of Contents, to name a few. For easier navigation, use the Table of Contents in the upper left corner.

You can download Mitsubishi VS20M-11F310 Sensor Connection Guide free of charge simply by clicking the “download” button in the upper right corner of any manuals page. This feature allows you to download any manual in a couple of seconds and is generally in PDF format. You can also save a manual for later by adding it to your saved documents in the user profile.

To be able to print Mitsubishi VS20M-11F310 Sensor Connection Guide, simply download the document to your computer. Once downloaded, open the PDF file and print the Mitsubishi VS20M-11F310 Sensor Connection Guide as you would any other document. This can usually be achieved by clicking on “File” and then “Print” from the menu bar.