Contents

Mitsubishi CF37-LR Code Reader Connection Guide PDF

1 of 156
1 of 156

Summary of Content for Mitsubishi CF37-LR Code Reader Connection Guide PDF

Code Reader Connection Guide

-CF26-SR -CF26-LR -CF37-SR -CF37-LR

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 touching the code reader, be sure to touch an electric conductor such as grounded metal to

discharge the static electricity from your body. Otherwise, damage or faulty operation of the code reader may occur.

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 code

reader. 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.

CAUTION Do not clean the code reader 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.

PRECAUTIONS FOR USE Observe the following precautions when installing and operating the code reader, to reduce the risk of injury or equipment damage: This device requires the use of an LPS or NEC class 2 power supply. To reduce the risk of damage or malfunction due to over-voltage, line noise, electrostatic discharge (ESD), power surges, or

other irregularities in the power supply, route all cables away from high-voltage power sources. A code reader does not contain user-serviceable parts. Do not make electrical or mechanical modifications to a code

reader. Unauthorized modifications may void your warranty.

Changes or modifications not expressly approved by the party responsible for regulatory compliance could void the user's authority to operate the equipment.

If the bend radius or service loop is smaller than 10 times of the cable diameter, the cable may cause cable shielding degradation, cable damage, or wear out in a short period. The bend radius must begin at least 152.4 mm from the connector.

Use this device in accordance with this manual.

3

4

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

i) where any problem, fault or failure occurring in the code reader, 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 code reader for the case of any problem, fault or failure occurring in the code reader.

(2) This code reader 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 CODE READER 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 CODE READER. ("Prohibited Application") Prohibited Applications include, but not limited to, the use of the code reader 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 code reader. 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 code reader in one or more of the Prohibited Applications, provided that the usage of the code reader 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 code readers 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 code reader trouble and system trouble caused by DoS attacks, unauthorized access, computer viruses, and other cyberattacks.

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

Available code readers

This manual uses a code reader CF26 as an example to show the system configuration and setting procedures. A code reader CF37 can be set in the same manner as a CF26.

Installation To connect a code reader, the following must be installed on a networked personal computer.

DataMan Setup Tool for MELSENSOR This is a setup tool for a code reader. Download DataMan Setup Tool for MELSENSOR 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 settings between a programmable controller and a code reader with an engineering tool, registering a profile to the engineering tool is required. A profile is data that stores information of a connected device (such as a model name.) By registering the profile to an engineering tool, the code reader is added in the "Ethernet Configuration" window or 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 code reader from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

EDS file Download the EDS file for a code reader from the Mitsubishi Electric FA website. www.MitsubishiElectric.co.jp/fa

Reading target This manual explains the procedures for reading the QR Code as shown below as a setting example.

: Connectable, : Not connectable

Model Connection to a programmable controller Connection to a GOT

CC-Link IE Field Network Basic

SLMP RS-232 I/O EtherNet/IP RS-232

CF26-SR

CF26-LR

CF37-SR

CF37-LR

5

6

ABCDEFG01234

C O

N TE

N TS

CONTENTS SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 PRECAUTIONS FOR USE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 GENERIC TERMS AND ABBREVIATIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

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

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Registering a profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

CHAPTER 2 SLMP SCANNER CONNECTION 31 2.1 System Configuration Example for Connecting a Code Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.2 Basic Operations for an SLMP Scanner Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Basic operation process for an SLMP scanner connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Basic operations for an SLMP scanner connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Signals used for an SLMP scanner connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

2.3 Setting the Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 2.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Registering a profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

2.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

DMCC Commands Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

CHAPTER 3 RS-232 CONNECTION 55 3.1 System Configuration Example for Connecting a Code Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.2 Setting the Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.3 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Operation procedure for a predefined protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Operation procedure for a nonprocedural protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

7

8

3.4 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.5 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

CHAPTER 4 RS-232 CONNECTION (GOT) 77 4.1 System Configuration Example for Connecting a Code Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

4.2 Setting the Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.3 Setting a GOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.4 Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 4.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

CHAPTER 5 I/O CONNECTION 95 5.1 System Configuration Example for Connecting a Code Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

5.2 Setting the Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

5.4 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.5 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

CHAPTER 6 EtherNet/IP CONNECTION 111 6.1 System Configuration Example for Connecting a Code Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Connecting and wiring a code reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

