Omron FQ2-S, FQ2-CH User Manual

Smart Camera
FQ2-S/CH Series
User's Manual for Communications Settings
Cat. No. Z338-E1-02

Introduction

Thank you for purchasing the FQ2-S/CH. This manual provides information regarding functions, performance and operating methods that are required for using the FQ2-S/CH. When using the FQ2-S/CH, be sure to observe the following:
• The FQ2-S/CH must be operated by personnel knowledgeable in electrical engineering.
• To ensure correct use, please read this manual thoroughly to deepen your understanding of the product.
• Please keep this manual in a safe place so that it can be referred to whenever necessary.
APPLICATION CONSIDERATIONS (Please Read)
User's Manual for Communications Settings
Overview of Communication Specifications
Controlling Operation and Outputting Data with a Parallel Connection
Controlling Operation and Outputting Data with an Ethernet Connection
Controlling Operation and Outputting Data with an RS-232C Connection
Appendices
1
2
3
4
5
Smart Camera
FQ2-S/CH
Product manuals
Important
Note
2-2 Par
FQ2-CH1
FQ2-S1 FQ2-S2 FQ2-S3
Shows the models that support the function being described.
Shows that the FQ2-S1 supports the function. Shows that the FQ2-S2 supports the function. Shows that the FQ2-S3 supports the function. Shows that the FQ2-S4 supports the function. Shows that the FQ2-CH supports the function.
FQ2-CH
FQ2-S4
FQ2-S3
FQ2-S2
FQ2-S1
The information required to use the FQ2-S/CH Series is divided into two manuals by objective: “FQ2-S/CH Series User’s Manual” and “FQ2-S/CH Series User's Manual for Communications Settings”. Read each manual as appropriate for your objective.
Manual Description Contents
FQ2-S/CH Series User's Manual (Cat. No. Z337)
(This manual) FQ2-S/CH Series User's Manual for Communications Settings (Cat. No. Z338)
Describes the product specifications, basic settings, and other information required to use the FQ2-S/CH Series.
Provides information required to oper­ate the sensor by remote control.
Product specifications Connections, wiring Camera, image adjustment Inspection item settings Test measurement, operation Troubleshooting
System configuration Sensor control method Data input/output specifications Connectable network types Communication settings Output data settings
Editor's Note
Meaning of Symbols
Menu items that are displayed on the Touch Finder LCD screen, and windows, dialog boxes and other GUI elements displayed on the PC are indicated enclosed by brackets "[ ]".
Visual Aids
Indicates points that are important to achieve the full product performance, such as operational precautions.
2
Indicates application procedures.
Indicates pages where related information can be found.
FQ2-S/CH User’s Manual
for Communications Settings

Table of Contents

1. Overview of Communication Specifications

1-1 Confirming the System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
FQ2-S/CH Series System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1-2 Communicating with an External Device . . . . . . . . . . . . . . . . . . . . . . . . . 10
Basic Control Operations of the Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Control Methods for the Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Communication Protocols for Communication with the Sensor . . . . . . . . . . . .12
1-3 Control Methods Using an External Device . . . . . . . . . . . . . . . . . . . . . . . 18
Control with Control Signals and Status Signals . . . . . . . . . . . . . . . . . . . . . . . . 18
Command/Response Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Data Output after Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2. Controlling Operation and Outputting Data with a Parallel Connection

2-1 Controlling Operation and Outputting Data
with the Sensor's Standard Parallel Connection . . . . . . . . . . . . . . . . . . . 34
Basic Operation with a Parallel Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Setting the Measurement Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Setting the Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Controlling the Sensor from an External Device . . . . . . . . . . . . . . . . . . . . . . . . 46
2-2 Controlling Operation and Outputting Data
with a Parallel Interface Sensor Data Unit . . . . . . . . . . . . . . . . . . . . . . . . 60
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Setting the Measurement Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Setting Output Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Aligning the Data Output Timing with the External Device . . . . . . . . . . . . . . . . 66
Changing the Settings of the I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Controlling Operation from an External Device . . . . . . . . . . . . . . . . . . . . . . . . . 75
Table of Contents
FQ2-S/CH User’s Manual for Communications Settings
3

3. Controlling Operation and Outputting Data with an Ethernet Connection

3-1 Controlling Operation and Outputting Data
with EtherNet/IP Communications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Introduction to EtherNet/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88
FQ2 Communications for EtherNet/IP Connections . . . . . . . . . . . . . . . . . . . . . 90
Setting Up EtherNet/IP Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Tag Data Link Setting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Setting the Data to Output Automatically after Measurements . . . . . . . . . . . . . 97
Memory Assignments and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Timing Chart for EtherNet/IP Communications . . . . . . . . . . . . . . . . . . . . . . . . 114
Sample Ladder Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Communicating with the Sensor Controller
with EtherNet/IP Message Communications . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Command Setting Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3-2 Controlling Operation and Outputting Data
with PLC Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Communications Processing Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Setting Up PLC Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Setting the Data to Output Automatically after Measurements . . . . . . . . . . . . 124
Memory Assignments for PLC Link Communications . . . . . . . . . . . . . . . . . . . 129
Timing Chart for PLC Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Sample Ladder Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3-3 Outputting Data and Controlling Operation through PROFINET . . . . . 140
Overview of PROFINET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
FQ2 Communications for PROFINET Connections . . . . . . . . . . . . . . . . . . . . 144
Setting Up EtherNet/IP Communications (PROFINET) . . . . . . . . . . . . . . . . . . 145
Communication Settings Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Setting the Data to Output Automatically after Measurements . . . . . . . . . . . . 148
Memory Assignments and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Timing Chart for EtherNet/IP Communications . . . . . . . . . . . . . . . . . . . . . . . . 161
Sample Ladder Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
3-4 Control and Output in No-Protocol (TCP) / No-Protocol (UDP) . . . . . . 167
Communications Processing Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Setting Up No-protocol Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Setting the Data to Output Automatically after Measurements . . . . . . . . . . . . 169
Controlling the Sensor from an External Device
(Procedure for No-protocol Command/Response Communications) . . . . . . .176
Binary Data File Load and Save Commands . . . . . . . . . . . . . . . . . . . . . . . . . 183
4
FQ2-S/CH User’s Manual
for Communications Settings
3-5 Controlling Operation and Outputting Data
with FINS/TCP No-protocol Commands . . . . . . . . . . . . . . . . . . . . . . . . . 188
Introduction to FINS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
Setting Up FINS/TCP No-protocol Communications . . . . . . . . . . . . . . . . . . . . 189
List of FINS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