6.2 Basic Operations for an EtherNet/IP Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Basic operation process for cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Input/Output Assemblies used for cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Basic operation process for message (Explicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

6.3 Setting the Code Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 6.4 Setting a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Setting a programmable controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Writing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Configuring Communication Settings in EtherNet/IP Configuration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

6.5 Writing Data to a Programmable Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.6 Checking Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Checking operations of cyclic (Implicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Checking operations of message (Explicit) communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151 TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152

9

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.

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

GENERIC TERMS AND ABBREVIATIONS Unless otherwise specified, this manual uses the following generic terms and abbreviations.

Manual name [Manual number] Description Available form Code Reader Connection Guide [BCN-P5999-1074] (this manual)

Procedures for connecting a code reader to a MELSEC programmable controller to control a code reader through a CC-Link IE Field Network Basic connection, an SLMP connection, an RS-232 connection or an I/O connection

e-Manual PDF

Code Reader Setting Guide [BCN-P5999-1258]

Basic operations of DataMan Setup Tool for MELSENSOR e-Manual PDF

Code Reader CF26 User's Manual [SH-082092ENG]

Functions, installation methods, system configuration, and required hardware components etc. of a code reader CF26

e-Manual PDF

Code Reader CF37 User's Manual [SH-082325ENG]

Functions, installation methods, system configuration, and required hardware components etc. of a code reader CF37

e-Manual PDF

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.

Code reader setup tool DataMan Setup Tool for MELSENSOR. A tool for setting a code reader.

Engineering tool GX Works3. A tool for setting, programming, debugging, and maintenance of programmable controller.

EtherNet/IP Configuration Tool EtherNet/IP Configuration Tool for RJ71EIP91

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.

Generic term/abbreviation Description CPU module A MELSEC iQ-R series CPU module

DMCC An abbreviation for DataMan Control Commands

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

10

1 CC-Link IE Field Network Basic CONNECTION This chapter explains the procedure for connecting a code reader to a programmable controller and controlling the code reader with a CC-Link IE Field Network Basic connection.

For the specifications and troubleshooting of CC-Link IE Field Network Basic, refer to the following: CC-Link IE Field Network Basic Reference Manual

1.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF26 User's Manual Code Reader CF37 User's Manual

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool Code reader profile for engineering tool Code Reader setup tool

(COGNEX product) (COGNEX product)

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

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF26-SR

Programmable controller CPU module: R04CPU

Engineering tool GX Works3

Code reader profile for engineering tool*1

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05,

10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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 Code Reader 11

12

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a programmable controller, and connecting to a CC-Link IE Field Network Basic connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a programmable controller first, or at the same time as a code reader.

1. Connect the breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

2. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

3. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

4. Connect the code reader to a programmable controller and a personal computer via the switching hub.

5. Turn the power of the system ON.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

24 VDC power supply

24 VDC (Red)

GND (Black)

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

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 (code reader) using link devices. Remote input and output (RX and RY), 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 code reader 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 code reader.

RX, RWr

RY, RWw

RX, RWr

RY, RWw

Device

Device

Link refresh

Link refresh

Link scan

Status block

Control block

Output data 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 For details on each signal to control a code reader, refer to DataMan Industrial Protocols Manual. DataMan Industrial Protocols Manual can be opened by clicking "CF Industrial Protocols Manual" in the help of DataMan Setup Tool for MELSENSOR.

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

Remote I/O signals (RY/RX) The following shows the I/O signals for a master station (programmable controller) in a CC-Link IE Field Network Basic connection.

Control blocks (RY) Control blocks (RY) are output signals for a master station (programmable controller) to control a code reader.

*1 Bits 24 to 31 are virtual discrete input of the code reader. When the bit turns from OFF to ON, an action associated with the bit is executed. After the execution, the code reader turns ON the corresponding 'Soft Event Ack' in status blocks to show the action is completed.

*2 Do not execute 'Software Event' that changes code reader settings while processing the trigger. Changing settings while capturing an image or decoding may cause an unexpected result.

*3 The execution result of the DMCC command cannot be acquired.

Bit Data name Description (Application) 0 Trigger Enable To enable an image capturing trigger by 'Trigger' signal for CC-Link IE Field Network Basic

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

1 Trigger To trigger image capturing. 'Trigger Ready' bit needs to be ON before generating an image capturing trigger. ON: image capturing trigger is started. OFF:

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

3 Results Ack To respond to receiving the latest read results. A code reader turns 'Results Available' 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 to 23 (Reserved)

24 Soft Event*1*2 To register a code

25 To register a match string

26 To register focus

27 To register brightness

28 To cancel registration

29 (Reserved)

30 To execute a DMCC command*3

31 To set a match string

32 to 63 (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 code reader (status).

*1 These bits turn ON to show that a code reader completes soft event actions. These bits remain ON until their corresponding 'Soft Event' bits in control blocks are turned OFF.

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 code reader recognizes 'Trigger' is ON. Until 'Trigger' is turned OFF, this bit remains ON. ON: An image capturing trigger is received. OFF:

2 Acquiring This bit shows that a code reader is capturing an image. For a code reader CF26, this bit is '(Reserved).'

3 Missed Acq This bit shows that image capturing is failed. When the next image capturing trigger is generated, this bit is turned OFF. ON: Image capturing is failed. OFF:

4 to 7 (Reserved)

8 Decoding This bit shows that a code reader is decoding.

9 Decode Complete Toggle The status of this bit is inverted every time when decoding is completed and read results become available.

10 Results Buffer Overrun This bit shows that a code reader 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 Available This bit shows that a series of decode results is available (the Result ID, Result Code, Result Data Length, and Result Data fields contain valid data). Until 'Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

12 to 14 (Reserved)

15 General Fault This bit turns ON when an error occurs in soft event operation. Until the next soft event succeeds or 'Trigger Enable' is turned OFF and then ON again, this bit remains ON. ON: Error OFF: No error

16 to 23 (Reserved)

24 Soft Event Ack*1 Code registration is completed.

25 Match string registration is completed.

26 Focus registration is completed.

27 Brightness registration is completed.

28 Cancelling registration is completed.

29 (Reserved)

30 DMCC command execution is completed.

31 Match string setting is completed.

32 to 63 (Reserved)

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) The following shows the remote registers (RWr and RWw) used for the CC-Link IE Field Network Basic connection.

Output data blocks (RWr) Output data blocks (RWr) are link devices to send data from a code reader to a master station (programmable controller).

*1 This bit is enabled only when using the verification function compatible models.

Input data blocks (RWw) Input data blocks (RWw) are link devices for a code reader to receive data from a master station (programmable controller).

Word Data name Description (Application) 0 (Reserved)

1 Trigger ID Image capturing trigger ID. ID of an image capturing trigger to be generated next is stored. This is used to verify a generated image capturing trigger and 'Result Data' to be received later. The same value as this ID is returned as 'Result ID' of the corresponding read results.

2 Result ID Results ID. ID of the read results data which are corresponding to 'Trigger ID' is stored. This is used to verify an image capturing trigger and the corresponding read results data.

3 Result Code Result code. Bit 0: 1 = Read, 0 = No Read Bit 1: 1 = Passed validation, 0 = Failed validation Bit 2*1: 1 = Passed verification, 0 = Failed verification Bit 3: 1 = Image capturing trigger overrun Bit 4: 1 = Image capturing buffer overrun Bit 5 to 15:

4 Result Data Length Read results data length. The number of valid bytes of the 'Result Data' field is stored.

5 or later Result Data Read results data are stored.

Word Data name Description (Application) 0 (Reserved)

1 User Data Length The number of valid bytes of the 'User Data' field.

2 or later User Data User-defined data which can be used as input for capturing an image or decoding.

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

1

1.3 Setting the Code Reader This section explains the procedures for connecting the code reader with a CC-Link IE Field Network Basic connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF26". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Code Reader 17

18

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Select an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and optimize

brightness under the environment that is similar to the actual operating environment.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Code Reader

1

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed candidates varies

depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by unselecting the

checkbox of "Disable Untrained Symbologies." The scanning speed can be improved when

unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Code Reader 19

20

5. Set the output information of the QR Code in the "Format Data" step. Click the [Format Data] button. Select the checkbox of "Standard" for "Universal". Select the [Standard] tab.

Select " " in the [General] tab in "Data." Click the [Add] button. Select the checkbox of "CR/LF" for "Terminating Text".

6. Configure the protocol to be used (CC-Link IE Field Network Basic) in the "Communications" step. Click the [Communications] button. Select the checkbox of "CC-Link IE Field Basic" for "Industrial Protocols" in the [Ethernet] tab.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Code Reader

1

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

1 CC-Link IE Field Network Basic CONNECTION 1.3 Setting the Code Reader 21

22

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

Registering a profile Register a profile of the code reader in an engineering tool.

Before registering/deleting a profile, log on the personal computer as the user with the administrator authority, and close the project in advance.

1. Start an engineering tool. 2. Resister a profile of the code reader in the "Register Profile" screen.

Select [Tool] [Profile Management] [Register]. The "Register Profile" screen appears. Select the profile of the code reader 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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

2. Set module parameters in the module parameter setting screen of the CPU module. Double-click "Module Parameter" in the "Navigation" window. The "R04CPU Module Parameter" screen appears. Set "IP Address", "Subnet Mask" and "To Use or Not to Use CC-Link IEF Basic Setting". IP Address: 192.168.3.2 Subnet Mask: 255.255.255.0 To Use or Not to Use CC-Link IEF

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

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

24

"CC-Link IEF Basic Configuration" screen Detect the connected code reader. 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 code reader can be added by dragging and dropping "CF26" in "Code Reader" from "CC-Link IEF Basic Module (Mitsubishi Electric Corporation)" in "Module List." Parameter settings are as follows: "RX/RY Setting" - "Points": 64 (1 Occupied Station) "IP Address": 192.168.3.1 (IP address of a code reader set in DataMan Setup Tool for MELSENSOR)

Refresh settings

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

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

reader 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 for controlling the code reader by using the devices set in the refresh settings.

Devices used in the program Device Device name Description SM1536 Cyclic transmission status This device is turned ON when the cyclic transmission starts.

SD1536.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 Image Capturing Trigger Ready The reception status of 'Image Capturing Trigger Enable' (Y1000) is stored. ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

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

X1009 Decode Complete This device is inverted at the completion of decoding of a code reader.

Y1000 Image Capturing Trigger Enable 'Image Capturing Trigger' (Y1001) is enabled while this device is ON.

Y1001 Image Capturing Trigger An image is captured when this device is turned ON.

W4 Read results data length Code read results data length is stored.

W5 or later Read results data A code read results string is stored.

D3000 Read results data copy area Read results data in this area are intended to be used in a program or other device.

M0 Image Capturing Trigger Enable command

'Image Capturing Trigger Enable' (Y1000) is turned ON and an image capturing trigger is enabled while this device is turned ON.

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

M10 Area clearing execution This device is turned ON when clearing a read results data copy area.

M200 Communication condition satisfied flag (station No.1)

This device is turned ON while the cyclic transmission with the station No.1 is performed.

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

26

Program example

Precautions Use 'Image Capturing Trigger Ack' (X1001) to set an interlock when checking 'Decode Complete' (X1009).

(0): Set an interlock to check that the cyclic transmission is normally performed between the master station (programmable controller) and the station No.1 (code reader). When the cyclic transmission is normally performed, the program in line (4) and later are executed. (4): Enable an image capturing trigger on the code reader. (6): Request the start of the image capture to the code reader ('Image Capturing Trigger'(Y1001) is turned ON). (11): Perform the processing for the completion of the image capture of the code reader. (19): Clear a read results data copy area after the completion of decoding the code reader. In this program, output data block is set to 32 points, thus areas for 27 points in which read results data is stored are cleared. (26): Copy decoding results after clearing the read results data copy area.

(0) SM1536 SD1536.0

MC N0 M200

M200N0

(4) M0 Y1000

(6) M1 X1000 X1001 Y1001

SET Y1001

(11) X1001 X1009

RST Y1001

X1009 RST M1

(19) M1

FMOV K0 D3000 K27

SET M10

(26) M10

LEFTP W5 D3000 W4

RST M10

(33) MCR N0

(34) END

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

1

Timing chart of a CC-Link IE Field Network Basic connection A timing chart when 'Trigger (Image Capturing Trigger)' is turned ON by using a programmable controller is shown below. To enable the image capturing trigger from a programmable controller, turn ON 'Trigger Enable (Image Capturing Trigger Enable)' of a control block. When 'Trigger (Image Capturing Trigger)' of a control block is turned ON using a programmable controller while 'Trigger Ready (Image Capturing Trigger Ready)' of a status block is ON by turning ON 'Trigger Enable (Image Capturing Trigger Enable)', the status of a code reader is output to 'Trigger Ack (Image Capturing Trigger Ack)' and 'Decode Complete Toggle (Decode Complete)' of the status block. The status of 'Decode Complete Toggle (Decode Complete)' is inverted at the completion of decoding.

Code reader CF26

Code reader CF37

Trigger Enable

Trigger

Trigger Ready

Decode Complete Toggle

Trigger Ack

Turn ON/OFF with the PLC (Program).

The code reader turns ON/OFF automatically.

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

Processing Processing

Processing Processing

Read image processing

Decode processing

(Image Capturing Trigger Enable)

(Image Capturing Trigger)

(Image Capturing Trigger Ready)

(Image Capturing Trigger Ack)

(Decode Complete)

Trigger Enable

Trigger

Trigger Ready

Trigger Ack

Decode Complete Toggle

Turn ON/OFF with the PLC (Program).

The code reader turns ON/OFF automatically.

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

Processing Processing

Processing Processing

Read image processing

(Image Capturing Trigger Enable)

(Image Capturing Trigger)

(Image Capturing Trigger Ready)

(Image Capturing Trigger Ack)

(Decode Complete)

Decode processing

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

28

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 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.

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

1

1.6 Checking Operations Check operation by controlling the code reader using the programmable controller. Use a created program to check the operation. (Page 25 Creating a program)

Checking the communication status Check the communication status with a CC-Link IE Field Network Basic connection in DataMan Setup Tool for MELSENSOR.

Click the [Communications] button. Select the [Ethernet] tab. Check that "CC-Link IE Field Basic connection to 192.168.3.2 established" is displayed in "Status".

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

30

Checking read results Check the read results of a QR Code in the "Device/Buffer Memory Batch Monitor" window of an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

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

2. Enable a trigger on the code reader. Turn 'Image Capturing Trigger Enable command' (M0) ON. 'Image Capturing Trigger Enable' (Y1000) is turned ON.

3. Turn ON a trigger. Turn 'Image Capturing Trigger command' (M1) ON. 'Image Capturing Trigger' (Y1001) is turned ON.

4. Check the completion of decoding. Enter "X1000" for "Device Name". Check that 'Decode Complete' (X1009) is inverted.

5. Check the read results. Enter "W0" for "Device Name". "W5" to "W0A": Check "ABCDEFG01234" is displayed in "String". "W0B": Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value".

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 code reader to a programmable controller and controlling the code reader with an SLMP scanner connection.

2.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF26 User's Manual Code Reader CF37 User's Manual

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool Code reader profile for engineering tool Code Reader setup tool

(COGNEX product) (COGNEX product)

2 SLMP SCANNER CONNECTION 2.1 System Configuration Example for Connecting a Code Reader 31

32

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF26-SR

Programmable controller CPU module: R04CPU

Engineering tool GX Works3

Code reader profile for engineering tool*1

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05,

10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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 Code Reader

2

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a programmable controller and connecting to an SLMP scanner connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a programmable controller first, or at the same time as a code reader.

1. Connect the breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

2. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

3. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

4. Connect the code reader to a programmable controller and a personal computer via the switching hub.

5. Turn the power of the system ON.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

24 VDC power supply

24 VDC (Red)

GND (Black)

2 SLMP SCANNER CONNECTION 2.1 System Configuration Example for Connecting a Code Reader 33

34

2.2 Basic Operations for an SLMP Scanner Connection

Basic operation process for an SLMP scanner connection

Basic operations for an SLMP scanner connection With an SLMP scanner connection, a code reader reads a control block from a programmable controller in the poll interval set with DataMan Setup Tool for MELSENSOR, and performs processing according to the change of the bit information in the control block. 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 blocks), a code reader 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 code reader. Bit information is used for the

control instructions. A code reader is controlled by turning ON and OFF the devices set to the control block with a programmable controller.

Status block This block indicates the status of a code reader, and can be checked with bit information.

Input data block This block is used to input data including parameters from a programmable controller to a code reader. Word information is used to input data.

Output data block This block is used by a code reader to output data including decode results to a programmable controller. Word information is used to output data.

String command block This block is used to set DMCC commands to control a code reader. Word information is used to set the commands.

String command result block This block is used to output the results controlled by DMCC commands. Word information is used to output the results.

Code Reader

Set poll interval

While the trigger is ON, communication between data import and the completion of decoding 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 decode 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 code reader and accepting the trigger

Updating the status blocks and output data blocks

Updating the status blocks and output data blocks

Updating the status blocks and output data blocks

The code reader sends the decode results, and then sends the "Decode Complete Toggle status and the "Results Valid" status.

D ecode

Im port

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

2

Signals used for an SLMP scanner connection For details on each signal to control a code reader, refer to DataMan Industrial Protocols Manual. DataMan Industrial Protocols Manual can be opened by clicking "CF Industrial Protocols Manual" in the help of DataMan Setup Tool for MELSENSOR.

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

Data blocks Control blocks

*1 Bits 24 to 31 are virtual discrete input of the code reader. When the bit switched from 0 to 1, an action associated with the bit is executed. After the execution, the code reader turns ON the corresponding 'Soft Event Ack' in status blocks to show the action is completed.

*2 Do not execute 'Software Event' that changes code reader settings while processing the trigger. Changing settings while capturing an image or decoding may cause an unexpected result.

*3 The execution result of the DMCC command cannot be acquired.

Bit Data name Description (Application) 0 Trigger Enable To enable an image capturing trigger by 'Trigger' signal for SLMP scanner connection.

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

1 Trigger To trigger image capturing. 'Trigger Ready' bit needs to be ON before generating an image capturing trigger. ON: image capturing trigger is started. OFF:

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

3 Results Ack To respond to receiving the latest read results. A code reader turns 'Results Available' 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 to 15 (Reserved)

16 Set User Data To transfer the contents of the 'User Data' field to the buffer of a code reader. When the transfer is completed after reading 'User Data', a code reader turns ON 'Set User Data Ack'. ON: The 'User Data' field is transferred to the buffer of a code reader. OFF:

17 Initiate String Cmd To transfer the contents of the 'String Command' field to a code reader. When command results become available after reading and processing the 'String Command' field, a code reader turns ON 'String Cmd Ack'. ON: DMCC command is executed. OFF:

18 to 23 (Reserved)

24 Soft Event*1*2 To register a code

25 To register a match string

26 To register focus

27 To register brightness

28 To cancel registration

29 (Reserved)

30 To execute a DMCC command*3

31 To set a match string

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

36

Status blocks

*1 These bits turn ON to show that a code reader completes soft event actions. These bits remain ON until their corresponding 'Soft Event' bits in control blocks are turned OFF.

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 code reader recognizes 'Trigger' is ON. Until 'Trigger' is turned OFF, this bit remains ON. ON: An image capturing trigger is received. OFF:

2 Acquiring This bit shows that a code reader is capturing an image. For a code reader CF26, this bit is '(Reserved).'

3 Missed Acq This bit shows that image capturing is failed. When the next image capturing trigger is generated, this bit is turned OFF. ON: Image capturing is failed. OFF:

4 to 7 (Reserved)

8 Decoding This bit shows that a code reader is decoding.

9 Decode Complete Toggle The status of this bit is inverted every time when decoding is completed and read results become available.

10 Results Buffer Overrun This bit shows that a code reader 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 Available This bit shows that a series of decode results is available (the Result ID, Result Code, Result Data Length, and Result Data fields contain valid data). Until 'Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

12 to 14 (Reserved)

15 General Fault This bit turns ON when an error occurs in soft event operation. Until the next soft event succeeds or 'Trigger Enable' is turned OFF and then ON again, this bit remains ON. ON: Error OFF: No error

16 Set User Data Ack This bit turns ON when receiving new 'User Data.' Until 'Set User Data' is turned OFF, this bit remains ON. ON: Transferring the 'User Data' to the buffer of a code reader is completed. OFF:

17 String Cmd Ack This bit turns ON when the latest DMCC command is executed and command response becomes enabled. Until 'Initiate String Cmd' is turned OFF, this bit remains ON ON: DMCC command is executed. OFF:

18 to 23 (Reserved)

24 Soft Event Ack*1 Code registration is completed.

25 Match string registration is completed.

26 Focus registration is completed.

27 Brightness registration is completed.

28 Cancelling registration is completed.

29 (Reserved)

30 DMCC command execution is completed.

31 Match string setting is completed.

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

2

Input data blocks

Output data blocks

*1 This bit is enabled only when using the verification function compatible models.

String command blocks

String command result blocks

Word Data name Description (Application) 0 (Reserved)

1 User Data Length The number of valid bytes of the 'User Data' field.

2 or later User Data User-defined data which can be used as input for capturing an image or decoding.

Word Data name Description (Application) 0 (Reserved)

1 Trigger ID Image capturing trigger ID. ID of an image capturing trigger to be generated next is stored. This is used to verify a generated image capturing trigger and 'Result Data' to be received later. The same value as this ID is returned as 'Result ID' of the corresponding read results.

2 Result ID Results ID. ID of the read results which are corresponding to 'Trigger ID' is stored. This is used to verify an image capturing trigger and the corresponding read results.

3 Result Code Result code. Bit 0: 1 = Read, 0 = No Read Bit 1: 1 = Passed validation, 0 = Failed validation Bit 2*1: 1 = Passed verification, 0 = Failed verification Bit 3: 1 = Image capturing trigger overrun Bit 4: 1 = Image capturing buffer overrun Bit 5 to 15:

4 Result Data Length Read results data length. The number of valid bytes of the 'Result Data' field is stored.

5 or later Result Data Read results are stored.

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

1 or later String Command Command to be executed is stored in ASCII text. No Null termination required.

Word Data name Description (Application) 0 Result Code Result code of executing command is stored.

0: no error 1: reader initiated read-string 100: unidentified error 101: command invalid 102: parameter invalid or missing feature 103: checksum incorrect 104: parameter rejected/altered due to reader state 105: reader is offline

For details, refer to the command reference of DataMan Control Commands.

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

2 or later String Command Result The execution result of command is stored in ASCII text.

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

38

2.3 Setting the Code Reader This section explains the procedures for connecting the code reader with an SLMP scanner connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF26". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

2 SLMP SCANNER CONNECTION 2.3 Setting the Code Reader

2

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Set an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and optimize

brightness under the environment that is similar to the actual operating environment.

2 SLMP SCANNER CONNECTION 2.3 Setting the Code Reader 39

40

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed candidates varies

depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by unselecting the

checkbox of "Disable Untrained Symbologies." The scanning speed can be improved when

unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

2 SLMP SCANNER CONNECTION 2.3 Setting the Code Reader

2

5. Set the output information of the QR Code in the "Format Data" step. Click the [Format Data] button. Select the checkbox of "Standard" for "Universal". Select the [Standard] tab.

Select " " in the [General] tab in "Data." Click the [Add] button. Select the checkbox of "CR/LF" for "Terminating Text".

6. Configure the protocol to be used (SLMP scanner) in the "Communications" step. Click the [Communications] button. Select the checkbox of "SLMP" for "Industrial Protocols" in the [Ethernet] tab. Set "Industrial Protocols" of the SLMP. IP Address: 192.168.3.2*1

Host Port [hex]: 0x3001*2

Timeout [ms]: 1000*3

Poll Interval [ms]: 100*4

PLC Series: RCPU Network Number: 0 PC Number [hex]: 0xFF Destination Module: 0x3FF = Local station For setting the table (selected devices, offset,

and the number of devices), refer to the following: Page 42 Table settings in "Industrial Protocols"

2 SLMP SCANNER CONNECTION 2.3 Setting the Code Reader 41

42

*1 IP address of the programmable controller *2 Port number of the programmable controller *3 When the connection with the code reader is disconnected due to timeout, set a large value for the timeout. *4 The interval to monitor the programmable controller status can be shortened by setting a small value for the poll interval.

Table settings in "Industrial Protocols" Set values in "Selected Device," "Offset," and "Number of Devices" as follows:

Precautions The base representation for "Offset" differs depending on "PLC Series" and "Selected Device" to be selected. The displays of the base representation are as follows: Decimal: Display in decimal (Example: 15) Octal: Display in octal prefixed with '0' (Example: 017) Hexadecimal: Display in hexadecimal prefixed with '0x' (Example: 0xF)

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

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

Status D-Data Register 1002 2

PLC Input D-Data Register 1005 5

PLC Output D-Data Register 1010 100

Command D-Data Register 2000 100

Command Result D-Data Register 2100 100

2 SLMP SCANNER CONNECTION 2.3 Setting the Code Reader

2

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

Registering a profile Register a profile of the code reader in an engineering tool.

Before registering/deleting a profile, log on the personal computer as the user with the administrator authority, and close the project in advance.

1. Start an engineering tool. 2. Resister a profile of the code reader in the "Register Profile" screen.

Select [Tool] [Profile Management] [Register]. The "Register Profile" screen appears. Select the profile of the code reader obtained previously. Click the [Register] button.

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller 43

44

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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

2. Set module parameters in the module parameter setting screen of the CPU module. Double-click "Module Parameter" in the "Navigation" window. The "R04CPU 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 " " of "External Device Configuration". The "Ethernet Configuration" screen appears. (Page 45 The "Ethernet Configuration" screen) Click the [Apply] button to end the settings.

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

The "Ethernet Configuration" screen Detect the connected code reader. 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 code reader can be added by dragging and dropping "CF26" in "Code Reader" from "Ethernet Device (Mitsubishi Electric Corporation)" in "Module List." The parameter settings are as follows: "Protocol": TCP "PLC" - "IP Address": 192.168.3.2 (IP address of a programmable controller set in DataMan Setup Tool for

MELSENSOR) "PLC" - "Port No.": 12289 (0x3001) (Port number of a programmable controller set in DataMan Setup Tool

for MELSENSOR) "SensorDevice" - "IP Address": 192.168.3.1 (IP address of a code reader set in DataMan Setup Tool for

MELSENSOR)

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

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

reader 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 45

46

Creating a program Create a program for controlling a code reader by using the devices set in DataMan Setup Tool for MELSENSOR.

Devices used in the program Device Device name Description D1000.0 Image Capturing Trigger Enable 'Image Capturing Trigger' (D1000.1) is enabled while this device is ON.

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

D1000.3 Read results data Ack A code reader is notified that the device received the latest read results data when this device is turned ON.

D1002.0 Image Capturing Trigger Ready The reception status of 'Image Capturing Trigger Enable' (D1000.0) is stored. ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

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

D1002.9 Decode Complete This device is inverted at the completion of decoding of a code reader.

D1002.B Read results Available This device is turned ON when new read results data become available.

D1011 Image capturing trigger ID ID of an image capturing trigger to be generated next is stored.

D1014 Read results data length Code read results data length is stored.

D1015 or later Read results data A code read results string is stored.

D3000 Read results data copy area Read results data in this area are intended to be used in a program or other device.

M0 Image Capturing Trigger Enable command

'Image Capturing Trigger Enable' (D1000.0) is turned ON and an image capturing trigger is enabled while this device is turned ON.

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

M2 Read results Ack command 'Read results data Ack' (D1000.3) is turned ON when turning this device ON, and a code reader is notified that the device received the latest read result data.

M10 Area clearing execution This device is turned ON when clearing a read results data copy area.

M100 SLMP connection status This device is turned ON when the SLMP connection is established between a code reader and a programmable controller.

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

Program example 1 Check the completion of decoding in 'Decode Complete' (D1002.9).

Precautions Use 'Image Capturing Trigger Ack'(D1002.1) to set an interlock when checking 'Decode Complete' (D1002.9).

(0): Monitor the startup of a code reader. (4): Enable an image capturing trigger on the code reader. (7): Request the start of the image capture to the code reader ('Image Capturing Trigger'(D1000.1) is turned ON). (12): Perform the processing for the completion of the image capture of the code reader. (20): Clear a read results data copy area after the completion of decoding the code reader. In this program, output data block is set to 100 points, thus clear areas for 95 points in which read results data is stored. (28): Copy decoded read results after clearing the read results data copy area.

(0) <> D1011 K0 SET M100

(4) M0 M100 D1000.0

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

SET D1000.1

(12) D1002.1 D1002.9

RST D1000.1

D1002.9 RST M1

(20) M1

FMOVP K0 D3000 K95

SET M10

(28) M10

LEFTP D1015 D3000 D1014

RST M10

(35) END

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller 47

48

Program example 2 Check the completion of decoding in 'Read results Available' (D1002.B).

Precautions Use 'Image Capturing Trigger Ack'(D1002.1) to set an interlock when checking 'Read results Available' (D1002.B).

(0): Monitor the startup of a code reader. (4): Enable an image capturing trigger on the code reader. (7): Request the start of the image capture to the code reader ('Image Capturing Trigger'(D1000.1) is turned ON). (12): Perform the processing for the completion of the image capture of the code reader. (16)(19): Notify the code reader that the device received new read results data. (23): Clear a read results data copy area after the completion of decoding the code reader. In this program, output data block is set to 100 points, thus clear areas for 95 points in which read results data is stored. (33): Copy decoded read results after clearing the read results data copy area.

(0) <> D1011 K0 SET M100

(4) M0 M100 D1000.0

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

SET D1000.1

(12) D1002.1 D1002.B

RST D1000.1

RST M1

(16) M2 D1002.B

SET D1000.3

(19) D1002.B

RST D1000.3

RST M2

(23) D1002.9

FMOVP K0 D3000 K95

D1002.9 SET M10

(33) M10

LEFTP D1015 D3000 D1014

RST M10

(40) END

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller

2

Timing chart of SLMP scanner connection A timing chart when 'Trigger (Image Capturing Trigger)' of a control block is turned ON by using a programmable controller is shown below. To enable the image capturing trigger from a programmable controller, turn ON 'Trigger Enable (Image Capturing Trigger Enable)' of a control block. When 'Trigger (Image Capturing Trigger)' of a control block is turned ON using a programmable controller while 'Trigger Ready (Image Capturing Trigger Ready)' of a status block is ON by turning ON 'Trigger Enable (Image Capturing Trigger Enable)', the status of a code reader is output to 'Trigger Ack (Image Capturing Trigger Ack)' and 'Decode Complete Toggle (Decode Complete)' of the status block. The status of 'Decode Complete Toggle (Decode Complete)' is inverted at the completion of decoding.

Code reader CF26

Code reader CF37

Trigger Enable

Trigger

Trigger Ready

Decode Complete Toggle

Trigger Ack

Turn ON/OFF with the PLC (Program).

The code reader turns ON/OFF automatically.

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

Read image processing

Decode processing

(Image Capturing Trigger Enable)

(Image Capturing Trigger)

(Image Capturing Trigger Ready)

(Image Capturing Trigger Ack)

(Decode Complete)

Processing Processing

Processing Processing

Trigger Enable

Trigger

Trigger Ready

Decode Complete Toggle

Trigger Ack

Turn ON/OFF with the PLC (Program).

The code reader turns ON/OFF automatically.

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

Read image processing

Decode processing

(Image Capturing Trigger Enable)

(Image Capturing Trigger)

(Image Capturing Trigger Ready)

(Image Capturing Trigger Ack)

(Decode Complete)

Processing Processing

Processing Processing

2 SLMP SCANNER CONNECTION 2.4 Setting a Programmable Controller 49

50

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 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.

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

2 SLMP SCANNER CONNECTION 2.5 Writing Data to a Programmable Controller

2

2.6 Checking Operations Check operation by controlling the code reader using the programmable controller. Use a created program to check the operation. (Page 46 Creating a program)

Checking the communication status Check the communication status with an SLMP scanner connection in DataMan Setup Tool for MELSENSOR.

Click the [Communications] button. Select the [Ethernet] tab. Check that "SLMP Scanner connection to 192.168.3.2 established" is displayed in "Status".

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 51

52

Checking read results Check read results of a QR Code in an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

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

2. Enable a trigger on the code reader. Turn 'Image Capturing Trigger Enable command' (M0) ON. 'Image Capturing Trigger Enable' (D1000.0) is turned ON.

3. Turn ON a trigger. Turn 'Image Capturing Trigger command' (M1) ON. 'Image Capturing Trigger' (D1000.1) is turned ON.

4. Check the completion of decoding. Enter "D1000" for "Device Name". Program example 1: Check that 'Decode Complete' (D1002.9) is inverted. Program example 2: Check that 'Read results Available' (D10002.B) is turned ON.

5. Check the read results. "D1015" to "D1020": Check "ABCDEFG01234" is displayed in "String." "D1021": Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value".

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

2

DMCC Commands Control Control and set a code reader by using DMCC (DataMan Control Commands) command. For details on DMCC commands, refer to the command reference in the help of DataMan Setup Tool for MELSENSOR.

Creating a program Create a program using the following devices.

Devices used in the program

Program example Acquire the device name by sending the DMCC command "||>GET DEVICE.NAME".

Device Device name Description SM402 Startup ON When starting up a device, this device is turned OFF and ON once.

D100 Command Terminating Text The terminating text (CR/LF) is stored.

D2000 String Data Length The length of a DMCC command is stored.

D2001 Command Strings A DMCC command to be sent is stored.

(0): A DMCC command which acquires the device name is executed.

(0) SM402

MOV H0A0D D100

$+ "||>GET DEVICE.NAME" D100 D2001

LEN D2001 D2000

(39) END

2 SLMP SCANNER CONNECTION 2.6 Checking Operations 53

54

Checking read results Check the execution result of DMCC commands in an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. The "Device/Buffer Memory Batch Monitor" window appears. Enter "D2000" for "Device Name". Click the [Start Monitoring] button.

2. Check command length and string data length. Check the DMCC command data length "0014" is displayed in "Current Value" of "D2000". Check the DMCC command "||>GET DEVICE.NAME" is displayed in "String" of "D2001" to "D2009." Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value" of "D2010".

3. Execute the DMCC command. Enter "D1000" for "Device Name". Turn ON 'Initiate String Cmd' (D1001.1). After turning ON 'String Cmd Ack' (D1003.1), turn OFF 'Initiate String Cmd' (D1001.1).

4. Check the execution result of the DMCC command. Enter "D2100" for "Device Name". Check the length of the device name "E" is displayed in "Current Value" of "D2101". Check the device name (a name of the code reader used) "CF26-0000000" is displayed in "String" of "D2102" to "D2107." Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value" of "D2108".

2 SLMP SCANNER CONNECTION 2.6 Checking Operations

3

3 RS-232 CONNECTION This chapter explains the procedure for connecting a code reader to a programmable controller and controlling the code reader with an RS-232 connection.

3.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF26 User's Manual Code Reader CF37 User's Manual

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool Code Reader setup tool

RS-232

(COGNEX product) (COGNEX product)

3 RS-232 CONNECTION 3.1 System Configuration Example for Connecting a Code Reader 55

56

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF26-SR

Programmable controller CPU module: R04CPU Serial communication module: RJ71C24

Engineering tool GX Works3

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05, 10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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

3 RS-232 CONNECTION 3.1 System Configuration Example for Connecting a Code Reader

3

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a programmable controller and connecting to an RS-232 connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a code reader first.

1. Connect a breakout cable to an RS-232 connector (D-sub 9 Pin). Connect a breakout cable to an RS-232 connector (D-sub 9 Pin) as follows: TxD (white and yellow) to RD (RxD), RxD (brown) to SD (TxD), and GND (black) to SG. In addition, connect the RS-232 connector (D-Sub 9 Pin) as follows: ER (DTR) to DR (DSR), and RS (RTS) to CS (CTS).

2. Connect a breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

3. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

4. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

5. Connect the code reader to a programmable controller and a personal computer via the switching hub.

6. Turn the power of the system ON.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

ER(DTR) DR(DSR)

RS(RTS) CS(CTS)

1

2

3

4 4

5

6

6

7

7

8

8

9

24 VDC (Red)

24 VDC power

GND (Black)

TxD(White/Yellow) RxD(Brown)

GND (Black)

3 RS-232 CONNECTION 3.1 System Configuration Example for Connecting a Code Reader 57

58

3.2 Setting the Code Reader This section explains the procedures for connecting the code reader with an RS-232 connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF26". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

3 RS-232 CONNECTION 3.2 Setting the Code Reader

3

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Set an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and optimize

brightness under the environment that is similar to the actual operating environment.

3 RS-232 CONNECTION 3.2 Setting the Code Reader 59

60

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed candidates varies

depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by unselecting the

checkbox of "Disable Untrained Symbologies." The scanning speed can be improved when

unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

3 RS-232 CONNECTION 3.2 Setting the Code Reader

3

5. Set the output information of the QR Code in the "Format Data" step. Click the [Format Data] button. Select the checkbox of "Standard" for "Universal". Select the [Standard] tab.

Select " " in the [General] tab in "Data." Click the [Add] button. Select the checkbox of "CR/LF" for "Terminating Text".

3 RS-232 CONNECTION 3.2 Setting the Code Reader 61

62

6. Configure settings for communication (serial) in the "Communications" step. Click the [Communications] button. Select the [Serial] tab. Configure the "Serial Port Settings". Speed: 115200 Parity: None Data Bits: 8 Stop Bits: 1 RS 232 Inter-character Delay (ms): 0

If setting a value for the inter-character delay, set a suitable time for the connection target device.

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

3 RS-232 CONNECTION 3.2 Setting the Code Reader

3

3.3 Setting a Programmable Controller Set parameters of a programmable controller and create a program in an engineering tool. In RS-232 connection, two communication protocols can be used: a predefined protocol and a nonprocedural protocol.

Operation procedure for a predefined protocol

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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

3. Add an information 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: Information Module Module Name: RJ71C24 Mounting Slot No.: 0 Start I/O No. Specification: Not Set Click the [OK] button.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 63

64

4. Set module parameters in the module parameter setting screen of the information module. Double-click "Module Parameter" in the "Navigation" window. Set the module parameter. Communication protocol setting:

Predefined protocol Communication speed setting:

115200bps Data bit: 8

5. Set the predefined protocol support function. Select [Tool] [Predefined Protocol Support Function]. Select "Serial Communication Module" for "Module Type". Click the [OK] button.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller

3

6. Create a communication protocol for a serial communication module. Click (New). Click the [Add] button. Add a protocol. Type: Predefined Protocol Library Manufacturer: MITSUBISHI

ELECTRIC Model: MELSENSOR CF Series Protocol Name: Initialize Click the [OK] button.

7. Add a trigger to the communication protocol. Click the [Add] button. Add a protocol. Type: Predefined Protocol Library Manufacturer: MITSUBISHI

ELECTRIC Model: MELSENSOR CF Series Protocol Name: TRIGGER ON: RD

Data Click the [OK] button.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 65

66

Packet setting The following devices are set for packets of the protocol.

8. Set devices. Select [Edit] [Device Batch Setting]. Set devices to the configured protocol. Protocol No.: 1-2 Device No.: D200 Click the [OK] button. For devices that are set for packets of

the protocol, refer to the following: Page 66 Packet setting

9. Write to a programmable controller. Select [Online] [Write to Module]. Set the target module. Module Selection: RJ71C24 Target Memory: CPU Built-in Memory Click the [Execute] button.

Device Device name Description D200 Initialization Ack Status is stored when responding to an initialization protocol.

D201 Initialization Error Ack The error response data of an initialization protocol is stored.

D202 Reception Data Length The length of data received from a code reader is stored.

D203 to D1202 Reception Character Strings Data

The data of character strings received from a code reader is stored.

D1203 Trigger Error Ack The error response data of a trigger protocol is stored.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller

3

Creating a program Create a program for controlling the code reader by using the devices set in the predefined protocol support function.

Devices used in the program Device Device name Description M0 Initialization Protocol Execution Completed This device is turned ON when the execution of an initialization protocol is completed.

M1 Initialization Protocol Execution Failure This device is turned ON when the execution of an initialization protocol is failed.

M10 Trigger Protocol Execution Completed This device is turned ON when the execution of a trigger protocol is completed.

M11 Trigger Protocol Execution Failure This device is turned ON when the execution of a trigger protocol is failed.

M50 Initialization Protocol Execution command When this device is turned ON, an initialization protocol is executed and initialization is executed.

M51 Trigger Protocol Execution command When this device is turned ON, a trigger protocol is executed and an image is captured.

M101 Initialization Protocol Execution Completed flag This device is turned ON when the execution of an initialization protocol is completed.

M102 Initialization Protocol Execution Failure flag This device is turned ON when the execution of an initialization protocol is failed.

M103 Trigger Protocol Execution Completed flag This device is turned ON when the execution of a trigger protocol is completed.

M104 Trigger Protocol Execution Failure flag This device is turned ON when the execution of a trigger protocol is failed.

D10 Start Number of Control Data Control data is stored.

D12 Execution Protocol Number A protocol number to be executed is stored.

D100 Initialization Protocol Execution Result The execution result of an initialization protocol is stored.

D1500 Trigger Protocol Execution Result The execution result of a read trigger protocol is stored.

X1D Predefined Protocol Ready This device is turned ON when a predefined protocol is ready.

U0 Module The start I/O number of a module is stored.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 67

68

Program example

(0): Request the execution of an initialization protocol. (15): The processing for the completion of an initialization protocol execution is performed. (24): Request the execution command of a trigger protocol. (41): The processing for the completion of a trigger protocol execution is performed.

(0)

M50 X1D

MOV K1 D12

GP.CPRT CL

U0 K1 K1 D10 M0

(15)

M0 M1

SET M101

M1

SET M102

MOV D10 D100

(24)

M51 X1D M50 M101

MOV K2 D12

GP.CPRT CL

U0 K1 K1 D10 M10

(41)

M10 M11

SET M103

M11

SET M104

MOV D10 D1500

(50) END

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller

3

Operation procedure for a nonprocedural protocol

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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

3. Add an information 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: Information Module Module Name: RJ71C24 Mounting Slot No.: 0 Start I/O No. Specification: Not Set Click the [OK] button.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 69

70

4. Set module parameters in the module parameter setting screen of the information module. Double-click "Module Parameter" in the "Navigation" window. Set the module parameter. Communication protocol setting:

Nonprocedural protocol Communication speed setting:

115200bps Data bit: 8 Word/byte units designation: Byte

specification Receive end code designation: D0A

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller

3

Creating a program Create a program for controlling the code reader by using the devices set in the module parameters.

Devices used in the program Device Device name Description D0 DMCC Command Transmission CH

Designation This device is used for specifying the DMCC command transmission CH.

D2 DMCC Command Transmission Data Length

The DMCC command transmission data length is stored.

D11 DMCC Command Transmission Character Strings

The DMCC command transmission character strings are stored.

D100 Character Strings Reception CH Designation

This device is used for specifying the character strings reception CH.

D101 Character Strings Reception Result The result of received character strings is stored. Normal: 0 Error: error codes

D103 Allowance Number of Received Character Strings

The allowance number of received character strings is stored.

D200 Received Character Strings The received character strings are stored.

D500 DMCC Command Transmission Character Strings Terminating Text

The terminating text of character strings to be sent is stored.

X3 Received Character Strings Read Request

This device is turned ON while performing the read request of received character strings.

X4 Character Strings Reception Error Detection

This device is turned ON when a reception error is detected in character strings.

X20 DMCC Command Transmission Control

'DMCC Command Transmission command' (M50) is turned ON when this device is turned ON.

X21 DMCC Command Transmission Flag Reset

'DMCC Command Transmission Completed flag' (M101) and 'DMCC Command Transmission Failure flag' (M102) are reset when this device is turned ON.

X100 Character Strings Reception Flag Reset

'Character Strings Reception Completed flag' (M35) or 'Character Strings Reception Failure flag' (M36) is reset when this device is turned ON.

M0 DMCC Command Transmission Completed

This device is turned ON when a DMCC command transmission is completed.

M1 DMCC Command Transmission Failure

This device is turned ON when a DMCC command transmission is failed.

M30 Character Strings Reception Completed

This device is turned ON when the reception of character strings is completed.

M31 Character Strings Reception Failure This device is turned ON when the reception of character strings is failed.

M35 Character Strings Reception Completed flag

This device is turned ON when the reception of character strings is completed.

M36 Character Strings Reception Failure flag

This device is turned ON when the reception of character strings is failed.

M50 DMCC Command Transmission command

When this device is turned ON, a DMCC command transmission is executed.

M51 Character Strings Reception command

When this device is turned ON, the reception of character strings is executed.

M101 DMCC Command Transmission Completed flag

This device is turned ON when a DMCC command transmission is completed.

M102 DMCC Command Transmission Failure flag

This device is turned ON when a DMCC command transmission is failed.

U0 Module The start I/O number of a module is stored.

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 71

72

Program example (DMCC command transmission)

(0)(3): Request a DMCC command transmission. (35)(44): The processing for the completion of a DMCC command transmission is performed.

(0)

X20

PLS M50

(3)

M50

MOV H0A0D D500

$+ "||>trigger on" D500 D11

FMOV K0 D200 K50

MOV K1 D0

LEN D11 D2

G.OUTPUT U0 D0 D11 M0

(35)

M0 M1

SET M101

M1

SET M102

RST M50

(44)

X21

RST M101

RST M102

(47) END

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller

3

Program example (The reception of character strings)

(0): Request for receiving character strings. (24)(31): The processing for the completion of receiving character strings is performed.

(0)

X3 M30

MOV K1 D100

X4

FMOV K0 D101 K2

MOV K50 D103

FMOV K0 D200 K50

G.INPUT U0 D100 D200 M30

(24)

M30 M31

SET M35

M31

SET M36

(31)

X100

RST M35

RST M36

(34) END

3 RS-232 CONNECTION 3.3 Setting a Programmable Controller 73

74

3.4 Writing Data to a Programmable Controller Write the parameters 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.

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

3 RS-232 CONNECTION 3.4 Writing Data to a Programmable Controller

3

3.5 Checking Operations Check operation by controlling the code reader using the programmable controller. Use a created program to check the operation. (Page 67 Creating a program, Page 71 Creating a program)

Checking read results (predefined protocol) Check the read results of a QR Code in the "Device/Buffer Memory Batch Monitor" window of an engineering tool.

By turning 'Trigger Protocol Execution command' (M51) OFF and then ON, the code can be read again.

1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M50" for "Device Name". Click the [Start Monitoring] button.

2. Enable a trigger on the code reader. Turn ON 'Initialization Protocol Execution command' (M50). 'Initialization Protocol Execution Completed flag' (M101) is turned ON.

3. Turn ON a trigger. Turn OFF 'Initialization Protocol Execution command' (M50). Turn ON 'Trigger Protocol Execution command' (M51). 'Trigger Protocol Execution Completed flag' (M103) is turned ON.

4. Check the read results. Enter "D200" for "Device Name." "D202": Check the length of the read character string "C" (12) is stored in "Current Value". "D203" to "D208": Check "ABCDEFG01234" is displayed in "String".

3 RS-232 CONNECTION 3.5 Checking Operations 75

76

Checking read results (nonprocedural protocol) Check the read results of a QR Code in the "Device/Buffer Memory Batch Monitor" window of an engineering tool.

By turning 'DMCC Command Transmission Control' (X20) OFF and then ON, the code can be read again.

1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. The "Device/Buffer Memory Batch Monitor" window appears. Enter "X20" for "Device Name". Click the [Start Monitoring] button.

2. Turn ON a trigger. Turn ON 'DMCC Command Transmission Control' (X20).

3. Check the read results. Enter "D200" for "Device Name." "D200" to "D205": Check "ABCDEFG01234" is displayed in "String". "D206": Check the terminating text "0A0D" (CR/LF) is stored in "Current Value".

3 RS-232 CONNECTION 3.5 Checking Operations

4

4 RS-232 CONNECTION (GOT) This chapter explains the procedure for connecting a code reader to a GOT and controlling the code reader with an RS-232 connection.

4.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF26 User's Manual Code Reader CF37 User's Manual

GOT

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool Code Reader setup tool

RS-232

(COGNEX product) (COGNEX product)

4 RS-232 CONNECTION (GOT) 4.1 System Configuration Example for Connecting a Code Reader 77

78

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF26-SR

Programmable controller CPU module: R04CPU

Engineering tool GX Works3

Engineering tool GT Designer3

GOT GT27-SVGA

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05, 10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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

4 RS-232 CONNECTION (GOT) 4.1 System Configuration Example for Connecting a Code Reader

4

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a GOT and connecting to an RS-232 connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a code reader first.

1. Connect a breakout cable to an RS-232 connector (D-sub 9 Pin). Connect a breakout cable and an RS-232 connector (D-sub 9 Pin) as follows: TxD (white and yellow) to RD (RxD), RxD (brown) to SD (TxD), and GND (black) to SG. In addition, connect the RS-232 connector (D-Sub 9 Pin) as follows: ER (DTR) to DR (DSR), and RS (RTS) to CS (CTS).

2. Connect the breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

3. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

4. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

5. Connect the code reader to a GOT.

6. Turn the power of the system ON.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

ER(DTR) DR(DSR)

RS(RTS) CS(CTS)

1

2

3

4 4

5

6

6

7

7

8

8

9

24 VDC (Red)

24 VDC power

GND (Black)

TxD(White/Yellow) RxD(Brown)

GND (Black)

4 RS-232 CONNECTION (GOT) 4.1 System Configuration Example for Connecting a Code Reader 79

80

4.2 Setting the Code Reader This section explains the procedures for connecting the code reader with an RS-232 connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF26". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

4 RS-232 CONNECTION (GOT) 4.2 Setting the Code Reader

4

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Set an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and optimize

brightness under the environment that is similar to the actual operating environment.

4 RS-232 CONNECTION (GOT) 4.2 Setting the Code Reader 81

82

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed candidates varies

depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by unselecting the

checkbox of "Disable Untrained Symbologies." The scanning speed can be improved when

unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

4 RS-232 CONNECTION (GOT) 4.2 Setting the Code Reader

4

5. Set the output information of the QR Code in the "Format Data" step. Click the [Format Data] button. Select the checkbox of "Standard" for "Universal". Select the [Standard] tab.

Select " " in the [General] tab in "Data." Click the [Add] button. Select the checkbox of "CR/LF" for "Terminating Text".

6. Configure settings for communication (serial) in the "Communications" step.

4 RS-232 CONNECTION (GOT) 4.2 Setting the Code Reader 83

84

Click the [Communications] button. Select the [Serial] tab. Set "Serial Port Settings". Speed: 115200 Parity: None Data Bits: 8 Stop Bits: 1 RS 232 Inter-character Delay (ms): 0

If setting a value for the inter-character delay, set a suitable time for the connection target device.

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

4 RS-232 CONNECTION (GOT) 4.2 Setting the Code Reader

4

4.3 Setting a GOT Set a GOT in GT Designer3.

Setting a GOT 1. Create a new project in GT Designer3.

Click the [New] button.

2. Configure the settings in the "New Project Wizard" screen. Set each page as follows, and click the [Next] button. Page 86 New Project Wizard Click the [Finish] button.

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT 85

86

When IP address of the programmable controller is other than the default (192.168.3.39), select [Common] [Controller Setting] and set the IP address in the "Ethernet Controller Setting" section.

New Project Wizard New project wizard Item Setting System Setting GOT Type GT27**-S(800600)

Setting of Controller I/F I/F Ethernet: Multi

Com. Driver Communication Driver Ethernet (MITSUBISHI ELECTRIC), Gateway

GOT IP Address Setting GOT IP Address 192.168.3.18

Subnet Mask 255.255.255.0

Default Gateway 0.0.0.0

Peripheral S/W Communication Port No. 5015

Transparent Port No. 5014

Screen Switch Base Screen GD100

Overlap Window GD101

Screen Design Any design

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT

4

Connecting the code reader Connect the code reader to a GOT. 1. Display a setting screen.

Select [Common] [Peripheral Setting] [Bar Code].

2. Set destination I/F for barcodes. Configure the settings in the [Serial] tab. Destination I/F: Standard I/F (RS

232) Select the checkbox of "Use Serial

Bar Code". Select "Yes" for "Read Data Direct

Input to Object". Header: None Terminator: CR+LF Input Completion Notification:

Disable Click the [Detail Setting] button. Set the property of barcodes. Transmission Speed (BPS): 115200 Data Bit: 8 bit Stop Bit: 1 bit Parity: None Click the [OK] button.

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT 87

88

3. Set a character string to be displayed in the GOT. Select [Object] [Text Display/ Input] [Text Input].

4. Place the object of an input character string. Place the character string object on the screen and double-click it.

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT

4

5. Set the value of the input character string. Configure the setting of the input character string. The [Device/Style] tab Device: D0 Digits: 12

The [Extended] tab Select the checkbox of "Input data

using Bar Code/RFID". Select "Bar Code". Number of Digits: 12 Click the [OK] button.

6. Set a screen property. Select [Screen] [Screen Property].

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT 89

90

7. Configure the advanced settings of the key window. Select the [Key Window Advanced Setting] tab and configure "Key Window/Cursor Display Setting". Select the checkbox of "Prioritize

screen setting over project setting". Select "Hide" for "Key Window". Select "Display at any time" for

"Cursor". Click the [OK] button.

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT

4

Writing to the GOT Write the settings to the GOT. 1. Display the "Communication Configuration" screen.

Select [Communication] [Write to GOT].

2. Check the communication configuration. Check "Direct" is selected for "Connection to GOT" and click the [OK] button.

3. Write to the GOT. Click the [GOT Write] button.

4 RS-232 CONNECTION (GOT) 4.3 Setting a GOT 91

92

4.4 Setting a programmable controller Set parameters of a programmable controller 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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

4 RS-232 CONNECTION (GOT) 4.4 Setting a programmable controller

4

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

Writing to the programmable controller

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

1. Turn ON the programmable controller. 2. Write parameters 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 RS-232 CONNECTION (GOT) 4.5 Writing Data to a Programmable Controller 93

94

4.6 Checking Operations Check operation by controlling the code reader using the programmable controller.

Checking read results Check the read results of a QR Code in the "Device/Buffer Memory Batch Monitor" window of an engineering tool. 1. Press the [TRIG] button of the code reader.

Press the [TRIG] button of the code reader to read the target codes.

2. Start monitoring in the "Device/Buffer Memory Batch Monitor" window. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. The "Device/Buffer Memory Batch Monitor" window appears. Enter "D0" for "Device Name". Click the [Start Monitoring] button.

3. Check the read results. "D0" to "D5": Check "ABCDEFG01234" is displayed in "String".

4. Check the read results of the code reader are displayed in the GOT screen. Check "ABCDEFG01234" is displayed in the GOT screen.

4 RS-232 CONNECTION (GOT) 4.6 Checking Operations

5

5 I/O CONNECTION This chapter explains the procedure for connecting a code reader to a programmable controller and controlling the code reader with an I/O connection.

5.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF26 User's Manual Code Reader CF37 User's Manual

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool Code Reader setup tool

(COGNEX product) (COGNEX product)

5 I/O CONNECTION 5.1 System Configuration Example for Connecting a Code Reader 95

96

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF26-SR

Programmable controller CPU module: R04CPU Input module: RX40C7 Output module: RY40NT5P

Engineering tool GX Works3

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05, 10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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

5 I/O CONNECTION 5.1 System Configuration Example for Connecting a Code Reader

5

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a programmable controller and connecting to an I/O connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a code reader first, or at the same time as a programmable controller.

1. Connect a breakout cable to an input/output module. For details on the connection with an input/output module, refer to the user's manual. Code Reader CF26 User's Manual Code Reader CF37 User's Manual

2. Connect the breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

3. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

4. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

5. Connect the code reader to a programmable controller and a personal computer via the switching hub.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

RX40C7 RY40NT5P

24 VDC power supply

Breakout cable (CCB-PWRIO-**)

Input 0 (Orange) Input 1 (Violet) Output 0 (Blue) Output 1 (Grey)

Output 2 (Yellow) Output 3 (White/Brown)

Input common (White/Violet) Output common (Green)

24 VDC (Red) GND (Black)

5 I/O CONNECTION 5.1 System Configuration Example for Connecting a Code Reader 97

98

6. Turn the power of the system ON.

5 I/O CONNECTION 5.1 System Configuration Example for Connecting a Code Reader

5

5.2 Setting the Code Reader This section explains the procedures for connecting the code reader with an I/O connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF26". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

5 I/O CONNECTION 5.2 Setting the Code Reader 99

10

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Set an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and optimize

brightness under the environment that is similar to the actual operating environment.

0 5 I/O CONNECTION 5.2 Setting the Code Reader

5

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed candidates varies

depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by unselecting the

checkbox of "Disable Untrained Symbologies." The scanning speed can be improved when

unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

5 I/O CONNECTION 5.2 Setting the Code Reader 101

10

5. Set inputs and outputs (I/O connection) in the "Inputs/Outputs" step. Click the [Inputs/Outputs] button. The [Outputs] tab Select the [Outputs] tab. Set "Events" and "Action" in the table. "Event" Read: Select the checkbox of '0'. No Read: Select the checkbox of '1'. Validation Failure: Select the checkbox of '2'. Buffer Overflow: Select the checkbox of '3'.

"Action" Closed: Select all the checkboxes from '0' to '3'. Pulse Width [ms]: Set all the values to '1000' in

the columns from '0' to '3'. Set the pulse width according to the scan time of a program and a programmable controller.

The [Inputs] tab Select the [Inputs] tab. Set "Actions" in the table. Trigger On: Select the checkbox of '0'. Trigger Off: Select the checkbox of '0'. Tune: Select the checkbox of '1'.

6. Configure the settings for data validation

2 5 I/O CONNECTION 5.2 Setting the Code Reader

5

Select the [Settings] tab Click the [Data Validation] button. Select the [QR Code/MaxiCode/Aztec Code] tab. Select "Match String Validation". Enter "ABCDEFG01234" in "Match String".

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

5 I/O CONNECTION 5.2 Setting the Code Reader 103

10

5.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: R04 Program Language: Ladder Click the [OK] button. Click the [OK] button.

3. Add an input 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: Input Module Name: RX40C7 Mounting Slot No.: 0 Start I/O No. Specification: Not Set Click the [OK] button.

4 5 I/O CONNECTION 5.3 Setting a Programmable Controller

5

4. Add an output module. 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: Output Module Name: RX40NT5P Mounting Slot No.: 1 Start I/O No. Specification: Not Set Click the [OK] button.

5 I/O CONNECTION 5.3 Setting a Programmable Controller 105

10

Creating a program Create a program for controlling the code reader by using input and output devices.

Devices used in the program Device Device name Description X0 Read This device is turned ON when a code can be read from the captured image and passed validation.

ON: Succeeded to read a code and passed validation OFF: Failed to read a code or failed validation

X1 No Read This device is turned ON when a code cannot be read from the captured image. ON: Failed to read a code OFF: Succeeded to read a code

X2 Failed Validation This device is turned ON when a code can be read from the captured image but failed validation. ON: Succeeded to read a code but failed validation OFF: Failed to read a code or passed validation

X3 Buffer Overflow This device is turned ON when a buffer overflow occurs.

Y10 Trigger An image is captured when this device is turned ON. To capture an image again, turn the device OFF once and then turn ON.

M0 Trigger command 'Trigger'(Y10) is turned ON and an image is captured when this device is turned ON.

M10 Read flag This device is turned ON when a code can be read from the captured image and passed validation. ON: Succeeded to read a code and passed validation OFF: Failed to read a code or failed validation

M11 No Read flag This device is turned ON when a code cannot be read from the captured image. ON: Failed to read a code OFF: Succeeded to read a code

M12 Failed Validation flag This device is turned ON when a code can be read from the captured image but failed validation. ON: Succeeded to read a code but failed validation OFF: Failed to read a code or passed validation

F10 Buffer Overflow flag This device is turned ON when a buffer overflow occurs.

T0 Startup waiting timer A timer for waiting for the code reader to start up.

T1 I/O connection establishment check timer

A timer used for checking I/O connection establishment.

T3 Trigger off timer A timer used for turning OFF the trigger for capturing an image.

M100 I/O connection establishment check This device is turned ON to check whether the I/O connection is established.

M101 I/O connection status This device is turned ON when the I/O connection is established between the code reader and programmable controller.

6 5 I/O CONNECTION 5.3 Setting a Programmable Controller

5

Program example

(0): Request the start of the image capture to the code reader ('Trigger'(Y10) is turned ON). (8): Monitor the I/O connection status between the code reader and programmable controller. (44): Process the results from the code reader as follows: When a code can be read from the captured image or passed validation, 'Read flag' (M10) is turned ON. When codes cannot be read from the captured image, 'No Read flag' (M11) is turned ON. When a code can be read from the captured image but failed validation, 'Failed Validation flag' (M12) is turned ON. When a buffer overflow occurs, the annunciator F10 is turned ON.

(59): The processing for the completion of decoding of the code reader is performed.

(0) M100 M101

SET Y10

M0 M101 X3 Y10

(8) M101

OUT T0 K400

T0 M100 OUT T1 K50

T0 PLS M100

T1

Y10 OUT T3 K5

T3 RST Y10

X0 SET M101

X1

(44) M101 X0

SET M10

X1 SET M11

X2 SET M12

X3 SET F10

(59) X0

RST M0

X1 RST Y10

X2 BKRST M10 3

(70) END

5 I/O CONNECTION 5.3 Setting a Programmable Controller 107

10

Timing chart of a trigger The following figure shows the timing chart.

(1)

(1)

(1)

X0

X1

X2

Y10 Turn ON/OFF with the PLC (Program).

Turn ON/OFF the code reader automatically.ProcessingProcessing Processing

(Trigger)

(Read)

(No Read)

(Failed Validation)

Read image Decode processing

Succeeded to read a code but failed validation

Failed to read a code

Succeeded to read a code and passed validation

(1) ON for one second (one second is set as the length).

8 5 I/O CONNECTION 5.3 Setting a Programmable Controller

5

5.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 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.

5 I/O CONNECTION 5.4 Writing Data to a Programmable Controller 109

11

5.5 Checking Operations Check operation by controlling the code reader using the programmable controller. Use a created program to check the operation. (Page 106 Creating a program)

Checking the communication status Check the communication status in the "Device/Buffer Memory Batch Monitor" window of an engineering tool.

Checking read results Check the read results of a QR Code.

1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window. Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. The "Device/Buffer Memory Batch Monitor" window appears. Enter "M100" for "Device Name." Click the [Start Monitoring] button.

2. Check the communication status. Check the communication status. Check that 'I/O connection status' (M101) is turned ON.

1. Start monitoring. Enter "M0" for "Device Name." Click the [Start Monitoring] button.

2. Turn ON a trigger. Turn 'Trigger command' (M0) ON. 'Trigger' (Y10) is turned ON.

3. Check the read results. Check the read results. 'Read flag' (M10): This device is

turned ON when a code can be read from the captured image and passed validation.

'No Read flag' (M11): This device is turned ON when a code cannot be read from the captured image.

0 5 I/O CONNECTION 5.5 Checking Operations

6

6 EtherNet/IP CONNECTION This chapter explains the procedure for connecting a code reader to a programmable controller and controlling the code reader with an EtherNet/IP connection. Only the CF37 supports an EtherNet/IP connection.

6.1 System Configuration Example for Connecting a Code Reader

The following figure shows the system configuration for connecting a code reader.

For details on the system configuration, refer to the following: Code Reader CF37 User's Manual

USB cableProgrammable controller

Ethernet cable

Ethernet cable

Ethernet cable Breakout cable

Code Reader

100 VAC power supply

Switching hub

24 VDC power supply

Engineering tool

EtherNet/IP Configuration Tool Code Reader setup tool

(COGNEX product) (COGNEX product)

6 EtherNet/IP CONNECTION 6.1 System Configuration Example for Connecting a Code Reader 111

11

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

*2 Cable length (0.6 m, 2 m, 5 m, 10 m, or 15 m), straight *3 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

Commercial products

Code reader CF37-SR

Programmable controller CPU module: R04CPU 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 code reader

CF37*1

Code reader setup tool DataMan Setup Tool for MELSENSOR*1

Ethernet cable CCB-84901-2001-**(**: 01, 02, 05,

10, or 15)*2

Breakout cable CCB-PWRIO-**(**: 05, 10, or 15)*3

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

2 6 EtherNet/IP CONNECTION 6.1 System Configuration Example for Connecting a Code Reader

6

Connecting and wiring a code reader The following explains the considerations and procedure for connecting a code reader to a programmable controller and connecting to an EtherNet/IP connection.

Ex.

Breakout cable: CCB-PWRIO-**(**: 05, 10, or 15)*1

Precautions Check that a 24 VDC power supply is OFF when connecting a breakout cable to the power supply. Cut unused wires or protect them with insulating materials. Be careful not to contact with 24 VDC wires. A breakout cable and an Ethernet cable are designed to connect with their key aligned with the keyway of the connector on

a code reader. Do not force the connections or damage may occur. When powering ON the system, turn ON the power of a programmable controller first, or at the same time as a code reader.

1. Connect the breakout cable to a 24 VDC power supply. Connect the 24 VDC (red) of the cable to the positive terminal of the power supply, and the GND (black) to the negative terminal.

2. Connect the breakout cable to the power supply, I/O, and RS-232 connector of a code reader.

3. Connect an Ethernet cable to an Ethernet connector and a switching hub of the code reader.

4. Connect the code reader to a programmable controller and a personal computer via the switching hub.

5. Turn the power of the system ON.

*1 Cable length (5 m, 10 m, or 15 m), shielded twisted-pair cable, straight

24 VDC power supply

24 VDC (Red)

GND (Black)

6 EtherNet/IP CONNECTION 6.1 System Configuration Example for Connecting a Code Reader 113

11

6.2 Basic Operations for an EtherNet/IP Connection Overview An EtherNet/IP connection uses the following object model. The DataMan ID Reader 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 117 Input/Output Assemblies used for cyclic (Implicit) communications

The DataMan ID Reader Object consists of attributes (data) and services (functions). For details on attributes and services, refer to DataMan Industrial Protocols Manual. DataMan Industrial Protocols Manual can be opened by clicking "CF Industrial Protocols Manual" in the help of DataMan Setup Tool for MELSENSOR.

Code reader

Identity Object

Ethernet Object

TCP/IP Object

Other Internal Objects

DataMan ID Reader Object

Inputs * Outputs *

Assembly Object

4 6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection

6

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 DataMan ID Reader 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 (code reader) when desired, and the device (code reader) that received the message sends a response. Attributes can be accessed by using the services of the DataMan ID Reader 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 code reader. For details on an RJ71EIP91, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module User's Manual (Startup)

Input

Output

Input Assembly

Output Assembly

DataMan ID Object

Programmable controller Code reader

Acquisition Subsystem

Decode Subsystem

DMCC Subsystem

Input

Output

DataMan ID Object

Programmable controller Code reader

Acquisition Subsystem

Decode Subsystem

DMCC Subsystem

6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection 115

11

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 (coder reader) 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 code reader; therefore, it is suitable for performing operations which frequently read codes 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

Code reader

Input data

6 6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection

6

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 DataMan Industrial Protocols Manual. DataMan Industrial Protocols Manual can be opened by clicking "CF Industrial Protocols Manual" in the help of DataMan Setup Tool for MELSENSOR.

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 code reader. The instance 11 of the Input Assembly contains status information, process state, and decode results.

Input Assembly list Instance Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 11 0 (Reserved) Missed Acq Acquiring Trigger Ack Trigger

Ready

1 General Fault

(Reserved) Results Available

Results Buffer Overrun

Decode Complete Toggle

Decoding

2 SoftEvent Ack 7

SoftEvent Ack 6

SoftEvent Ack 5

SoftEvent Ack 4

SoftEvent Ack 3

SoftEvent Ack 2

SoftEvent Ack 1

SoftEvent Ack 0

3 to 5 (Reserved)

6 Trigger ID (16-bit integer)

7

8 Result ID (16-bit integer)

9

10 Result Code (16-bit integer)

11

12 Result Extended (16-bit integer)

13

14 Result Data Length (16-bit integer)

15

16 Result Data 0

to to

499 Result Data 483

6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection 117

11

Details on the Input Assembly

*1 These bits turn ON to show that a code reader completes soft event actions. These bits remain ON until their corresponding 'Soft Event' bits in the Output Assembly are turned OFF.

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 code reader recognizes 'Trigger' is ON. Until 'Trigger' is turned OFF, this bit remains ON. ON: An image capturing trigger is received. OFF:

2 Acquiring This bit shows that a code reader is capturing an image.

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 (Reserved)

5 (Reserved)

6 (Reserved)

7 (Reserved)

1 0 Decoding This bit shows that a code reader is decoding.

1 Decode Complete Toggle

The status of this bit is inverted every time when decoding is completed and read results become available.

2 Results Buffer Overrun This bit shows that a code reader 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 Available This bit shows that a series of decode results is available (the Result ID, Result Code, Result Data Length, and Result Data tags contain valid data). Until 'Results Ack' responds, this bit remains ON. ON: With new read results OFF: Without new read results

4 (Reserved)

5 (Reserved)

6 (Reserved)

7 General Fault This bit turns ON when an error occurs in soft event operation. Until the next soft event succeeds or 'Trigger Enable' is turned OFF and then ON again, this bit remains ON. ON: Error OFF: No error

2 0 Soft Event Ack*1 SoftEvent Ack 0

Code registration is completed.

1 SoftEvent Ack 1

Match string registration is completed.

2 SoftEvent Ack 2

Focus registration is completed.

3 SoftEvent Ack 3

Brightness registration is completed.

4 SoftEvent Ack 4

Cancelling registration is completed.

5 SoftEvent Ack 5

(Reserved)

6 SoftEvent Ack 6

DMCC command execution is completed.

7 SoftEvent Ack 7

Match string setting is completed.

Byte Data name Description (Application) 3 to 5 (Reserved)

8 6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection

6

*2 This bit is enabled only when using the verification function compatible models.

Output Assembly The Output Assembly is output signals for a programmable controller to control a code reader. The instance 21 of the Output Assembly contains control signals, software event signals, and any user data required for the trigger and decode.

Output Assembly list

6 Trigger ID (16-bit integer) Image capturing trigger ID. ID of an image capturing trigger to be generated next is stored. This is used to verify a generated image capturing trigger and 'Result Data' to be received later. The same value as this ID is returned as 'Result ID' of the corresponding read results.

7

8 Result ID (16-bit integer) Results ID. ID of the read results which are corresponding to 'Trigger ID' is stored. This is used to verify an image capturing trigger ID and the corresponding read results ID.

9

10 Result Code (16-bit integer) Result code for the current result set. Bit 0: 1 = Read, 0 = No Read Bit 1: 1 = Passed validation, 0 = Failed validation Bit 2*2: 1 = Passed verification, 0 = Failed (or unexecuted) verification Bit 3: 1 = Image capturing trigger overrun Bit 4: 1 = Image capturing buffer overrun Bit 5 to 15:

11

12 Result Extended (16-bit integer) Not used.

13

14 Result Data Length (16-bit integer) Read results data length. The number of bytes of the result data included in the 'Result Data' field is stored.15

16 Result Data 0 Read results data are stored.

to to

499 Result Data 483

Instance Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 21 0 (Reserved) Results Ack Buffer

Results Enable

Trigger Trigger Enable

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

2 (Reserved)

3

4 User Data Option (16-bit integer)

5

6 User Data Length (16-bit integer)

7

8 User Data 0

to to

499 User Data 491

Byte Data name Description (Application)

6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection 119

12

Details on the Output Assembly

*1 'Soft Event' is virtual discrete input of the code reader. When the bit switched from 0 to 1, an action associated with the bit is executed. After the execution, the code reader turns ON the corresponding 'Soft Event Ack' in the Input Assembly to show the action is completed.

*2 Do not execute 'Soft Event' that changes code reader settings while processing the trigger. Changing settings while capturing an image or decoding may cause an unexpected result.

*3 The execution result of the DMCC command cannot be acquired.

Byte Bit Data name Description (Application) 0 0 Trigger Enable To enable an image capturing trigger by 'Trigger' signal for EtherNet/IP connection.

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

1 Trigger To trigger image capturing. The 'Trigger Ready' bit needs to be ON before starting the image capture. ON: image capturing trigger is started. OFF:

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

3 Results Ack To respond to receiving the latest read results. A code reader turns 'Results Available' 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 (Reserved)

5 (Reserved)

6 (Reserved)

7 (Reserved)

1 0 Soft Event*1*2 SoftEvent 0

Code registration is completed.

1 SoftEvent 1

To register a match string

2 SoftEvent 2

To register focus

3 SoftEvent 3

To register brightness

4 SoftEvent 4

To cancel registration

5 SoftEvent 5

(Reserved)

6 SoftEvent 6

To execute a DMCC command*3

7 SoftEvent 7

To set a match string

Byte Data name Description (Application) 2 (Reserved)

3

4 User Data Option (16-bit integer) Not used.

5

6 User Data Length (16-bit integer) The number of valid bytes of the 'User Data' field.

7

8 User Data 0 User-defined data which can be used as input for capturing an image or decoding.

to to

499 User Data 491

0 6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection

6

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 code reader, and the code reader that received the message sends a response. Unlike cyclic (Implicit) communications, data communications are performed without establishing a connection between an RJ71EIP91 and a code reader; 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

Code reader

Output data

6 EtherNet/IP CONNECTION 6.2 Basic Operations for an EtherNet/IP Connection 121

12

6.3 Setting the Code Reader This section explains the procedures for connecting the code reader with an EtherNet/IP connection and the settings for a symbol to be read and the means of communication.

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

Connecting the code reader 1. Start DataMan Setup Tool for MELSENSOR. 2. Set an IP address and a subnet mask to the code reader.

Select [Repair & Support]. Select the code reader "CF37". Set an IP address and a subnet mask of the code reader in the "Network Settings" section. IP Address: 192.168.3.1 Subnet Mask: 255.255.255.0 Click the [Apply] button. The code reader is restarted and the network settings are applied.

3. Connect to the code reader. Select [Connect]. Select the code reader. Click the [Connect] button.

2 6 EtherNet/IP CONNECTION 6.3 Setting the Code Reader

6

Setting the code reader The following shows the procedure from setting to saving the code reader. 1. Select an application type.

Select "Indexed, Stationary".

2. Import a QR Code to be read in the "Optimize Image" step. Click the [Optimize Image] button. Click the [Live] button. When a QR Code to be read is displayed, click the [Live] button again. It is recommended to tune and

optimize brightness under the environment that is similar to the actual operating environment.

Click the [Tune] button. When tuning is completed, an candidate of the setting contents is displayed. The number of the displayed

candidates varies depending on the work status or the combinations of lights.

When clicking the candidate, the capturing condition can be checked in "Image Panel".

If the reading target code still cannot be read even though the code is within the field of vision, the image is captured clearly, and tuning is completed, check that the symbol to be read is enabled in the "Code Details" step.

By clicking the [Apply Selected] button, the selected settings are reflected to the code reader.

6 EtherNet/IP CONNECTION 6.3 Setting the Code Reader 123

12

3. Check that symbols to be read are selected in the "Code Details" step. Click the [Code Details] button. Check that the checkboxes of the symbols to be read are selected. Any symbols can be selected by

unselecting the checkbox of "Disable Untrained Symbologies."

The scanning speed can be improved when unselecting the checkboxes of symbols other than the reading target.

4. Set a trigger type and an exposure method in the "Application Details" step. Click the [Application Details] button. Select "Single (external)" for "Trigger Type" in "Trigger Settings". Select "Automatic Exposure" for "Exposure".

5. Set the output information of the QR Code in the "Format Data" step. Click the [Format Data] button. Select the checkbox of "Standard" for "Universal". Select the [Standard] tab.

4 6 EtherNet/IP CONNECTION 6.3 Setting the Code Reader

6

Select " " in the [General] tab in "Data." Click the [Add] button. Select the checkbox of "CR/LF" for "Terminating Text".

6. Configure the protocol to be used (EtherNet/IP) in the "Communications" step. Click the [Communications] button. Select the checkbox of "EtherNet/ IP" for "Industrial Protocols" in the [Ethernet] tab.

7. Save the settings in the code reader in the "Save Settings" step. Click the [Save Settings] button. Click the [OK] button.

6 EtherNet/IP CONNECTION 6.3 Setting the Code Reader 125

12

8. Restart the code reader. Select [System] [Reset Configuration] [Reboot Device]. The code reader is restarted.

6 6 EtherNet/IP CONNECTION 6.3 Setting the Code Reader

6

6.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: R04 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.

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 127

12

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.

8 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

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 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

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

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

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

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 129

13

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.

0 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

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 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 131

13

Click the [Finish] button.

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

2 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

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 code reader)

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 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.

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 133

13

Precautions Settings that are written to an EtherNet/IP network interface module (RJ71EIP91) in EtherNet/IP Configuration Tool are applied when 'EtherNet/IP communication start request' (Y10) is turned from OFF to ON.

Check that the code reader 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 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

Creating a program

Creating a program for cyclic (Implicit) communications Create a program for controlling a code reader 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 'Trigger' (D1000.1) is enabled while this device is ON.

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

M10 Result ID storage area initialization completion

Initializing the storage area for the result ID is completed if this device is ON.

M11 Decode Complete Decoding is completed if this device is ON.

M12 Result ID acquisition completion Acquiring the latest result ID is completed if this device is ON.

M100 Input execution command Processing for acquiring 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 Result ID storage area The result ID used for internal processing is stored temporarily.

D1000.0 Trigger Enable 'Trigger' (D1000.1) 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 status of 'Trigger Enable' (D1000.0) is stored. ON: An image capturing trigger is enabled. OFF: An image capturing trigger is disabled.

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

D1050.9 Decode Complete Toggle This device is inverted at the completion of decoding of a code reader.

D1054 Result ID The ID of the read results is stored.

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.

D1000 to D1049

Output data Devices in which output data is stored.

D1050 to D1099

Input data Devices in which input data is stored.

T100 Communication error determination timer