4. Controlling Operation and Outputting Data with an RS-232C Connection

4-1 Introduction to RS-232C Connections . . . . . . . . . . . . . . . . . . . . . . . . . . 196
4-2 Controlling Operation and Outputting Data
with RS-232C No-protocol Communications . . . . . . . . . . . . . . . . . . . . . 197
Communications Processing Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Setting Up No-protocol Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Setting the Data to Output Automatically after Measurements . . . . . . . . . . . . 198
Controlling the Sensor from an External Device
(Procedure for No-protocol Command/Response Communications) . . . . . . .198

5. Appendices

5-1 Command Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Parameter Notation Examples for Command Control . . . . . . . . . . . . . . . . . . . 200
Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Command Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
5-2 Detailed EtherNet/IP Communications Specifications . . . . . . . . . . . . . 433
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
FQ2-S/CH User’s Manual for Communications Settings
5
6
FQ2-S/CH User’s Manual
for Communications Settings
1
Overview of Communication Specifications
Overview of Communication Specifications
1-1 Confirming the System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . .8
1-2 Communicating with an External Device . . . . . . . . . . . . . . . . . . . . . . . 10
1-3 Control Methods Using an External Device . . . . . . . . . . . . . . . . . . . . . 18

1-1 Confirming the System Configuration

FQ2-S1
FQ2-S2
FQ2-CH
Parallel Interface Connection
Sensor Data Unit cable
Parallel Interface Sensor Data Unit
I/O cable
Basic configuration External devices
Setup Tool (Touch Finder or PC Tool)
Special Ethernet Cable (RJ45/M12)
Connection with Standard Parallel Interface of the Vision Sensor
I/O control PLC
I/O cable
Basic configuration
FQ2-S/CH Series
FQ2-S/CH Series
External devices
Trigger sensor
I/O control PLC
Trigger sensor
Setup Tool (Touch Finder or PC Tool)
Special Ethernet Cable (RJ45/M12)
A Parallel Interface Sensor Data Unit can be installed to enable output of measured values, parameters, calculation results, and other information.
Use an I/O cable for input of measurement triggers and communication commands, and for output of OK/NG judgement results.
Connection through a Parallel Interface Sensor Data Unit
FQ2-S1
FQ2-S3 FQ2-S4 FQ2-CH
FQ2-S3 FQ2-S4 FQ2-CH
FQ2-S2
FQ2-S3 FQ2-S4
The FQ2-S/CH series is Vision System that perform measurement processing through measurement objects that are imaged by a Camera. In a system configuration that is connected to a PLC, computer, or other external device, measurement commands can be received from and measurement results can be output to the external device.

FQ2-S/CH Series System Configuration

The following types of system configurations can be used with the FQ2.
8
Confirming the System Configuration
FQ2-S/CH User’s Manual
for Communications Settings
Ethernet (EtherNet/IP, PLC Link, No-protocol, or PROFINET) Connection
Basic configuration External devices
I/O control PLC
Trigger sensor
Setup Tool (Touch Finder or PC Tool)
General-purpose Ethernet cable
Switching hub for EtherNet/IP (industrial Ethernet)
FQ2-S/CH Series
FQ2-S/CH Series
RS-232C Serial Connection
RS-232C
cable
RS-232C Interface Sensor Data Unit
*2
Sensor Data Unit cable
Basic configuration External devices
Sensor control PLC I/O control PLC
Trigger sensor
Setup Tool (Touch Finder or PC Tool)
An RS-232C Interface Sensor Data Unit can be connected to the Sensor by RS-232C cable to enable input of measurement triggers and communication commands, and output of measurement results (judgement results, measured values). Measurement triggers can also be input from a parallel connection.
Ethernet cable can be used to connect to a variety of networks in order to input measurement triggers and communication commands, and to output measurement results (judgement results, measured values). Measurement triggers can also be input from a parallel connection. The data link function for each network (excluding no-protocol networks) can be used to periodically transfer data between the sensor and external devices.
Special Ethernet Cable (RJ45/M12)
*1
General-purpose Ethernet cable
*1: A special Ethernet cable is used to connect to the sensor.
*2: A parallel cable (FQ-SDU2 special-purpose cable) can be used to connect to external devices from the Sensor Data Unit.
In this case, an ACK signal can be used as an additional output signal.
Special Ethernet Cable (RJ45/M12)
FQ2-S1
FQ2-S3 FQ2-S4 FQ2-CHFQ2-S2
FQ2-S3 FQ2-S4 FQ2-CH
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Confirming the System Configuration
9