Device for determining a communication error.

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 135

13

Module labels used in the program 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

6 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

Program example

(0)

M0

SET

D1000.0

(2)

D1000.0 D1050.0

OUT

T100 K600

T100

SET

M132

D1050.0 M10

MOV

D1054 D100

SET

M10

(20)

M1 D1050.0 D1050.1 D1000.1

SET

D1000.1

(25)

D1050.1 D1050.9

SET

M11

D1050.9

<>

D1054 D100

MOV

D1054 D100

SET

M12

(40)

D1050.1 M11 M12

RST

D1000.1

RST

M1

RST

M11

RST

M12

(47)

EIP91_1.bSt s_ModuleRe

ady X0

EIP91_1.bSts _Communica tionReady

X1F

M200 M100

MOV

K1 D999

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 137

13

*1 If 'Communication error detection' (M132) is turned ON, the EtherNet/IP communication may not have been started. Perform the following operations: Check if an error has occurred in an RJ71EIP91. Check if Ethernet cables are connected properly. Restart a code reader.

(0): Enable an image capturing trigger on the code reader. (2): Monitor the status of EtherNet/IP connection between the code reader and programmable controller.*1

(20): Request the start of the image capture to the code reader ('Trigger' (D1000.1) is turned ON). (25): Monitor that the code reader completes the processing for capturing an image. (40): Perform the processing for the completion of the image capture of the code reader. (47): Check the communication status and turn ON the input execution command. (53): Acquire input data by using the module FB (M+RJ71EIP91_Class1SetInputData*2) of an RJ71EIP91.*3