1-2 Communicating with an External Device

FQ2-S1
FQ2-S2
FQ2-CH
Trigger sensor
PLC
PLC
The measurement results are output.
• Status signals
• Overall judgement
• Measured values
• Character strings
Measurement triggers and other control commands are input.
Sensor
FQ2-S3 FQ2-S4
This section gives the communications specifications, describes the control methods that you can use for communications, and describes the settings that are required before starting communications with an external device.

Basic Control Operations of the Sensor

The following figure shows basic communications between an external device and the Sensor and the flow of signals and data.
The following methods can be used to exchange data between an external device and the Sensor.
10
Commands That Can Be Input to the Sensor from an External Device
Ty p e Description
Control com­mands
Control signals (input signals)
Communications command input
A measurement is executed when a measurement trigger (i.e., an ON TRIG sig­nal) is input. For information on control signals, refer to Control with Control Signals and Status Signals: p.18.
Various commands can be executed, such as measuring commands and scene change. The communications commands depend on the communications proto­col that you use. Refer to the section for each communications protocol for details.
Data Output to an External Device from the Sensor
Ty p e Description
Status signals When the Sensor confirms a control signal or communications command input
and begins measurement processing, the status of the Sensor is reported to the external device through status signals (e.g., a BUSY signal). For information on status signals, refer to Control with Control Signals and Status Signals: p.18.
Overall judgement NG is output whenever there is one or more NGs in the judgement results for mul-
Measured values The measured values from inspection items can be output. The output items must
Communicating with an External Device
tiple inspection items. The overall judgement can be output through the OR signal or through the JG out­put parameter.
*1: This behavior can be changed in the settings.
For information on the OR signal, refer to Control with Control Signals and Status Sig­nals: p.18. For information on the JG output parameter.
be inspection items for output and registered as output data (data 0 to data 31). Refer to the following for details.
Settings Required for Data Output: p.61, 97, 124, 148, 169, 198.
You can also use commands to obtain results after a measurement is performed.
*1
FQ2-S/CH User’s Manual
for Communications Settings
Ty p e Description
Trigger sensor
External device
Status signal
Control signal
Sensor
Character output (FQ2-S4/CH series only)
You can output character strings and numbers that are read by inspection items such as OCR, Barcode, 2D-code, or 2D-code (DPM). Refer to Items That Can Be Output as Output Data: p.22 for details. You can also use commands to obtain results after a measurement is performed.
1

Control Methods for the Sensor

There are three methods that you can use to control the Sensor from a PLC or other external device. They are described in this section. For details on each control method, refer to their corresponding section.
Control Methods
Method Overview Trigger type or area Signals or area used
Control signals and status signals
Control with com­mands and responses
Data output after measurements
Operation is controlled by the ON/OFF status of the Mea­surement Trigger Signal (TRIG) and Command Request Bit (EXE).
Control is performed by send­ing control commands. The execution results of the com­mand can be confirmed in the response from the Sensor.
After a measurement is per­formed, the previously speci­fied measurement data is output automatically.
ON/OFF status of the control signals and status signals
The control command code is stored in the I/O memory of the PLC and then the Request Bit is turned ON.
Not required. (Output is per­formed automatically after measurement.)
Control signals and status sig­nals
PLC I/O memory (Command Area and Response Area)
PLC I/O memory (Data Out­put Area)
1 Control with Control Signals and Status Signals (Refer to Control with Control Signals and
Status Signals: p.18)
Control and status confirmation for the Sensor is performed with the ON/OFF status of the control and status signals.
This method is best suited for basic operations such as measurement triggers or to check the operating status of the Sensor.
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Communicating with an External Device
11
2 Command/Response Method (Refer to Command/Response Method: p.20)
External device
I/O memory
Sensor
Command Area Response Area
(1) Command
(3) Response
Output Area
(2) Command
execution
External device
I/O memory
Sensor
Command Area Response Area
(2) Measurement data
Output Area
(1) Measurement processing
Control is performed by storing the control command and the response to that command in the I/O mem­ory of a PLC.
This method is best suited to send multiple commands to the Sensor without using PLC communications instructions.
3 Data Output after Measurements (Refer to Data Output after Measurements: p.21)
After a measurement is executed, the measurement data specified for output is automatically output to the specified words in the I/O memory of the PLC.
This is suited to reception of the measurement result data of each inspection item.
The Sensor can be controlled from a PLC, computer, or other external device using a variety of communication protocols. The communication protocols that can be used to control the Sensor from an external device are described below.
12
Communicating with an External Device

Communication Protocols for Communication with the Sensor