(305): Set output data by using the module FB (M+RJ71EIP91_Class1SetOutputData*2) of an RJ71EIP91.*3

(557): Stop communication.

M_RJ71EIP91_Class1GetInputData_00A_1 (M+RJ71EIP91_Class1GetInputData_00A)

Get Class1 input data

B: i_bEN

DUT: i_stModule

UW: i_uConnectionNo

:Bo_bENO

:Bo_bOK

:Bo_bErr

:UWo_uErrId

:UWo_uStatusId

:UWo_uInputData

(53)

M100 M110

EIP91_1

M120

D999

M130

D900

D905

D1050

M_RJ71EIP91_Class1SetOutputData_00A_1 (M+RJ71EIP91_Class1SetOutputData_00A)

Set Class1 Output data

B: i_bEN

DUT: i_stModule

UW: i_uConnectionNo

UW: i_uOutputData

:Bo_bENO

:Bo_bOK

:Bo_bErr

:UWo_uErrId

:UWo_uStatusId

(305)

M120 M111

EIP91_1

M121

D999

M131

D1000 D910

D915

(557)

M200 M110 M111 M100 EIP91_1.bSts_C ommunicationD

uringStartup X10

RST

EIP91_1.bSet_C ommunicationS tartupRequest

Y10

(563)