PLC
Computer
Control can be performed through different communications protocols.
Parallel
PLC Link
No-protocol (TCP)
EtherNet/IP
PROFINET
No-protocol (UDP)
No-protocol (FINS/TCP)
Sensor
FQ2-S/CH User’s Manual
for Communications Settings
Applicable Communications Protocols
The communication protocols of each communication method that can be used with the Sensor are as follows:
OK: Supported, ---: Not supported.
Communi­cations method
Contact inputs
Data shar­ing
Frame transmis­sion
*1: When connected to a CJ-series PLC, specify the areas in the I/O memory. *2: This connection is via the RS-232C Interface Sensor Data Unit. Only supported on the FQ2-S3/S4/CH series.
Communi-
Overview Communications cable type cations protocol
Parallel Data is exchanged between an external device and the
Sensor through combinations of ON/OFF signals from
multiple physical contacts.
PLC Link This is OMRON’s communications protocol for Vision
System.
The control signals, Command Area/Response Area,
and area to store measurement data are assigned in
the I/O memory of the PLC, and data is exchanged
cyclically to share data between the PLC and the Vision
System.
EtherNet/IP This is an open communications protocol.
Tag data links are used for communication with the Sen-
sor.
On the PLC, structure variables are created that corre-
spond to the control signals, command/response data,
and measurement data. These variables are then used
as tags to input and output data through tag data links
to exchange data between the PLC and the Sensor.
PROFINET This is an open communications protocol.
RT (Real-time) of soft real-time communication (SRT) is
used for communication with the Sensor.
The control signals, Command Area/Response Area,
and area to store measurement data are assigned in
the I/O memory of the PLC, and data is exchanged
cyclically to share data between the PLC and the Vision
System.
No-proto­col (TCP) No-proto­col (UDP)
No-proto­col (FINS/ TCP)
Command frames are sent to the Sensor and response
frames are received from the Sensor without the use of
any specific protocol.
Data can be exchanged between the PLC, computer, or
other external device and the Sensor by sending and
receiving ASCII or binary format data.
This is a command system (FINS) for message services
that can be used in common on OMRON networks.
Data can be exchanged between an OMRON PLC and
the Sensor by a command/response method.
*1
Parallel I/O
OK --- OK
--- OK ---
--- OK ---
--- OK ---
--- OK ---
--- OK ---
Ethernet RS-232C
*2
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Communicating with an External Device
13
Connection Compatibility
Note
Yes: Supported, No: Not supported
Type of connection to FQ2-S/CH
EtherNet/IP --- No No Yes Yes Yes Yes Yes
PLC Link on Ethernet No --- No Yes Yes Yes Yes Yes
PROFINET No No --- Yes Yes Yes Yes Yes
TCP no-protocol communi­cations on Ethernet, UDP no-protocol communi­cations on Ethernet
FINS/TCP no-protocol com­munications on Ethernet
RS-232C
Parallel communi­cations
*1: This applies when an RS-232C Interface Sensor Data Unit is connected. *2: This applies when a Parallel Interface Sensor Data Unit is connected.
*1
Sensor’s stan­dard parallel communica­tions
Parallel Inter-
*2
face
Other connection
EtherNet/IP PLC Link
Yes Yes Yes --- No No Yes Yes
YesYesYesNo --- No YesYes
YesYesYesNo No --- YesNo
YesYesYesYesYesYes--- No
YesYesYesYesYesNo No ---
on Ethernet
PROFINET
TCP no-protocol communications on Ethernet, UDP no-protocol communications on Ethernet
FINS/TCP no-proto­col commu­nications on Ethernet
RS-232C *1Parallel communications
Sensor’s standard parallel com­munications
Parallel Interface
*2
Connections Across Network Routers You can connect to a Sensor on a different network than the Touch Finder or PC Tool through a router.
• To connect to a Sensor, directly specify the IP address of the Sensor. Automatic connection to a Sensor is not possible.
• Use a fixed IP address for the Sensor to connect to.
14
Communicating with an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Models That Are Compatible with the Communications Protocols
This section lists the external devices that can communicate with the FQ2-S/CH series for each communications protocol.
PLC Link
OMRON
: Can connect U: Only some models can connect : Cannot connect
Series CPU Unit Interface
Direct connection with CPU unit (built-in port)
SYSMAC_CJ2 CJ2H or CJ2M U (Built-in port only.) CJ1W-EIP21 (PLC Link
SYSMAC_CJ1 CJ1H or CJ1G CJ1W-EIP21 (PLC Link
CJ1M U (Built-in port only.) CJ1W-EIP21 (PLC Link
SYSMAC_CS CS1H, CS1D, or CS1G CS1W-EIP21 (PLC Link
SYSMAC_CP1 CP1L U (Built-in port only.) ---
CP1H CJ1W-EIP21 (PLC Link
SYSMAC_One NSJ NSJW-ETN21
Connection via Ethernet unit
only) or CJ1W-ETN21
only) or CJ1W-ETN21
only) or CJ1W-ETN21
only) or CS1W-ETN21
only) or CJ1W-ETN21
Mitsubishi Electric
: Can connect U:Only some models can connect : Cannot connect
Series Model name CPU Unit CPU name Interface
MELSEC-QnU Universal mod-
MELSEC-Q Series High-
els
Basic models QnCPU Q00JCPU,
performance models
QnUDECPU
QnUDCPU
QnUCPU Q00UJCPU,
QCPU Q02CPU,
Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU, Q10UDEHCPU, Q13UDEHCPU, Q20UDEHCPU, or Q26UDEHCPU
Q03UDCPU, Q04UDHCPU, Q06UDHCPU, Q10UDHCPU, Q13UDHCPU, Q20UDHCPU, or Q26UDHCPU
Q00UCPU, Q01UCPU, or Q02UCPU,
Q00CPU, or Q01CPU
Q02HCPU, Q06HCPU, Q12HCPU, or Q25HCPU
Direct connection with CPU unit (built-in port)
QJ71E71-100, Q71E71-B2,
Connection via Ethernet unit
or QJ71E71-B5
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Communicating with an External Device
15
Series Model name CPU Unit CPU name Interface
MELSEC-QnAS Series
--- --- Q2ASCPU, Q2ASCPU-S1, Q2ASHCPU, or Q2ASHCPU-S1
Direct connection with CPU unit (built-in port)
A1SJ71QE71N3-T
Connection via Ethernet unit
EtherNet/IP
: Can connect U:Only some models can connect : Cannot connect
Series CPU Unit Interface
Direct connection with CPU unit (built-in port)
SYSMAC NJ NJ501 or NJ301 CJ1W-EIP21
SYSMAC_CJ2 CJ2M or CJ2H U (Built-in port only.) CJ1W-EIP21
SYSMAC_CJ1 CJ1H or CJ1G CJ1W-EIP21
CJ1M U (Built-in port only.) CJ1W-EIP21
SYSMAC_CS CS1H, CS1D, or CS1G CS1W-EIP21
Connection via EtherNet/IP unit
No-protocol (TCP), No-protocol (UDP)
OMRON
Series CPU Unit Interface
Direct connection with CPU unit (built-in port)
SYSMAC CJ2 CJ2H or CJ2M --- CJ1W-ETN21
SYSMAC CJ1 CJ1H or CJ1G --- CJ1W-ETN21
CJ1M --- CJ1W-ETN21
SYSMAC CS CS1H, CS1D, or CS1G --- CS1W-ETN21
SYSMAC CP1 CP1L U (Built-in port only.) ---
CP1H --- CJ1W-ETN21
SYSMAC One NSJ --- NSJW-ETN21
Connection via Ethernet unit
No-protocol (FINS/TCP)
OMRON
Series CPU Unit Interface
Direct connection with CPU unit (built-in port)
SYSMAC CJ2 CJ2H or CJ2M U (Built-in port only.) CJ1W-EIP21 or CJ1W-
SYSMAC CJ1 CJ1H or CJ1G --- CJ1W-EIP21 or CJ1W-
CJ1M U (Built-in port only.) CJ1W-EIP21 or CJ1W-
SYSMAC CS CS1H, CS1D, or CS1G --- CS1W-EIP21 or CS1W-
16
Communicating with an External Device
Connection via Ethernet unit
ETN21
ETN21
ETN21
ETN21
FQ2-S/CH User’s Manual
for Communications Settings
Series CPU Unit Interface
Direct connection with CPU unit (built-in port)
SYSMAC CP1 CP1L U (Built-in port only.) ---
CP1H --- CJ1W-ETN21
SYSMAC One NSJ --- NSJW-ETN21
Connection via Ethernet unit
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Communicating with an External Device
17
1-3
FQ2-S1
FQ2-S2
FQ2-CH
Trigger sensor Sensor
(1) Measurement trigger input (TRIG signal: ON).
Control signal
(2) Command received.
(BUSY signal turned ON.)
(3) Judgement results are output.
(OR signal turned ON.)
Status signals
External device