END

8 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

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

*3 If 'Input error completion' (M130) or 'Output error completion' (M131) is turned ON, refer to the following: MELSEC iQ-R EtherNet/IP Function Block Reference

Timing chart of cyclic (Implicit) communications A timing chart when 'Trigger (Image Capturing Trigger)' of the Output Assembly is turned ON by using a programmable controller via cyclic (Implicit) communications is shown below. To enable the image capturing trigger from a programmable controller, turn ON 'Trigger Enable (Image Capturing Trigger Enable)' of the Output Assembly. When 'Trigger (Image Capturing Trigger)' of the Output Assembly is turned ON using a programmable controller while 'Trigger Ready (Image Capturing Trigger Ready)' of the Input Assembly is ON by turning ON 'Trigger Enable (Image Capturing Trigger Enable),' the reception status of 'Trigger (Image Capturing Trigger)' of the code reader is output to 'Trigger Ack (Image Capturing Trigger Ack)' of the Input Assembly. The status of 'Decode Complete Toggle (Decode Complete)' of the Input Assembly is inverted at the completion of decoding. When 'Trigger Enable (Image Capturing Trigger Enable)' of the Output Assembly is turned OFF, 'Trigger Ready (Image Capturing Trigger Ready)' is also turned OFF.

Code reader CF37

*1 Check changes in 'Decode Complete Toggle (Decode Complete)' and 'Result ID' before acquiring the decode results (Result ID, Result Code, Result Data Length, and Result Data).

Trigger Enable

Trigger

Trigger Ready

Trigger Ack

Decode Complete Toggle

*1

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

Processing Processing

Processing Processing

Read image processing

(Image Capturing Trigger Enable)

(Image Capturing Trigger)

(Image Capturing Trigger Ready)

(Image Capturing Trigger Ack)

(Decode Complete)

Decode processing

Turn ON/OFF with the PLC (Program).

The code reader turns ON/OFF automatically.

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 139

14

Creating a program for message (Explicit) communications Create a program for acquiring the device name of a code reader via message (Explicit) communications by using DMCC commands. For details on DMCC commands, refer to the command reference in the help of DataMan Setup Tool for MELSENSOR.

Devices 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 DMCC command string initialization command

The string of a DMCC 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 DMCC command termination characters

The termination string '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 Number of characters in a DMCC command string

The number of characters of a DMCC command is stored.

D101 DMCC command string The string of a DMCC 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 (SendDMCC)" is stored.

D153 UCMM data link request class ID The class ID "H79 (DataMan ID Reader 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.

0 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

Module labels used in the program 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

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

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 141