Control Methods Using an External Device

FQ2-S3 FQ2-S4
This section describes the methods that you can use to control the Sensor from a PLC or other external device.

Control with Control Signals and Status Signals

Control and status confirmation for the Sensor is performed with the ON/OFF status of the control and status signals. Measurement triggers and other signals are input as control signals from the PLC. The operating status of the Sensor, judgement results, and other status information can be confirmed through status signals sent from the Sensor.
(1) The external device turns ON the TRIG signal to input a measurement trigger.
(2) When the Sensor confirms that the TRIG signal is ON, it outputs the BUSY signal to the external device
and begins a measurement.
(3) When the Sensor finishes the measurement, it outputs the judgement results on the OR signal.
Control Signals and Status Signals
The types of signals that are input to and output from the sensor as control signals and status signals are shown below. “Use of signal in each protocol” in the table below lets you check whether or not a signal is used in each protocol. Note that this table does not show whether simultaneous use of signals in differing communication protocols is possible. For restrictions on communication protocols that can be used simultaneously, refer to
Connection Compatibility on page 14.
Input Signals (PLC to Sensor)
Signal Signal name Function
EXE Control Com-
mand Execution Signal
TRIG Measure Bit Turn ON this signal to execute
DSA (Used only for handshaking out­put control.)
ERCLR Error Clear Bit
18
Control Methods Using an External Device
Data Output Request Signal
Turn ON this signal (from the PLC) to send a command to the FQ-S/CH series.
measurement.
Use this signal (from the PLC) dur­ing handshaking to request from the FQ-S/CH series the external output of the data output results.
Turn ON this signal to clear the ERR signal from the Sensor Controller.
Signals for each communications protocol
Parallel PLC Link
--- OK OK OK
OK --- OK OK
OK OK OK OK
--- --- OK OK
EtherNet/IP
FQ2-S/CH User’s Manual
for Communications Settings
PROFINET
Signal Signal name Function
IN (IN0 to IN7) Command Input
Signals
These signals are used to input commands from a parallel interface.
Signals for each communications protocol
Parallel PLC Link
OK --- --- ---
EtherNet/IP
PROFINET
Output Signals (Sensor to PLC)
Signal Signal name Function
BUSY Busy Signal
FLG Control Com-
mand Comple­tion Signal
GATE Data Output
Completion Sig­nal
READY Camera Image
Input Enabled Signal
OR
DO (DO0 to DO15)
ERR Error Signal The FQ2-S/CH series provides
Overall Judgement Output Signal
Data Output Sig­nals
This signal tells when new com­mands and other external inputs cannot be acknowledged during pro­cessing of other external inputs. Just because this signal is ON does not necessarily mean that a command is being executed. To check whether a command is being executed, access the Com­mand Completion (FLG) signal.
The FQ2-S/CH series uses this signal to tell the user (PLC) that command execution has been completed.
This signal tells the user (PLC) when to read the measurement results. Data output is enabled when this signal is ON.
This signal tells when the TRIG (Measurement Trigger) signal can be input.
This signal gives the results of the overall judgement.
These signals are used to output parallel data and parallel judge­ments through a parallel inter­face sensor data unit.
notification with this signal when it detects the following errors. Refer to Section 8 Trouble- shooting in Vision Sensor FQ2­S/CH User's Manual (Cat. No. Z337).
• Communication timeout
• TRIG Input while measure­ment
The ERR signal does not turn OFF even after the error is elimi­nated. The signal turns OFF only when the error status is cleared by a control command.
*2
*5
Signals for each communications protocol
Parallel PLC Link
OK OK OK OK
*1
--- OK OK OK
OK OK OK OK
--- --- OK OK
OK --- OK OK
OK --- --- ---
OK OK OK OK
EtherNet/IP
1
Overview of Communication Specifications
PROFINET
FQ2-S/CH User’s Manual for Communications Settings
Control Methods Using an External Device
19
Signal Signal name Function
IN5IN4 through IN0
Execution
Command
Execution
Command
IN7IN6 through IN0
Standard Parallel Parallel Interface Sensor Data Unit
RUN Measurement
Mode Signal
ACK Command Com-
pletion Flag
SHTOUT Exposure Com-
pletion Signal
STGOUT Strobe Trigger
Output
*1: The execution of commands or other processing received through any other protocol cannot be detected.
The parallel BUSY signal can be used in all protocols. If you use more than one protocol and need to detect command execution, use the parallel communications BUSY signal.
*2: This signal is linked to the measurement processing.
It is not associated with the BUSY signal. It is not related to the parallel interface OR signal.
The FQ2-S/CH series turns ON this signal when measurements can be performed and it is in Run Mode.
This signal tells when execution of the DI command has been completed.
This signal tells when Camera exposure has been completed.
This is the trigger signal for the strobe.
Signals for each communications protocol
Parallel PLC Link
OK --- OK OK
OK --- --- ---
OK --- --- ---
OK --- --- ---
EtherNet/IP
PROFINET

Command/Response Method

Parallel
Commands are input to the Sensor by turning the IN signals (Standard Parallel: IN0 to IN5, Parallel Interface Sensor Data Unit: IN0 to IN7) ON and OFF. There is no direct response to these commands. Confirm whether a command was received by checking the BUSY signal. The command code is input with part of the IN signals (Standard Parallel: IN0 to IN4, Parallel Interface Sensor Data Unit: IN0 to IN6), and the command is executed by turning ON the execution bit (Standard Parallel: IN5, Parallel Interface Sensor Data Unit: IN7).
PLC Link, EtherNet/IP, or PROFINET
Command/response control signals can be exchanged by storing control commands from the PLC to the Sensor and responses from the Sensor to the PLC in the I/O memory of the PLC. This enables you to send single measurement and scene switch requests to the Sensor without any sequence control with communications commands from the PLC.
20
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Memory Areas Used by the Command/Response Control Method
(1) Command Area
(5) Response Area
(2) Command
(4) Response
PLC
CPU Unit
I/O memory
(communications areas)
• Switch Scene Number
• Single Measurement, etc.
OK, etc.
(3) Command is processed.
Sensor
Command Area You write the control commands to execute for the Sensor to this area.
Response Area You read the results of executing the control commands that were written to the Command Area
from this area.
Flow of Communications between the PLC and the Sensor
(1) The PLC (the user) writes a control command to a specified PLC I/O memory area (the Command Area).
Parameter Notation Examples for Command Control: p.200
(2) The PLC (the user) then turns ON the EXE bit to send the control command to the Sensor.
(3) The Sensor executes the received control command.
(4) The Sensor returns a response to the PLC after the control command is executed.
(5) The PLC (the user) stores the response in a specified PLC I/O memory area (the Response Area).
The available control commands depend on the communications protocol that is used.
Command List: p.202.
1
Overview of Communication Specifications
No-protocol (TCP) Communications, No-protocol (UDP) Communications, No-protocol (FINS/ TCP) Communications
Communications commands are sent to the Sensor through sequence control in the PLC. An external device and the Sensor communicate through no-protocol communications.

Data Output after Measurements