14

Program example

(0) X0

EIP91_1.bSts_M oduleReady

X1F

EIP91_1.bSts_C ommunicationR

eady M10

Y10

EIP91_1.bSet_Co mmunicationStar

tupRequest

(4) M0

MOV

H0C0A8 D151

MOV

H301 D150

MOV

H34 D152

MOV

H79 D153

MOV

H1 D154

MOV

H0 D155

(17) M1

MOV

H0A0D D50

$+

"||>GET DEVICE.NAME"

D50 D101

LEN

D101 D100

2 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

(36) M2

BMO V

D150 EIP91_1.stnUCMMC ommandArea

[1].unSet_Request_ TargetIPAddress_D

K2

MOV

D152 EIP91_1.stnUCM MCommandArea [1].uSet_Request

_Service_D

MOV

D153 EIP91_1.stnUCM MCommandArea [1].uSet_Request

_Class_D

MOV

D154 EIP91_1.stnUCM MCommandArea [1].uSet_Request

_Instance_D

MOV

D155 EIP91_1.stnUCM MCommandArea [1].uSet_Request

_Attribute_D

+_U

D100 K2 EIP91_1.stnUCM MCommandArea [1].uSet_Request _DataLength_D

/_U

EIP91_1.stnUCMMCo mmandArea

[1].uSet_Request_Dat aLength_D

K2 D90

<>

D91 K0

+_U

K1 D90

BMO V

D100 EIP91_1.stnUCMMC ommandArea

[1].unSet_Request_ RequestData_D

D90

U0\G393281

U0\G393283

U0\G393286

U0\G393287

U0\G393288

U0\G393289

U0\G393289

U0\G393312

6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller 143

14

*1 If 'Communication error detection' (M100) is turned ON, refer to the following: MELSEC iQ-R EtherNet/IP Network Interface Module User's Manual (Application)

(0): Perform the processing for starting communications. (4): Initialize data of the UCMM data link request command. (17): Initialize the DMCC command string ("||>GET DEVICE.NAME"). (36): Store data of the UCMM data link request command. (89): Perform UCMM communications. (98): Store response data and reset the command request.*1

(89) M3

SET

EIP91_1.bnSet_U CMMSendReque

st_D[1]

RST

M3

RST

M2

RST

M1

RST

M0

(98)

EIP91_1.bnSts_ UCMMSendReq uestAcceptanc

e_D[1]

EIP91_1.bnSts_ UCMMSendCo mpletion_D[1] <>

EIP91_1.stnUCMMCom mandArea

[1].uResult_Response_R esultStorageArea_D

K0

SET

M100

/_U

EIP91_1.stnUCMMCo mmandArea

[1].uResult_Response _DataLength_D

K2 D190

<>

D191 K0

+_U

K1 D190

FMO VP

K0 D200 K50

BMO V

EIP91_1.stnUCMMCo mmandArea

[1].unResult_Respons e_ReceiveData_D

D200 D190

RST

EIP91_1.bnSet_U CMMSendReque

st_D[1]

(143)

END

U0\G393216.0

U0\G393232.0 U0\G393248.0 U0\G394048

U0\G394057

U0\G394080

U0\G393216.0

4 6 EtherNet/IP CONNECTION 6.4 Setting a Programmable Controller

6

6.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.

6 EtherNet/IP CONNECTION 6.5 Writing Data to a Programmable Controller 145

14

6.6 Checking Operations Check operation by controlling the code reader using the programmable controller.

Checking operations of cyclic (Implicit) communications Use a created program to check the operation. (Page 135 Creating a program for cyclic (Implicit) communications)

Checking the communication status Check the communication status with an EtherNet/IP connection in DataMan Setup Tool for MELSENSOR.

Click the [Communications] button. Select the [Ethernet] tab. Check that "EtherNet/IP connection to 192.168.3.60 established" is displayed in "Status."

6 6 EtherNet/IP CONNECTION 6.6 Checking Operations

6

Checking read results Check the read results of a QR Code in the "Device/Buffer Memory Batch Monitor" window of an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

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

2. Enable a trigger on the code reader. Turn 'Image Capturing Trigger Enable command' (M0) ON. 'Trigger Enable' (D1000.0) is turned ON.

3. Turn ON a trigger. Turn 'Image Capturing Trigger command' (M1) ON. 'Trigger' (D1000.1) is turned ON.

4. Check the completion of decoding. Enter "D1050" for "Device Name." Check that 'Decode Complete Toggle' (D1050.9) is inverted. Check that the value of 'Result ID' (D1054) is changed.

5. Check the read results. "D1058" to "D1063": Check "ABCDEFG01234" is displayed in "String." "D1064": Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value."

6 EtherNet/IP CONNECTION 6.6 Checking Operations 147

14

Checking operations of message (Explicit) communications Acquire response data by sending DMCC commands to a code reader from a programmable controller. Use a created program to check the operation. (Page 140 Creating a program for message (Explicit) communications)

Checking read results Check the execution result of DMCC commands in an engineering tool. 1. Start monitoring in the "Device/Buffer Memory Batch Monitor" window.

Select [Online] [Monitor] [Device/Buffer Memory Batch Monitor]. 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 DMCC commands. Turn ON 'UCMM data link request command data initialization command' (M0), 'DMCC command string initialization command' (M1), then 'UCMM data link request command data store command' (M2).

3. Check command length and string data length. Enter "D100" for "Device Name." Check the DMCC command data length "0014" is displayed in "Current Value" of "D100". Check the DMCC command "||>GET DEVICE.NAME" is displayed in "String" of "D101" to "D109." Check the terminating text "0A0D" (CR/LF) is displayed in "Current Value" of "D110."

4. Execute the DMCC command. Enter "M0" for "Device Name." Turn 'UCMM data link request command execution command' (M3) ON.

8 6 EtherNet/IP CONNECTION 6.6 Checking Operations

6

5. Check response data. Enter "D200" for "Device Name." Check the length of the device name "D" is displayed in "Current Value" of "D202." Check the device name (a name of the code reader used) "CF37-xxxxxx" is displayed in "String" of "D203" to "D208." Check the terminating text (CR/LF) is displayed in "Current Value" of "D208" and "D209."

6 EtherNet/IP CONNECTION 6.6 Checking Operations 149

15

MEMO

0 6 EtherNet/IP CONNECTION 6.6 Checking Operations

151

REVISIONS *The manual number is given on the bottom left of the back cover.

Japanese manual number: BCN-P5999-1041-E

2019 MITSUBISHI ELECTRIC CORPORATION

Revision date *Manual number Description June 2019 BCN-P5999-1074-A First edition

June 2020 BCN-P5999-1074-B Added or modified parts Chapter 1, Chapter 2

October 2020 BCN-P5999-1074-C Added or modified parts SAFETY PRECAUTIONS, CONDITIONS OF USE FOR THE PRODUCT, INTRODUCTION, Section 1.1, Section 1.2, Section 1.4, Section 2.1, Section 2.2, Section 2.4, Section 3.1, Section 4.1, Section 5.1

May 2021 BCN-P5999-1074-D Added or modified parts INTRODUCTION, RELEVANT MANUALS, TERMS, GENERIC TERMS AND ABBREVIATIONS, Section 1.1, Section 1.2, Section 1.4, Section 1.5, Section 1.6, Section 2.1, Section 2.2, Section 2.4, Section 2.5, Section 2.6, Section 3.1, Section 3.2, Section 3.3, Section 3.4, Section 3.5, Section 4.1, Section 4.2, Section 4.4, Section 4.5, Section 4.6, Section 5.1, Section 5.3, Section 5.4, Section 5.5, Chapter 6, Section 6.1, Section 6.2, Section 6.3, Section 6.4, Section 6.5, Section 6.6

September 2022 BCN-P5999-1074-E Added or modified parts CONDITIONS OF USE FOR THE PRODUCT, Section 2.3, Section 6.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.

152

TRADEMARKS The following are registered trademarks of Cognex Corporation: Cognex, 2DMAX, Advantage, AlignPlus, Assemblyplus, Check it with Checker, Checker, Cognex Vision for Industry, Cognex VSOC, CVL, DataMan, DisplayInspect, DVT, EasyBuilder, HotBars II, IDMax, In-Sight, Laser Killer, MVS-8000, OmniView, PatFind, PatFlex, PatInspect, PatMax, PatQuick, SensorView, SmartView, SmartAdvisor, SmartLearn, UltraLight, Vision Solutions, VisionPro, VisionView The following are trademarks of Cognex Corporation: The Cognex logo, 1DMax, 3D-Locate, 3DMax, BGAII, CheckPoint, Cognex VSoC, CVC-1000, FFD, iLearn, In-Sight (design insignia with cross-hairs), In-Sight 2000, InspectEdge, Inspection Designer, MVS, NotchMax, OCRMax, PatMax RedLine, ProofRead, SmartSync, ProfilePlus, SmartDisplay, SmartSystem, SMD4, VisiFlex, Xpand 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.

Manualsnet FAQs

If you want to find out how the CF37-LR Mitsubishi works, you can view and download the Mitsubishi CF37-LR Code Reader Connection Guide on the Manualsnet website.

Yes, we have the Connection Guide for Mitsubishi CF37-LR 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 CF37-LR. Full manuals and user guide PDFs can be downloaded from Manualsnet.com.

The best way to navigate the Mitsubishi CF37-LR Code Reader 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 CF37-LR Code Reader 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 CF37-LR Code Reader 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 CF37-LR Code Reader Connection Guide, simply download the document to your computer. Once downloaded, open the PDF file and print the Mitsubishi CF37-LR Code Reader Connection Guide as you would any other document. This can usually be achieved by clicking on “File” and then “Print” from the menu bar.