After a Single Measurement or Start Continuous Measurements command is executed, the Sensor automatically outputs the data that corresponds to the measurements that have been specified as output items to the PLC. This allows you to easily pass measurement results data from the inspection items to the PLC. You can also choose to output only when the PLC meets the conditions that are required to receive the data (i.e., when handshaking is turned ON). The output destination for data depends on the protocol that is used to communicate between the external device and the Sensor, as described below.
PLC Link, EtherNet/IP, or PROFINET
The output data is automatically output to the following area that is specified PLC I/O memory.
Area of Memory Used for Data Output after Measurement
Data Output Area The output data for the measurement is written to this area by the Sensor after execution of the
measurement.
FQ2-S/CH User’s Manual for Communications Settings
Control Methods Using an External Device
21
Flow of Communications between the PLC and the Sensor
Data
Output Area
• Specified data is automatically output.
• Output characters
(2) Data
CPU Unit
PLC
I/O memory
(communications areas)
Sensor
Measurement
execution
(1)
The data to output after measurement and the PLC I/O memory area (Data Output Area) to store that data are specified in advance. ( Setting Required for Data Output: p.61, 97, 124, 148, 169, 198.) (1) Measurement is executed.
(2) After a measurement is executed, the specified measurement data is stored in the Data Output Area in
the PLC.
Parallel
A Parallel Interface Sensor Data Unit can be installed to enable data output. The output data is output to the PLC signal wires via the D signals (D0 to D15). This is only supported on the FQ2-S4/CH series.
No-protocol (TCP) Communications, No-protocol (UDP) Communications
The output data is output to the PLC reception buffer through non-procedure (normal) communications.
Items That Can Be Output as Output Data
Measurement Data
The following data items can be output by allocating measurement results and judgement results to output data 0 to output data 31.
• Judgement result
• Measured parameters (correlation values, reference coordinates, etc.)
• Results calculated based on the values of the measured parameters
• Judgement results from expression results (Parallel Judgement Output)
Character Output (This is Only Supported on the FQ2-S4/CH Series.)
After measurement, you can automatically output character strings that are read by OCR and other inspection items to the PLC. Character strings can be output for the following inspection items.
•OCR
• Bar code
•2D-code
•2D-code (DPM)
Number of Characters That Can Be Output
The number of characters that can be output are shown below for each inspection item.
22
• OCR: Max. 128 characters
• Bar code, 2D-code, 2D-code (DPM): Max. 1024 characters
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
For the character output setting procedures and output specifications for each communication type, refer to the
Note
CR
Before conversion After conversion
LF
&h0D
&h7F
&h8541
DEL
&h8543
Character code
&h0A
&hFF
&h8542
&h8544
FF
following:
Outputting Character Strings
• EtherNet/IP: p.101
• PLC link: p.128
• PROFINET: p.151
• No-protocol (TCP), No-protocol (UDP): p.175
• Endian Little endian data is output.
• Code Conversion The converted codes are outputted for the following character codes.
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Control Methods Using an External Device
23
Order of Output of Measurement Data and Characters (Only Supported on the FQ2-S4/CH Series)
When measurement data the data (output data settings 0 to 31) and characters are output together, the characters are output after the data such as inspection item parameters and calculation results are output.
Example: Read result 1: ABC Read result 2: 0123 [Data output] [Data 0]: 3 (Number of characters: 1) [Data output] [Data 1]: 4 (Number of characters: 2) The following information will be output for the above.
EtherNet/IP, PLC Link, PROFINET
Increment from first address in output area
+0 Data 0 (4 bytes) Inspection item 0: Number of characters
+1
+2 Data 1 (4 bytes) Inspection item 1: Number of characters
+3
+4 ‘B’ ‘A’ Inspection item 0: Characters “ABC”
+5 00 ‘C’
+6 ‘1’ ‘0’ Inspection item 1: Characters “0123”
+7 ‘3’ ‘2’
+8 00 Filled with zeros. (Only when the character string length is not a
Output data Assigned output data
Upper byte Lower byte
multiple of 4.)
No-protocol (TCP)
3 (Field delimiter) 4 (Record delimiter) ABC (Field delimiter) 0123 (Record delimiter) CR CR is Delimiter, CR is not output by No-protocol (UDP) Communications.
24
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Output Data Size and Number of Output Data Upper Value Setting (EtherNet/IP, PLC Link, PROFINET)
Data 0
Output data Setting
Data 1 Data 2
I0.X[0] Inspection item 0: Position X for Search I0.Y[0] Inspection item 0: Position Y for Search LPC
(0,30,I1.X,I1.Y)
Inspection item 1: Position X 1st point for Shape Search II
Inspection item 1: Position X 30th point for Shape Search II Inspection item 1: Position Y 1st point for Shape Search II
Inspection item 1: Position Y 30th point for Shape Search II
Data 3 LPR
(0,10,I2.X,I2.Y)
Inspection item 2: Position X 1st point for Shape Search II Inspection item 2: Position Y 1st point for Shape Search II
Inspection item 2: Position X 10th point for Shape Search II Inspection item 2: Position Y 10th point for Shape Search II
328 bytes
When more than one inspection result is output, the size of the data that is output for the data output settings could exceed the limit that is set in the [Max output data] (number of output data upper value) parameter setting. If that occurs, increase the set value of the number of output data upper value setting or adjust the output data settings so that data output size is not exceeded. If the size of the data that is output exceeds the data size that can actually be output (output data limit), the remaining data is handled as follows in each communication protocol.
• EtherNet/IP, PROFINET: The remaining data is divided and output over several cycles.
• PLC Link: The remaining data is discarded.
Example Output data size: 328 bytes Number of output data upper value setting: 256 bytes Data Output Settings
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Control Methods Using an External Device
25
EtherNet/IP, PROFINET
+0
Output data Assigned output data
+1
Output data 0 (4 bytes)
Output data 1 (4 bytes)
Output data 2 (4 bytes)
Output data 31 (4 bytes)
Output data 32 (4 bytes)
Output data 61 (4 bytes)
Output data 62 (4 bytes)
Output data 63 (4 bytes)
Output data 0 (4 bytes)
Output data 6 (4 bytes)
Output data 7 (4 bytes)
Inspection item 0: Position X for Search
+2 +3
Inspection item 0: Position Y for Search
+4 +5
Inspection item 1: Position X 1st point for Shape Search II
+62 +63
Inspection item 1: Position X 30th point for Shape Search II
+64 +65
Inspection item 1: Position Y 1st point for Shape Search II
+122 +123
Inspection item 1: Position Y 30th point for Shape Search II
+124 +125
Inspection item 2: Position X 1st point for Shape Search II
+126 +127
Inspection item 2: Position Y 1st point for Shape Search II
+0 +1
Inspection item 2: Position X 2nd point for Shape Search II
+12 +13
Inspection item 2: Position X 10th point for Shape Search II
+14 +15
Inspection item 2: Position Y 10th point for Shape Search II
Offset from first address in output area
256 bytes (Data that is output the first cycle.
*1
)
72 bytes (Data that is output the second cycle.
*2
)
The output data that is assigned is output to the output area as shown below. Output data that exceeds the size (e.g., 256 bytes) that is set for the output data size parameter is separated over more than one cycle. To ensure that no data is lost when receiving data that is divided and output over several cycles, use the handshake function.
Data Output Control with Handshaking: p.30
*1: At the first data output, a GATE (Data Output Completion) signal is output. *2: If the size of the specified output data exceeds the set value of the output data size setting, the data is output separately as shown below.
26
Control Methods Using an External Device
Output data size setting: 256 bytes
First Data Output
Output data 0 Output data 0
Output data 63
256 bytes
Second Data Output
Output data 7
Zeros are written to unused bytes.
72 bytes
The previous data will be overwritten. Adjust the timing with handshaking to get the data.
FQ2-S/CH User’s Manual
for Communications Settings
PLC Link
+0
Output data Assigned output data
+1
Output data 0 (4 bytes)
Output data 1 (4 bytes)
Output data 2 (4 bytes)
Output data 31 (4 bytes)
Output data 32 (4 bytes)
Output data 61 (4 bytes)
Output data 62 (4 bytes)
Output data 63 (4 bytes)
Output data 64 (4 bytes)
Output data 65 (4 bytes)
Output data 66 (4 bytes)
Inspection item 0: Position X for Search
+2 +3
Inspection item 0: Position Y for Search
+4 +5
Inspection item 1: Position X 1st point for Shape Search II
+62 +63
Inspection item 1: Position X 30th point for Shape Search II
+64 +65
Inspection item 1: Position Y 1st point for Shape Search II
+122 +123
Inspection item 1: Position Y 30th point for Shape Search II
+124 +125
Inspection item 2: Position X 1st point for Shape Search II
+126 +127
Inspection item 2: Position Y 1st point for Shape Search II
+128 +129
Inspection item 2: Position X 2nd point for Shape Search II
+160 +161
Inspection item 2: Position X 10th point for Shape Search II
+162 +163
Inspection item 2: Position Y 10th point for Shape Search II
Offset from first address in output area
256 bytes (Data that is output the first cycle.)
72 bytes (The data that exceeds the set upper limit is discarded.)
The output data that is assigned is output to the output area as shown below. Any output data that exceeds the set value of the [Max output data] (number of output data upper value) parameter setting (e.g., 256 bytes) is discarded. For the [Max output data] setting, refer to Initial Settings for PLC Link Communications on page 122.
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual for Communications Settings
Control Methods Using an External Device
27
Parallel Output of Measurement Data (Only Supported on the FQ2-S3/S4/CH Series)
4 bytes
Parallel data output
PLC
0. Measurement data 0
31. Measurement data 31
Reception buffer
Data output order
Measurement data 31
Measurement data 0
GATE signal
D0 to D31 signals
ON
OFF
Parallel judgement output D0
Parallel data output (data 0)
Parallel judgement output D1
Parallel data output (data 0)
Parallel judgement output D15
Parallel data output (data 0)
D0
D1
D15
When a Parallel Interface Sensor Data Unit is connected to the Sensor, the two types of data output below can be performed, in addition to output of measurement judgement results.
Output data type Output data
Parallel Data Output The measurement data is output. A maximum of 32 items can be output.
Parallel Judgement Output The judgement results are output. A maximum of 16 judgement result items can be
output. The following two types of judgement results can be output:
• Judgement results for specified inspection items
• Judgement results of set judgement conditions for the specified item values
Order of Parallel Data Output
Parallel Output of Multiple Items
Items set to output numbers 0 to 31 of parallel data output are output by item (4 bytes) in ascending order to the reception buffer of the PLC. The GATE signal turns OFF > ON When this occurs, the first data item that was output to the PLC reception buffer (data 0) is overwritten by the next output data item (data 1). Therefore, the data output to the PLC reception buffer must be saved to PLC memory each time the GATE signal turns ON for each data item.
*1
at each output.
*1: The operation of the DSA signal depends on whether handshaking for output control is enabled. Data Output Control with Handshak-
Data Output Timing
Output Sequence
If both parallel judgement output and parallel data output are performed at the same time, parallel judgement output will be performed first followed by parallel data output.
Example: Parallel Judgement Output of D0 to D15 and Parallel Data Output of Data 0
28
Control Methods Using an External Device
ing: p.30.
FQ2-S/CH User’s Manual
for Communications Settings
Loading...
+ 414 hidden pages