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.
NOTE
All rights reserved. No part of this publication may be reproduced, stored in
a retrieval system, or transmitted, in any form, or by any means, mechanical,
electronic, photocopying, recording, or otherwise, without the prior written
permission of OMRON.
No patent liability is assumed with respect to the use of the information
contained herein. Moreover, because OMRON is constantly striving to improve
its high-quality products, the information contained in this manual is subject
to change without notice. Every precaution has been taken in the preparation of
this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions.
Neither is any liability assumed for damages resulting from the use of the information
contained in this publication.
Trademarks
Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan
and other countries for OMRON factory automation products.
Microsoft, Windows, Windows Vista, Excel, and Visual Basic are either registered trademarks or
trademarks of Microsoft Corporation in the United States and other countries.
Intel, Core and Pentium are trademarks of Intel Corporation in the U.S. and/or other countries.
ODVA, CIP, CompoNet, DeviceNet, and EtherNet/IP are trademarks of ODVA.
QR Code is a registered trademark of DENSO WAVE INCORPORATED.
MELSEC is trademark of Mitsubishi Electric Corporation.
Other company names and product names in this document are the trademarks or
registered trademarks of their respective companies.
Copyrights
Microsoft product screen shots reprinted with permission from Microsoft Corporation.
Page 3
APPLICA TION CONSIDERA TIONS
(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
Page 4
Product manuals
Important
Note
2-2 Par
FQ2-CH1
FQ2-S1FQ2-S2FQ2-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.
ManualDescriptionContents
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 operate the sensor by remote control.
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 f ull product p erformance,
such as operational precautions.
2
Indicates application procedures.
Indicates pages where related information can be found.
1-3 Control Methods Using an External Device. . . . . . . . . . . . . . . . . . . . . 19
1
Overview of Communication Specifications
Page 10
1-1Confirming 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 configurationExternal 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-S3FQ2-S4FQ2-CH
FQ2-S3FQ2-S4FQ2-CH
FQ2-S2
FQ2-S3FQ2-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
Page 11
Ethernet (EtherNet/IP, PLC Link, No-protocol, or PROFINET) Connection
Basic configurationExternal 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 configurationExternal 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-S3FQ2-S4FQ2-CHFQ2-S2
FQ2-S3FQ2-S4FQ2-CH
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Confirming the System Configuration
9
Page 12
1-2Communicating 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-S3FQ2-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.
Commands That Can Be Input to the Sensor from an External Device
TypeDescription
Control commands
Control signals
(input signals)
Communications
command input
A measurement is executed when a measurement trigger (i.e., an ON TRIG signal) is input.
For information on control signals, refer to Control with Control Signals and
Status Signals: p.19.
Various commands can be executed, such as measuring commands and scene
change. The communications commands depend on the communications protocol that you use. Refer to the section for each communications protocol for
details.
Data Output to an External Device from the Sensor
TypeDescription
Status signalsWhen 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.19.
Overall judgementNG is output whenever there is one or more NGs in the judgement results for mul-
tiple inspection items.
The overall judgement can be output through the OR signal or through the JG
output parameter.
*1:This behavior can be changed in the settings.
For information on the OR signal, refer to Control with Control Signals and Status Signals: p.19.
For information on the JG output parameter.
*1
10
Communicating with an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 13
TypeDescription
Trigger sensor
External device
Status signal
Control signal
Sensor
Measured valuesThe measured values from inspection items can be output. The output items must
Character output (FQ2-S4/CH
series only)
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, 127, 153, 175, 204.
You can also use commands to obtain results after a measurement is performed.
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 11
: p.25 for details.
You can also use commands to obtain results after a measurement is performed.
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
MethodOverviewTrigger type or areaSignals or area used
Control signals and
status signals
Control with commands and
responses
Data output after
measurements
Operation is controlled by the
ON/OFF status of the Measurement Trigger Signal
(TRIG) and Command
Request Bit (EXE).
Control is performed by sending control commands. The
execution results of the command can be confirmed in the
response from the Sensor.
After a measurement is performed, the previously specified 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 performed automatically after
measurement.)
Control signals and status signals
PLC I/O memory (Command
Area and Response Area)
PLC I/O memory (Data Output
Area)
1
Overview of Communication Specifications
1Control with Control Signals and Status Signals (Refer to Control with Control Signals and
Status Signals: p.19)
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 tri ggers or to c heck the o perating
status of the Sensor.
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
11
Page 14
2Command/Response Method (Refer to Command/Response Method: p.22)
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 memory of a PLC.
This method is best suited to send multiple commands to t he Sensor without using PLC communi cations
instructions.
3Data Output after Measurements (Refer to Data Output after Measuremen ts: p.23)
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 in spection item.
The Sensor can be controlled from a PLC, comput er, 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 dierent communications protocols.
Parallel
PLC Link
No-protocol (TCP)
No-protocol (RS-232C)
EtherNet/IP
PROFINET
No-protocol (UDP)
No-protocol (FINS/TCP)
Sensor
FQ2-S/CH User’s Manual
for Communications Settings
Page 15
Applicable Communications Protocols
The communication protocols of each communication method that can be used with the Sensor are as fol lows:
OK: Supported, ---: Not supported.
Communications
method
Contact
inputs
Data sharing
Communications
protocol
ParallelData is exchanged between an external device and the
Sensor through combinations of ON/OFF signals from
multiple physical contacts.
Controlling Operation and Outputting Data with the
Sensor's Standard Parallel Connection: p.34
PLC LinkThis 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.
Controlling Operation and Outputting Data with PLC
Link Communication: p.122
EtherNet/IP This is an open communications protocol.
Tag data links are used for communication with the Sensor.
On the PLC, structure variables are created that correspond 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.
Overview
*1
Communications cable type
Parallel
Ethernet RS-232C
I/O
OK------
---OK---
---OK---
1
Overview of Communication Specifications
PROFINET This is an open communications protocol.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with Eth-
erNet/IP Communication: p.88
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.
Controlling Operation and Outputting Data through
PROFINET: p.144
Communicating with an External Device
---OK---
13
Page 16
Communications
method
Communications
protocol
Overview
Communications cable type
Parallel
I/O
Command frames are sent to the Sensor and response
frames are received from the Sensor without the use of
any specific protocol.
No-protocol
(TCP)
No-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.
---OK---
(UDP)
Control and Output in No-Protocol (TCP) / No-Proto-
col (UDP): p.173
Frame
transmis-
*1
sion
No-protocol
(RS-232C)
Commands or inspect item parameters are transfered or
received between Sensor Data Unit and or RS-232C
cables in No-protocol communication.
------OK
Introduction to RS-232C Connections: p.202
This is a command system (FINS) for message services
that can be used in common on OMRON networks. Data
No-protocol
(FINS/TCP)
can be exchanged between an OMRON PLC and the
Sensor by a command/response method.
---OK---
Controlling Operation and Outputting Data with
FINS/TCP No-protocol Commands p.193
*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.
Ethernet RS-232C
*2
Connection Compatibility
Yes: Supported, No: Not supported
Other connection
Type of connection to
FQ2-S/CH
EtherNet/IP---NoNoYesYesYesYesYes
PLC Link on EthernetNo---NoYesYesYesYesYes
PROFINETNoNo---YesYesYesYesYes
TCP no-protocol communi-
cations on Ethernet,
UDP no-protocol communications on Ethernet
FINS/TCP no-protocol communications on Ethernet
RS-232C
Parallel
communications
*1
Sensor’s standard parallel
communications
Parallel Inter-
*2
face
EtherNet/IP PLC Link
on Ethernet
YesYesYes---NoNoYesYes
YesYesYesNo---NoYesYes
YesYesYesNoNo---YesNo
YesYesYesYesYesYes---No
YesYesYesYesYesNoNo---
PROFINET
TCP no-protocol
communications on
Ethernet,
UDP no-protocol
communications
on Ethernet
FINS/TCP
no-protocol communications
on Ethernet
RS-232C *1Parallel communications
Sensor’s
standard
parallel com munications
Parallel
Interface
*2
*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.
14
Communicating with an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 17
Connections Across Network Routers
Note
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.
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 : Only some models can connect : Cannot connect
Interface
SeriesCPU Unit
SYSMAC NJNJ-501 or NJ-301CJ1W-EIP21(V2.1or later)
SYSMAC_CJ2CJ2H or CJ2M
CJ1H or CJ1GCJ1W-EIP21 (PLC Link only)
SYSMAC_CJ1
SYSMAC_CSCS1H, CS1D, or CS1GCS1W-EIP21 (PLC Link only)
SYSMAC_CP1
SYSMAC_OneNSJNSJW-ETN21
CJ1M
CP1L
CP1HCJ1W-EIP21 (PLC Link only)
Direct connection with CPU unit
(built-in port)
(Built-in port only.)
(Built-in port only.)
(Built-in port only.)
Connection via Ethernet unit
Needs the NJ series version1. 01
or later.
CJ1W-EIP21 (PLC Link only)
CJ1W-ETN21
CJ1W-ETN21
CJ1W-EIP21 (PLC Link only)
CJ1W-ETN21
CS1W-ETN21
---
CJ1W-ETN21
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
15
Page 18
Mitsubishi Electric
SeriesModel nameCPU UnitCPU name
QnUDECPU
Universal models
MELSEC-QnU
MELSEC-Q Series
MELSEC-QnAS
Series
Basic modelsQnCPU
Highperformance models
------
QnUDCPU
QnUCPU
QCPU
: Can connect :Only some models can connect : Cannot connect
Interface
Q03UDECPU,
Q04UDEHCPU,
Q06UDEHCPU,
Q10UDEHCPU,
Q13UDEHCPU,
Q20UDEHCPU,
or Q26UDEHCPU
Q03UDCPU,
Q04UDHCPU,
Q06UDHCPU,
Q10UDHCPU,
Q13UDHCPU,
Q20UDHCPU,
or Q26UDHCPU
Q00UJCPU,
Q00UCPU,
Q01UCPU, or
Q02UCPU,
Q00JCPU,
Q00CPU, or
Q01CPU
Q02CPU,
Q02HCPU,
Q06HCPU,
Q12HCPU, or
Q25HCPU
Q2ASCPU,
Q2ASCPU-S1,
Q2ASHCPU, or
Q2ASHCPU-S1
Direct connection with CPU
unit (built-in port)
A1SJ71QE71N3-T
Connection via Ether-
net unit
QJ71E71-100
Q71E71-B2
QJ71E71-B5
EtherNet/IP
SeriesCPU Unit
SYSMAC NJNJ501 or NJ301CJ1W-EIP21(v.2.1 or later.)
SYSMAC_CJ2CJ2M or CJ2H
SYSMAC_CJ1
SYSMAC_CSCS1H, CS1D, or CS1GCS1W-EIP21
16
Communicating with an External Device
CJ1H or CJ1GCJ1W-EIP21
CJ1M
: Can connect :Only some models can connect : Cannot connect
Interface
Direct connection with CPU
unit (built-in port)
(Built-in port only.)
(Built-in port only.)
Connection via EtherNet/IP
For NJ series, v. 1.01 or later.
CJ1W-EIP21
CJ1W-EIP21
for Communications Settings
unit
FQ2-S/CH User’s Manual
Page 19
No-protocol (TCP), No-protocol (UDP)
OMRON
Interface
SeriesCPU Unit
SYSMAC NJNJ501 or NJ301
SYSMAC CJ2CJ2H or CJ2M---CJ1W-ETN21
SYSMAC CJ1
SYSMAC CSCS1H, CS1D, or CS1G---CS1W-ETN21
SYSMAC CP1
SYSMAC OneNSJ---NSJW-ETN21
CJ1H or CJ1G---CJ1W-ETN21
CJ1M---CJ1W-ETN21
CP1L
CP1H---CJ1W-ETN21
Direct connection with CPU
unit (built-in port)
(Built-in port only.)
(Built-in port only.)
Connection via Ethernet unit
No-protocol (FINS/TCP)
OMRON
1
---
---
Overview of Communication Specifications
Interface
SeriesCPU Unit
SYSMAC CJ2CJ2H or CJ2M
CJ1H or CJ1G---CJ1W-EIP21
SYSMAC CJ1
SYSMAC CSCS1H, CS1D, or CS1G---CS1W-EIP21
SYSMAC CP1
SYSMAC OneNSJ---NSJW-ETN21
CJ1M
CP1L
CP1H---CJ1W-ETN21
Direct connection with CPU
unit (built-in port)
(Built-in port only.)
(Built-in port only.)
(Built-in port only.)
Connection via Ethernet unit
CJ1W-EIP21
CJ1W-ETN21
CJ1W-ETN21
CJ1W-EIP21
CJ1W-ETN21
CS1W-ETN21
---
FQ2-S/CH User’s Manual
for Communications Settings
* When you use CJ1W-SCU22 or CJ1W-SCU42, you can connect to it version 2.0, or later.
18
Communicating with an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 21
1-3
FQ2-S1
FQ2-S2
FQ2-CH
Trigger sensorSensor
(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
This section describes the methods that you can use to cont rol the Sensor from a PLC or other external device.
Control Methods Using an External Device
FQ2-S3FQ2-S4
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 th e PLC.
The operating status of the Sensor, judgment 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 devi c e
and begins a measurement.
(3) When the Sensor finishes the measurement, it outputs the judgement results on the OR signal.
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
19
Page 22
Control Signal 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)
SignalSignal nameFunction
Control Com-
EXE
TRIGMeasure BitTurn ON this signal to execute mea-
DSA
(Used only
for handshaking output
control.)
ERCLRError Clear Bit
IN (IN0 to
IN7)
mand Execution
Signal
Data Output
Request Signal
Command Input
Signals
Turn ON this signal (from the PLC) to
send a command to the FQ-S/CH
series.
surement.
Use this signal (from the PLC) during
handshaking to request from the FQS/CH series the external output of the
data output results.
Turn ON this signal to clear the ERR
signal from the Sensor Controller.
These signals are used to input commands from a parallel interface.
Output Signals (Sensor to PLC)
SignalSignal nameFunction
This signal tells when new commands
and other external inputs cannot be
BUSYBusy Signal
Control Com-
FLG
mand Completion Signal
acknowledged during processing 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 Command Completion (FLG) signal.
The FQ2-S/CH series uses this
signal to tell the user (PLC) that
command execution has been
completed.
*1
Signals for each communications protocol
ParallelPLC Link
---OKOKOK
OK---OKOK
OKOKOKOK
------OKOK
OK---------
EtherNet/IP
PROFINET
Signals for each communications protocol
ParallelPLC Link
OKOKOKOK
--- OKOKOK
EtherNet/IP
PROFINET
20
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 23
SignalSignal nameFunction
Data Output
GATE
READY
OR
DO (DO0 to
DO15)
ERRError Signal
RUN
ACK
SHTOUTExposure Com-
STGOUTStrobe Trigger
Completion Signal
Camera Image
Input Enabled
Signal
Overall Judgement Output Signal
Data Output Signals
Measurement
Mode Signal
Command Completion Flag
pletion Signal
Output
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 judgements through a parallel interface
sensor data unit.
The FQ2-S/CH series provides
notification with this signal when it
detects the following errors.
Refer to Section 8 Troubleshooting in Sensor FQ2-S/CH
User's Manual (Cat. No. Z337).
• Communication timeout
• TRIG Input while measurement
The ERR signal does not turn OFF
even after the error is eliminated.
The signal turns OFF only when
the error status is cleared by a control command.
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.
*2
Signals for each communications protocol
ParallelPLC Link
OKOKOKOK
EtherNet/IP
PROFINET
1
------OKOK
*5
OK---OKOK
OK---------
OKOKOKOK
OK---OKOK
OK---------
OK---------
OK---------
Overview of Communication Specifications
*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.
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
21
Page 24
Command/Response Method
IN5 IN4 through IN0
Execution
Command
Execution
Command
IN7 IN6 through IN0
Standard ParallelParallel Interface Sensor Data Unit
(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
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.
Memory Areas Used by the Command/Response Control Method
Command AreaYou write the control commands to execute for the Sensor to this area.
Response AreaY ou 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.206
(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.
Communications commands are sent to the Sensor through sequence control in the PLC. An external device
and the Sensor communicate through no-protocol communications.
1
Data Output af ter Measurements
After a Single Measurement or Start Continuous Measurements command is executed, the Sensor
automatically outputs the data t hat correspo nds t o 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 PL C. 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 AreaThe output data for the measurement is written to this area by the Sensor after execution of the
measurement.
Overview of Communication Specifications
Flow of Communications between the PLC and the Sensor
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, 127, 153, 175, 204.)
(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.
• 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.
• OCR: Max. 128 characters.(Number of characters per line is 80. Maximum number of line is 4.)
• Bar code, 2D-code, 2D-code (DPM): Max. 1024 characters
For the character output setting procedures and output specifica tions for each co mmunicat ion type, ref er to the
following:
Outputting Character Strings
• EtherNet/IP: p.101
• PLC link: p.131
• PROFINET: p.156
• No-protocol (TCP), No-protocol (UDP): p.181
• Endian
• Code Conversion
24
Little endian data is output.
The converted codes are outputted for the following character codes.
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 27
Output Order of Measurement Data and Output 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 calcul ation results are output.
Example:
・ Inspection item 0: Bar code
As the read result is
"ABC".
・ Inspection item 1: OCR
As the read result is 2 lines.
The first line is
The second line is
"012".
"345".
・ [Data output] - [Data 0]: 3 (Number of characters for Bar code.)
・ [Data output] - [Data 1]: 6 (Number of characters for OCR.)
EtherNet/IP, PLC Link, PROFINET
Increment from first
address in output area
+0
+1
+2
+3
+4‘B’‘A’Inspection item 0: Characters "ABC" for Bar code.
+500‘C’
+6‘1’‘0’Inspection item 1: The first line is "012".
+7‘3’‘2’
+8‘5’‘4’
+9‘00’‘00’00 are inserted to make the character length to the integer multi-
Output dataAssigned output data
Upper byte Lower byte
Data 0 (4 bytes)Inspection item 0: Number of characters for Bar code.
Data 1 (4 bytes)Inspection item 1: Number of char acters for OCR.
‘00’ is in-sorted for the character length is 4 of integral multiplication.
Inspection item 2: The second line is "345".
Characters are output continuously without spaces between the
lines.
ple of 4.
1
Overview of Communication Specifications
No-protocol (TCP)
3 (Field delimiter) 6 (Record delimiter) ABC (Field delimiter) 012(Line delimiter) 345(Record delimiter) CR
CR is Delimiter, CR is not output by No-protocol (UDP) Communications.
*1 When No-protocol communication is selected, the delimiter is not output.
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
25
Page 28
Output Data Size and Number of Output Data Upper Value Setting (EtherNet/IP, PLC Link, PROFINET)
Data 0
Output dataSetting
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 3LPR
(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
26
Control Methods Using an External Device
for Communications Settings
FQ2-S/CH User’s Manual
Page 29
EtherNet/IP, PROFINET
+0
Output dataAssigned 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.31
1
Overview of Communication Specifications
*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.
FQ2-S/CH User’s Manual
for Communications Settings
Output data size setting: 256 bytes
First Data Output
Output data 0 Output data 0
Output data 63
Second Data Output
256
bytes
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.
Control Methods Using an External Device
27
Page 30
PLC Link
+0
Output dataAssigned 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 out put 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 124.
28
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 31
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 typeOutput data
Parallel Data OutputThe measurement data is output. A maximum of 32 items can be output.
The judgement results are output. A maximum of 16 judgement result items can be
Parallel Judgement Output
output. The following two types of judgement results can be output:
• Judgement r esults for specified inspection items
• Judgement r esults 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
*1
at each output.
When this occurs, the first data item that was output to the PLC reception buffer (data 0) is overw ritten by t he
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
Overview of Communication Specifications
*1:The operation of the DSA signal depends on whether handshaking for output control is enabled. Data Output Control with Handshak-
ing: p.31.
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
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
29
Page 32
Timing Chart
Overall judgement
Parallel
judgement output
(D0 to D15)
BUSY signal
OFF
ON
OR signal
D signals
OFF
ON
RUN signal
OFF
ON
TRIG signal
OFF
ON
GATE signal
OFF
ON
Measurements executed.
GATE
ON delay
Output time
Output period
Run Mode entered.
ON for 1 ms min.
Setup Mode entered.
The FQ2 starts measurements when it detects the rising edge
(OFF to ON transition) of the TRIG signal.
The following timing chart shows the data output timing for parallel judgement outputs.
30
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is ready to take measurement and it is in Run Mode.
The RUN signal is OFF in Setup Mode. Change to Run Mode for operation.
This signal is ON when the Sensor is performing measurements, changing scenes, or performing other
BUSY
GATE
Input Signals
tasks. Do not input the next command while the BUSY signal is ON.
The process that is currently being executed and the command that is input will not be executed correctly.
ORThis signal outputs the overall judgement. The signal is valid when the measurements are completed (i.e.,
when the BUSY signal changes from ON to OFF).
These signals output the parallel judgement output data and the calculation results of the expressions that
are set for parallel data output.
D
Y ou can set whether the signal turns ON for an OK or for an NG judgement in the [Judgment output condition] output setting.
Changing the Judgement Output ON Conditions: p.44
This signal is used to control the timing of reading the D signals at an external device.
It is turned ON for the period of time that is required to reliably read the D signals at the external device.
Set the output period so that the total output time is shorter than the measurement interval (i.e., the TRIG
signal input interval).
The GATE signal is output only if p arallel judgement output and parallel dat a output are set. The OR signal
will be ON while the TRIG signal can be input.
SignalFunction
This signal is used to input a measurement trigger from an external device, such as a photoelectric switch.
TRIG
Control Methods Using an External Device
One measurement is performed on the rising edge (OFF to ON transition) of the TRIG signal. Keep the
TRIG signal ON for at least 1 ms.
FQ2-S/CH User’s Manual
for Communications Settings
Page 33
Data Output Control with Handshaking
External device
(1) DSA signal
(3) Measurement results output
(2) GATE signal
Sensor
The timing for data output can be controlled through the DSA and GATE signals.
The handshake function can only be used with EtherNet/IP, PLC Link, PROFINET, and parallel communication
(when a Sensor Data Unit is used).
Requirements for Using Data Output Control with Handshaking
To use data output control, set the output control method to [Handshaking] in the communications protocol
settings. For details, refer to Communications Specifications Settings for each communications protocol.
• Parallel Communications: Refer to Setting Data Communications Specifications: p.66.
• PLC Link Communications: Refer to Setting Up PLC Link Communications: p.124.
• EtherN et/IP and PROFINET Communications: Refer to Communications Specifications Settings (p.92 or
p.149).
Handshaking
If the external device does not turn ON the DSA signal, the measurement dat a will not be outp ut to the external
device from the Sensor.
While the DSA signal is ON, the GATE signal turns ON when the measurement data is output from the Sensor.
The external device receives the measurement data when the GATE signal turns ON.
Signals Used for Handshaking
SignalNameDescription
DSAData Output Request SignalThis signal is sent from the external device (PLC) to the Sensor to
request data output.
This signal is sent by the Sensor to the external device (PLC) to
GATEData Output Completion Signal
tell the PLC when to receive the output data. This signal is sent
only while the DSA signal is ON.
*1
1
Overview of Communication Specifications
*1:If handshaking is not enabled for output control, the GATE signal will also be turned ON when data is output from the Sensor.
(1) The PLC turns ON the DSA signal and waits for the output data.
(2) The Sensor turns ON the GATE signal when the DSA signal is ON and it is ready to output the
measurement results.
(3) The Sensor turns ON the GATE signal and outputs the output data.
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
31
Page 34
Receiving Divided Output Data (Using EtherNet/IP)
In EtherNet/IP, if the data size of the set output data exceeds the data size that the Sensor can actually output
in one cycle (256 bytes), the data is divided and output over multiple cycles.
In this case, use handshaking as shown below to receive the multiple cycles of output data.
Example: EtherNet/IP Communications with Handshaking
Measurement trigger
(e.g., TRIG signal) ON
Wait for the first cycle
of output data.
Wait for the second
cycle of output data.
Data Output Request
(DSA) signal
Result Completion
(GATE) signal
Output data
(DATA 0 to 7)
ON
OFF
ON
OFF
ON
OFF
First cycle of
output data
(256 bytes)
(2) (3)(4)(1)
Second cycle of
output data
1When the first data is received, the user (PLC) turns ON the measurement trigger and the DSA
signal.
2The Sensor turns ON the GATE signal when the DSA signal is turned ON and outputs the first
data.
3The user (PLC) turns OFF the DSA signal again when the GATE signal turns ON. Then, the user
(PLC) confirms the output data received in the PLC Data Output Area and moves the received
data to another area in PLC I/O memory.
4The Sensor confirms that the DSA signal is OFF and automatically turns OFF the GATE signal.
5When reception of the output data is completed and the GATE signal turns OFF, the user (PLC)
turns on the DSA signal again and waits for the second cycle of data which could not be sent in
the first cycle and was divided.
6When the second data is output, the second data output is received when the GATE signal is
turned ON and steps 3 and 5 above are repeated.
Steps 3 through 5 above are repeated for all subsequent data output items.
32
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Page 35
Controlling Operation and Outputting Data with a Parallel Conne ction
2-1 Controlling Operation and Outputting Data with the Sens or's
Controlling Operation and Outputting Data with a Par-
Page 36
2-1
(2) Measurements
performed
(1) Measurement
trigger input
(3) Judgement
results output
Trigger Sensor
FQ2 Vision Sensor
External device
(3) Judgement results
output (overall
judgement: OR
signal)
Retained until the next
judgement results are
output.
Turned ON when overall judgement is NG.
(2) Executing
measurement
processing
(BUSY signal)
This signal stays ON until the next
measurement trigger can be input.
*1
You can confirm if measurements are in progress.
The trigger to perform measurements once is turned ON.
(1) Measurement
trigger input
(TRIG signal)
ON
OFF
ON
OFF
ON while measurements are in progress
Measurement
trigger input
(TRIG signal)
OFF
ON
BUSY signal
OFF
ON
OFF
ON
READY signal
ON while measurements are in progress
OFF while measurements are in progress
When the measurement
trigger is received, the BUSY
signal turns ON and the
READY signal turns OFF.
Important
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
This section explains how to directly connect the Sensor to external devices with the I/O cable, and control the
Sensor and execute output.
Basic Operation with a Parallel Connection
This section describes the basic connections and signal fl ow with external devices.
With the default settings, the Sensor operates in the following manner.
*1:You can also use the READY signal, which will turn ON when a measurement trigger can be input.
You can assign the READY signal to any output from OUT0 to OUT2.
( Getting Individual Judgements and Expression Judgements: p. 41)
• Create the ladder program to control the TRIG and IN5 input signals so that they do not tur n ON while the BUSY
signal is ON. If not, a TRIG input error will occur and the ERROR signal will turn ON.
• Operation When the Sensor Power Supply Is Turned ON
The BUSY signal will operate as shown below when the Sensor’s power supply is turned ON.
Create the ladder program in the PLC or other external device so that the BUSY signal is ignored while it turns OFF,
ON, and OFF again for up to 5 s after the power supply is turned ON.
34
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 37
24 V
BUSY
ON
OFF
0 V
Max 5 sec
Sensor system is initializing.
The time of initializing
depends on the scene data.
Turns OFF when the
Sensor is ready for
operation.
Power supply
Note
You can mount a Parallel Interface Sensor Data Unit to enable using other signals and increase the number of signals that you can use with parallel communications.
And in addition to outputting OR judgment results, you can also use a Parallel Interface Sensor Data Unit to output
the judgment results of judgment conditions that you set for parallel output (called parallel judgment output) and the
results of measurement values and expressions for inspection items (called parallel data output).
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit: p. 60
Configuring the Operation
The following settings can be selected depending on the system configuration and application.
Type of changeDescriptionReference
Changing the type of measurement triggerPerforming continuous measurementsp. 37
Obtaining individual judgement resultsp. 41
Changing the output method of the judgement
results
Changing the polarity of the BUSY outputReversing the polarity of the BUSY signalp. 44
Changing the BUSY output conditionAdjusting the end timing of the BUSY signalp. 45
Change the Assignment of the Output Signals
(OUT0 to OUT2)
Changing the polarity of the output signals
(OUT1 to OUT2)
Selecting the types of commands that can be
used
Adjust the judgement output timingp. 42
Changing the judgement output ON conditionsp. 44
Select the output contents of the signals (OUT0 to
OUT2)
Reversing the output polarity of OUT1 to OUT2p. 45
Changing the commands used in IN0 to IN5p. 46
p. 45
allel Connection
2
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
35
Page 38
Setting the Measurement Trigger
OFF
ON
OFF
ON
Turned ON when overall judgement is NG.
(OR output: ON for NG)
OR signal
ON while measurements are
being processed (depends
on BUSY output conditions)
BUSY signal
TRIG signal
ON for 1 ms min.
Important
The measurement trigger can be chosen from the following two types:
One-shot measurement: One measurement is performed for each external trigger.
Continuous measurement: Measurements are performed continuously.
Performing One Measurement for Each External Trigger
A measurement trigger is input as the TRIG signal from a proximity sensor, PLC, or other external device.
One measurement is performed when the TRIG signal turns ON.
(1) TRIG signal ON
Or other
device
Trigger input Sensor
(2) Performs
measurements once
Wiring
ColorSignalDescription
Pink TRIGTrigger signal
Black OUT0 (OR)Overall judgement (default
Orange OUT1 (BUSY)Processing in progress (default
assignment)
assignment)
The signals shown at the left are used.
Refer to the following information for signal wiring.
Section 2 Installation and Connections
in Sensor FQ2-S/CH Series
User's Manual (Cat. No. Z337)
Timing Chart
1. Turn ON the TRIG signal while the BUSY signal is OFF.
2. Measurement begins and the BUSY signal is turned ON during the measurement process.
3. When the measurement has been finished, the measurement result is output using an OR signal, and the
BUSY signal is turned OFF.
*1:You can also set the signal to be turned OFF after data logging, image logging, or displaying results in the [BUSY output].
*1
36
When the Brightness Correction Mode is ON, the timing when images are taken is delayed.
Section 3 Taking Images
in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337)
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 39
Sample Ladder Program
SET
TRIG
W0.00OUT1
0000
#2
TRIG
TMHH
RSET
TRIG
T0000
RSET
W0.00
++L
1000
++L
1002
OUT0
OUT0
OUT1
Single
measurement
command bit
BUSY signal
When the single measurement
command bit (W0.00) turns
ON, the TRIG signal is turned
ON if the BUSY signal is OFF.
TRIG signal
BUSY signal OR signal
OR signal
The TRIG signal is kept ON for
2 ms and then turned OFF.
When the BUSY signal turns OFF to
indicate that the measurement has been
finished, the judgement result is added
to the total count.
OK measurements: CIO 1000
NG measurements: CIO 1002
Important
The following sample program is used to input a TRIG signal to perform a single measurement. A single
measurement will be performed when W0.00 turns ON.
I/O Signal Allocations
allel Connection
2
Controlling Operation and Outputting Data with a Par-
The BUSY signal will remain ON while the measurement is being executed.
Performing Continuous Measurements
Continuous measurements are performed while the continuous measurement command is input from an
external device.
Immediately after a measurement is performed, the next measurement is performed.
This is repeated while a continuous measurement command is input with the IN0 to IN5 signals.
Or other
device
PLC
(1) IN5 signal ON (IN0 to IN4 are OFF)
(2) Performs continuous
measurements
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
37
Page 40
Note
OFF
ON
OFF
ON
OFF
ON
OR signal
Turned ON when overall judgement is NG
(OR output: ON for NG)
ON while measurements are
being processed (depends on
BUSY output conditions)
BUSY signal
Start continuous measurements
End continuous measurements
IN5 signal
IN0 to IN4 signals
are OFF
Allow 5 ms min. and then turn ON IN5.
This function can be used only when the input mode is set to Expanded Mode.
Changing the Types of Commands That Can Be Used: p. 46
Wiring
ColorSignalStateDescription
Gray IN0OFF
Green IN1OFF
RedIN2OFF
White IN3OFF
Purple IN4OFF
Yellow IN5ONCommand input for continuous
Black OUT0 (OR)--Overall judgement (default assign-
Orange OUT1 (BUSY)--Processing in progress (default
Command parameters for continuous measurements
measurements
ment)
assignment)
Timing Chart
The signals shown at the left
are used.
Refer to the following information for signal wiring.
Section 2 Installation
and Connections
in Sensor FQ2-S/CH
Series User's Manual
(Cat. No. Z337)
1. Turn ON IN5 while IN0 to IN4 are OFF. If status is held while the BUSY signal is OFF, continuous
2. Continuous measurements end when IN5 is turned OFF.
38
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
measurements will begin and the BUSY signal will remain ON while continuous measurements are being
performed.
FQ2-S/CH User’s Manual
for Communications Settings
Page 41
Sample Ladder Program
MOV
#0000
Q:1
W0.00
0000
#5
TMHH
SET
IN5
T0000
OUT1
W0.00
RSET
W0.00
RSET
IN5
W0.01
RSET
W0.00
Continuous
measurement
command bit
Continuous
measurement
command bit
BUSY signal
Continuous
measurement
stop bit
When the continuous measurement command
bit (W0.00) turns ON, the command
parameter for continuous measurements
(00000) is output to Q:1 (IN0 to IN4).
If the BUSY signal is OFF 5 ms after the
command parameter is output, the command
input for continuous measurements (IN5) is
turned ON and continuous measurements start.
When the continuous measurement stop bit
(W0.01) turns ON, the command input for
continuous measurements (IN5) is turned
OFF and continuous measurements stop.
The following sample program is used to input a IN5 signal to perform continuous measurements. Continuous
measurements will be started when W0.00 turns ON and stopped when W0.01 turns ON.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
I/O Signal Allocations
SignalAddress
Output signalsOUT1 (BUSY signal)CIO 0.01
IN0CIO 1.08
IN1CIO 1.09
Input signals
IN2CIO 1.10
IN3CIO 1.11
IN4CIO 1.12
IN5CIO 1.15
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
39
Page 42
Setting the Outputs
OFF
ON
OFF
ON
Overall judgement
Turned ON when overall
judgement is NG.
(OR output: ON for NG)
OR signal
ON while measurements are
being processed (depends
on BUSY output conditions)
BUSY signal
TRIG signal
ON for 1 ms min.
Using the Overall Judgement Result
When the results of the inspection items are judged, if even one individual judgement result is NG, the OR
output signal is turned ON.
Individual judgement results
Inspection
item 0
Inspection
item 1
Inspection
item 31
Expression
Note
• The overall judgement result output signal can also be turned ON when all individual judgement results are OK.
Changing the judgement output ON condition: p. 44
• You can select whether to include the judgement result of one of the expressions (0 through 31) in the overall judge-
ment.
OK
NG
OK
OK
Overall judgement
NG (OR signal ON)
If there is even one NG judgement,
the overall judgement will be NG
and the output will be turned ON.
Section 4 Setting Up Inspections
in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337)
• You can adjust the timing for outputting the OR signal and the ON time after judgement processing.
Adjust the Judgement Output Timing: p. 42
Wiring
ColorSignalDescription
BlackOUT0 (OR)Overall judgement (default
assignment)
The signals shown at the left are used.
Refer to the following information for signal wiring.
Section 2 Installation and Connections
in Sensor FQ2-S/CH Series User's Manual
(Cat. No. Z337)
Timing Chart
The OR signal that is output is held until the next overall judgement is output.
40
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 43
Note
Note
Important
The timing for updating the OR signal and the ON time after judgement processing can be adjusted.
Adjusting the judgement output timing: p. 42
Getting Individual Judgements and Expression Judgements
Up to three judgement results of individual inspection items (item judgement signals OR0 to OR31) and
expression judgements (expression 0 judgement to expression 31 judgement) can be assigned to terminals
OUT0 to OUT2 and output to external devices.
Output terminalDefault assignmentOutput signals that can be assigned
OUT0OR (Total judgement)• Control signals: OR, BUSY, ERROR, READY, and RUN STG (strobe trigger)
OUT1BUSY
OUT2ERROR
The timing for updating the OR0 to OR31 signals and the ON time after judgement processing can be changed.
Adjusting the judgement output timing: p. 42
During Sensor startup, the user output assignments of OUT1 and OUT2 output terminals are not effective. The output
assignments assume the initial state and operate as follows.
• OUT1: Turns ON as a BUSY signal.
Operation When the Sensor Power Supply Is Turned ON: p.34
• OUT2: Turns ON as an ERROR signal for about 20 ms immediately after sensor startup starts.
If you want to output a READY signal during Sensor startup, assign the READY signal to OUT0.
• Expression judgements: Expression 0 judgement to expression 31 judgement
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Wiring
Example: Signals are assigned to terminals OUT0 to OUT2 as shown below.
OUT0: Item 2 judgement (OR2)
OUT1: Item 5 judgement (OR5)
OUT2: Item 14 judgement (OR14)
ColorSignalDescription
BlackOUT0 (OR2)Outputs the judgement for
Orange OUT1 (OR5)Outputs the judgement for
Light
blue
OUT2 (OR14)Outputs the judgement for
OR2.
OR5.
OR14.
The signals shown at the left are used.
Refer to the following information for signal wiring.
Section 2 Installation and Connections
in Sensor FQ2-S/CH Series
User's Manual (Cat. No. Z337)
As described above, if terminals OUT0 to OUT2 are all assigned to individual judgement output signals, the
BUSY signal and ERROR signal assigned as the default settings will no longer be output.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
41
Page 44
Timing Chart
OFF
ON
OFF
ON
OR1 signal
Turned ON when individual
judgement is NG.
(OR output: ON for NG)
OR0 signal
Turned ON when individual
judgement is NG.
(OR output: ON for NG)
Example:
ON while measurements are
being processed (depends
on BUSY output conditions)
BUSY signal
TRIG signal
ON for 1 ms min.
Individual
judgement
*1
OFF
ON
OFF
ON
OFF
ON
NGOK
Held until the next
judgement result is output
Overall judgement
(OR output: ON for NG)
OR signal
ON while measurements are being
processed (depends
on BUSY output
conditions)
BUSY signal
TRIG signalON for 1 ms min.
Output OR0 to OR31 signals are held until the next judgement output.
*1:The timing for updating the OR signal is when the measurement results are finalized, regardless of the output settings of the BUSY signal
2Press [Output delay] and set the one-shot output de-
lay.
3Press [OK].
4Press [Output time] and set the one-shot output time.
5Press [OK].
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
43
Page 46
ItemDescription
Important
Important
After the measurement results are fi nalized , i f the judg ement outp ut ON cond iti on
is met, the OR signal is turned ON for the one-shot output time. It is then turned
OFF once the specified time has expired.
status of the OR signal is held until it is changed for the next measurement result.
When one-shot output mode is selected, thi s p arameter sets the delay from when
a measurement is completed until when the OR signal turns ON. (Setting range: 0
to 1,000 ms)
signal is ON. (Setting range: 1 to 1,000 ms)
Output mode
One-shot output
Level output (default) The judgement is output after measurement results are finalized and the ON/OFF
Output delay
Output timeWhen one-shot output mode is selected, this paramete r sets th e time that t he OR
When one-shot output is selected as the output mode, make the following value smaller than the trigger input period.
• One-shot delay time + One-shot output time
Changing the Judgement Output ON Conditions
The ON condition for the OR signal or the OR0 to OR31 signals can be set to be output when the judgement
results are OK or when they are NG. The default setting is when they are NG.
OK: ONThe output is t urned ON if the judgement is OK.
NG: ON (default)The output is turned ON if the judgement is NG.
For the overall judgement, the output is turned ON if all judgements are OK.
For the overall judgement, the output is turned ON if even one judgements is NG.
Changing the Polarity of the BUSY Out put
The Sensor turns ON the BUSY output signal during measurements and other processing to indicate that a
measurement trigger cannot be received. The polarity of the BUSY signal can be reverse d so that it is ON only
when a trigger signal can be received.
In the default settings, the BUSY signal is assigned to OUT1. If you change the assignment of the BUSY
signal, change the polarity of the corresponding output.
All timing charts in this manual show the operation of the BUSY signal with positive polarity (the default setting). If you
change the polarity of the BUSY signal, take this into consideration when reading the timing charts.
Positive (default)The BUSY signal is ON while the Sensor is processing data.
NegativeThe BUSY signal is ON while the Sensor can receive a trigger signal.
44
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
Measurement (default)The BUSY signal turns OFF when the measurement is completed.
BUSY output
Do not disconnect the Ethernet cable between the Sensor and the Touch Finder if the Sensor and Touch Finder are
connected through an Ethernet switch and the BUSY output condition is set to [Data logging], [Image logging], or
[Result display].
The Sensor will wait for the Touch Finder to answer, and the results and measurement time will be affected.
To disco nnect the Sensor and Touch Finder during measurements in the above situation, clear the selection of the
Sensor from the list of Sensors on the Touch Finder before you disconnect the cable.
Data loggingThe BUSY signal turns OFF when data logging is completed.
Image loggingThe BUSY signal turns OFF when image logging is completed.
Result displayThe BUSY signal turns OFF when the result display is completed.
Changing the Assignment of Output Signals
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Output signals (OUT0 to OUT2) are able to change these assignments.
Standard mode (default)IN0 to IN4 are only used for line process changes.
Expanded modeEnables use of IN0 to IN4 for commands other than line process changes.
A maximum of 32 scenes are selectable.
A maximum of 16 scenes are selectable.
Controlling the Sensor from an External Device
The following Sensor functions can be controlled with command inputs from an external device without
connecting the Touch Finder.
FunctionDescriptionReference
Changing the SceneThis command changes the scene when the line process changes.p. 47
Registering the Measurement Ref-
erence Again
Turning the ERROR Signal OFF This command turns the ERROR signal OFF.p. 51
Performing Continuous Measure-
ments
Clearing Measurement ValuesThis command clears the measurement values.p. 52
Saving Data in SensorThis command saves the settings data to the Sensor.p. 57
Retrying Inspection by External
Signal (trigger retry)
Resetting the SensorThis command resets the Sensor.p. 55
Executing External TeachingThis command executes teaching for all target items.p. 58
This command re-registers the judgement references for measurement when levels are changed.
This command continues measurement is performed while this command is input.p. 37
This command continues inspection when the trigger signal is ON.p. 52
p. 49
46
Change to Expanded Mode before you input any command other than a command to change the scene. If you
change to Expanded Mode, you can use any of the commands. However, in Expanded Mode, you can change to only
16 scenes with the parallel SCENE command instead of 32 scenes.
Changing the Types of Commands That Can Be Used: p. 46
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 49
Changing the Scene
0
(IN40IN30IN20IN11IN0)
Important
Note
This section describes how to change to a specified scene number.
Wiring
State
ColorSignal
Standard Mode Expanded Mode
GrayIN0
GreenIN1
RedIN2
WhiteIN3
PurpleIN4ON
YellowIN5ONTrigger to change the scene
Orange OUT1
(BUSY)
Scene number
(0 to 31)
Input Mode
Specifies the scene number.
IN0 to IN4 correspond to the binary
bits of the scene number.
Scene number
(0 to 15)
--Processing in progress (def a ul t )
Example: To change to scene 1 in
Description
Standard Mode, specify
as follows:
Timing Chart
IN0 to IN4 signals
(in Standard Mode)
IN5 signal
BUSY signal
*1
ON
OFF
ON
OFF
Scene number 0 to 31
Allow 5 ms min. and then turn ON IN5.
ON for 1 ms min.
Start scene change
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Specify the scene number with
the IN0 to IN4 signals.
(Standard Mode)
2Turn ON the IN5 signal while
the BUSY signal is ON to
change the scene to the
specified scene.
3The BUSY signal turns ON
while the scene is being
switched.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
The scene numbers that can be used depend on the input mode.
[Standard mode] (default): Scene 0 to 31
[Expanded mode]: Scene 0 to 15
FQ2-S/CH User’s Manual
for Communications Settings
End scene change
*1: In Expanded Mode, specify scene numbers 0 to 15 using the
IN0 to IN3 signals.
Changing the Types of Commands That Can Be Used: p. 46
• Eve n in Expanded Mode, you can use menu commands or Ethernet no-pr otocol commands to change to scenes
0 to 31.
• The input mode can be set on both standard models and single-function models.
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
47
Page 50
Sample Ladder Program
MOV
#1100
Q:1
TMHH
0000
#5
TMHH
0001
#2
SET
IN5
RSET
IN5
SET
W0.01
W0.00
T0000
IN5
OUT1
BUSY
W0.00
RSET
W0.00
T0001
BUSY
Scene change
bit
Scene change
bit
When the scene change bit (W0.00) turns ON,
the scene number is input to IN0 to IN3 and
IN4 is turned ON.
If the BUSY signal is OFF 5 ms after the
scene number is input, the trigger to change
the scene (IN5) is turned ON.
The trigger to change the scene (IN5) is kept
ON for 2 ms and then turned OFF.
When the BUSY signal turns OFF to indicate
that the scene has been changed, processing
after changing the scene is performed (W0.01
turned ON).
Note
Important
This sample program is used to change the scene when the input mode is set to Expanded Mode. The scene
changes to scene 1 when W0.00 turns ON.
The amount of time it takes for a scene to change depends on the scene settings. The BUSY signal turns ON while
scene change is being executed, so the scene change execution time can be checked with the BUSY signal.
If the cycle time is too long, the PLC may not be able to detect when the BUSY signal is ON. If necessary, turn OFF
W0.00 after a suitable time elapses.
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 51
Registering the Measurement Reference Again
OFF
ON
OFF
ON
End re-registering
Start re-registering
BUSY signal
IN5 signal
ON for 1 ms min.
Allow 5 ms min. and then turn
ON IN5.
IN0 to IN4 signals
When the line process is changed or otherwise, the model and reference color can be re-registered based on
the previously loaded image. Data that can be re-registered with the re-registration command are shown
below.
Inspection itemRe-registered data
Search, Shape Search II, Shape Search
III
Color DataReference color (hue, saturation, and brightness)
Edge Position, Edge Width, AreaNone
Note
• This command is only valid in Expanded Mode.
• Application is possibly only from the Run Mode
• If the parameter is applicable to more than one inspection item, it will be re-registered for all inspection items.
Controlling Operation and Outputting Data with a Par-
GrayIN0OFFCommand parameter for registering the meaGreenIN1OFF
RedIN2OFF
WhiteIN3ON
PurpleIN4OFF
YellowIN5ONCommand input for registering the measure-
Orange OUT1 (BUSY)--Processing in progress (default)
Timing Chart
ColorSignalStateDescription
surement reference again
ment reference again
The signals shown at the left are
used.
Refer to the following information
for signal wiring.
Section 2 Installation and
Connections
in Sensor FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Turn OFF IN0 to IN4 and turn ON IN3.
2Turn ON the IN5 signal while the BUSY
signal is OFF to register the model data
and reference color again from the i mage
that was just input.
3The BUSY signal turns ON while the
parameters are being re-registered.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
49
Page 52
Sample Ladder Program
MOV
#800
Q:1
TMHH
0000
#5
TMHH
0001
#2
SET
IN5
RSET
IN5
SET
W0.01
W0.00
T0000
IN5
OUT1
BUSY
W0.00
RSET
W0.00
T0001
BUSY
Model
re-register bit
Model
re-register bit
When the mode re-register bit (W0.00) turns
ON, IN3 is turned ON.
If the BUSY signal is OFF 5 ms after IN3 turns
ON, the command input for registering the
mode again (IN5) is turned ON.
The command input for registering the mode
again (IN5) is kept ON for 2 ms and then
turned OFF.
When the BUSY signal turns OFF to indicate
that model has been re-registered, processing
after re-registration is performed (W0.01
turned ON).
Note
Important
This sample program is used to input IN5 to re-register a model.
I/O Signal Allocations
SignalAddress
Output signalsOUT1 (BUSY signal)CIO 0.01
IN0CIO 1.08
IN1CIO 1.09
Input signals
The BUSY signal will be ON while the model is being re-registered.
IN2CIO 1.10
IN3CIO 1.11
IN4CIO 1.12
IN5CIO 1.15
If the cycle time is too long, the PLC may not be able to detect when the BUSY signal is ON. If necessary, turn OFF
W0.00 after a suitable time elapses.
50
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 53
Turning the ERROR Signal OFF
OFF
ON
OFF
ON
OFF
ON
ON for 1 ms min.
Allow 5 ms min. and then
turn ON IN5.
IN0 to IN4 signals
IN5 signal
BUSY signal
ERROR signal
The ERROR signal turns ON when an error occurs.
After removing the cause of the error, turn the ERROR signal OFF using one of the following methods.
Method 1:Input an error clear command from an external device such as a PLC.
Method 2:Input a measurement trigger again.
(For example, turn the TRIG signal ON during a one-shot measurement.)
The ERROR signal will turn OFF when measurement is executed correctly.
Note
• This command is only valid in Expanded Mode.
• This function can be used in Run Mode only.
Wiring
ColorSignalStateDescription
GrayIN0OFF Command parameter for clearing errors
GreenIN1OFF
RedIN2ON
WhiteIN3OFF
PurpleIN4OFF
YellowIN5ONCommand input for clearing errors
OrangeOUT1 (BUSY)--Processing in progress (default)
Light blueOUT2 (ERROR)--ERROR signal (default)
Timing Chart
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Turn OFF IN0 to IN1 an d I N3 to IN4 and
turn ON IN2.
2Turn ON the IN5 signal while the BUSY
signal is OFF to clear the error.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
51
Page 54
Clearing Measurement Values
OFF
ON
The measurement values are
cleared from the Sensor.
OFF
ON
BUSY signal
IN5 signal
ON for 1 ms min.
Allow 5 ms min. and then
turn ON IN5.
IN0 to IN4 signals
This command clears the measurement values that are stored in the Sensor. However, the OR signal and the
output signals that are assigned to OUT0 to OUT2 are not cleared.
Note
• This command is only valid in Expanded Mode.
• This function can be used in Run Mode only.
Wiring
ColorSignalStateDescription
GrayIN0ONCommand parameter for clearing mea-
GreenIN1OFF
RedIN2ON
WhiteIN3OFF
PurpleIN4OFF
YellowIN5ONCommand input for clearing measure-
OrangeOUT1 (BUSY)--Processing in progress (default)
surement values
ment values
Timing Chart
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Turn ON IN0 and IN2 and turn OFF IN1,
IN3 and IN4.
2Turn ON the IN5 signal while the BUSY
signal is OFF to clear the measurement
values.
Measurement is repeated until all inspection items have been successfully scanned.
Retry inspection ends when any one of the following conditions is sati sfied:
(1) The scanning result of all inspection items is OK.
(2) Trigger retry (this command) turns OFF.
(3) The timeout time is exceeded.
52
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
Retrying Inspection by External Signal (Trigger Retry)
Note
• This command is only valid in Expanded Mode.
• This function can be used in Run Mode only.
FQ2-S/CH User’s Manual
for Communications Settings
Page 55
Wiring
OFF
ON
OFF
ON
OFF
ON
IN5 signal
IN0 to IN4 signals
IN5 ON after at least 5 ms
Retry starts
ScanNGScanNGScan
OK
Retry ends
BUSY signal
OR signal
OFF
ON
OFF
ON
OFF
ON
IN5 signal
IN0 to IN4 signals
IN5 ON after at least 5 ms
Retry starts
ScanNGScan
NG
Scan
NG
Scan
NG
Retry ends
BUSY signal
OR signal
ColorSignalStateDescription
GrayIN0OFF
GreenIN1OFF
RedIN2ON
WhiteIN3ON
PurpleIN4OFF
YellowIN5ONCommand input for trigger retry (this com-
OrangeOUT1 (BUSY)--Busy
BlackOUT0 (OR)--Overall judgment (default)
Command parameters for trigger retry
(this command)
mand)
Timing Chart
When inspection is OK
1IN0, IN1 and IN4 are turned OFF, IN2
and IN3 are turned ON.
2When IN5 is turned OFF > ON with the
BUSY signal OFF, trigger retry inspection
starts.
3When retry inspection starts, the BUSY
signal turns ON.
4When the overall judgment turns ON,
retry inspection ends and the BUSY
signal turns OFF.
5After verifying that the BUSY signal has
turned ON > OFF, IN5 is turned ON >
OFF.
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
allel Connection
2
Controlling Operation and Outputting Data with a Par-
When inspection is NG
FQ2-S/CH User’s Manual
for Communications Settings
1IN0, IN1 and IN4 are turned OFF, IN2
and IN3 are turned ON.
2When IN5 is turned OFF > ON with the
BUSY signal OFF, trigger retry inspection
starts.
3When retry inspection starts, the BUSY
signal turns ON.
4IN5 is turned OFF and retry inspection
ends. If retry inspection ends but the
overall judgment is NG, the OR signal
turns ON. (Output polarity: When ON at
NG)
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
53
Page 56
Sample Ladder Program
MOV
#0C00
Q:1
TMHH
0000
#5
TMHH
0001
#3000
SET
IN5
RSET
IN5
SET
W0.01
W0.00
T0000
IN5
OUT1
BUSY
W0.00
RSET
W0.00
T0001
BUSY
Trigger retry execution
When trigger retry execution (W0.00)
is turned ON, the command
parameter for sensor restart (001100)
is output to Q:1 (IN0 to IN4).
After trigger retry finishes and the
BUSY signal turns OFF, post trigger
retry processing (W0.01:ON) is
executed.
If the BUSY signal is OFF five
ms after the command parameter
is output, the trigger retry
execution trigger (IN5) turns ON.
After being ON for 3000 ms, the
trigger retry execution trigger
(IN5)turns OFF.
Trigger retry execution
This sample ladder program executes trigger retry when the I/O input mode is Expanded Mode.
Trigger retry is executed at W0. 00 ON.
I/O Signal Allocations
Output signalOUT1 (BUSY signal)CIO 0.01
Input signals
Note
The time the BUSY signal is ON is the trigger retry execution time.
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 57
It may happen that the PLC is unable to recognize BUSY signal ON because the sample time is slow or otherwise. In
Important
IN0 to IN4 signals
IN5 ON after at least 5 ms
ON at least 1 ms
IN5 signal
OFF
ON
this event, have W0.00 turn OFF at a suitable time.
Resetting the Sensor
Sensor reset is explained below.
Note
• This command is only valid in Expanded Mode.
• This function can only be used in Run mode.
Wiring
ColorSignalStateDescription
GrayIN0OFF
GreenIN1ON
RedIN2OFF
WhiteIN3ON
PurpleIN4OFF
YellowIN5ONCommand input for Sensor reset
OrangeOUT1 (BUSY)--Busy (default)
Command parameters for Sensor reset
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1IN0, IN2 and IN4 are turned OFF, IN1
and IN3 are turned ON.
2IN5 is turned OFF > ON with the BUSY
signal OFF. The BUSY signal does not
turn ON while the restart command is
being received.
3When the initialization process starts,
the BUSY signal turns ON.
For the initialization pro cess, refer to the
following:
allel Connection
2
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Operation with Default Configuration: p.34
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
55
Page 58
Sample Ladder Program
MOV
#A00
Q:1
TMHH
0000
#5
TMHH
0001
#2
SET
IN5
RSET
IN5
SET
W0.01
W0.00
T0000
IN5
OUT1
BUSY
W0.00
RSET
W0.00
T0001
BUSY
Sensor restart
When Sensor restart execution (W0.00) is
turned ON, the command parameter for
Sensor restart (001010) is output to
Q:1 (IN0 to 4).
After Sensor restart finishes and the
BUSY signal turns OFF, post Sensor
restart processing (W0.01:ON) is executed.
If the BUSY signal is OFF five ms after
the command parameter is output, the
Sensor restart execution trigger (IN5)
turns ON.
After being ON for 2 ms, Sensor
restart execution (IN5) turns OFF.
Sensor restart
Note
This sample program inputs IN5 to restart the Sensor.
Trigger retry is executed at W0. 00 ON.
The time the BUSY signal is ON is the Sensor initialization process execution time.
56
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 59
It may happen that the PLC is unable to recognize BUSY signal ON because the cycle time is slow or otherwise. In
Important
OFF
ON
Saving data
in Sensor started.
Saving data in
Sensor completed.
OFF
ON
BUSY
signal
IN5 signal
ON for 1 ms min.
Allow 5 ms min. and then
turn ON IN5.
IN0 to IN4
signals
this event, have W0.00 turn OFF at a suitable time.
Saving Data in Sensor
You can save the current settings (scene data and system data) in the Sensor.
Note
• This command is only valid in Expanded Mode.
• This function can be used in Run Mode only.
Wiring
ColorSignalStateDescription
GrayIN0ON
GreenIN1OFF
RedIN2OFF
WhiteIN3OFF
PurpleIN4OFF
YellowIN5ONCommand input for saving data to the
OrangeOUT1 (BUSY)--Processing in progress (default)
Command parameters for saving data to
the Sensor
Sensor
Timing Chart
The signals shown at the left
are used.
Refer to the following
information for signal wiring.
Section 2 Installation
and Connections
in Sensor
FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Turn ON IN0 and turn OFF IN1 to IN4.
2Turn ON the IN5 signal while the BUSY
signal is OFF to save the data in the
Sensor.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
57
Page 60
Executing External Teaching
Teaching for all registered items can be executed using the current input image.
Note
• This command is only valid in Expanded Mode.
• Application is possibly only from the Run Mode
• If the parameter is applicable to more than one inspection item, it will be external teaching for all inspection items.
Wiring
ColorSignalStateDescription
GrayIN0ON
GreenIN1OFF
RedIN2OFF
WhiteIN3ON
PurpleIN4OFF
YellowIN5ONCommand input for external teaching
Orange OUT1 (BUSY)--Processing in progress (default)
Command parameter for external teaching
Timing Chart
IN0 to IN4 signals
Allow 5 ms min. and then
turn ON IN5.
ON for 1 ms min.
Start external teaching
IN5 signal
BUSY signal
ON
OFF
ON
OFF
The signals shown at the left are
used.
Refer to the following information
for signal wiring.
Section 2 Installation and
Connections
in Sensor FQ2-S/CH Series
User's Manual
(Cat. No. Z337)
1Turn ON IN0 and IN3 and turn OFF IN1,
IN2, and IN4.
2Turn ON the IN5 signal while the BUSY
signal is OFF to execute external
teaching.
3The BUSY signal turns ON while
external teaching is being executed.
End external teaching
58
Controlling Operation and Out putting Data with the Sensor's Standard Parallel Connection
FQ2-S/CH User’s Manual
for Communications Settings
Page 61
Sample Ladder Program
MOV
#900
Q:1
TMHH
0000
#5
TMHH
0001
#2
SET
IN5
RSET
IN5
SET
W0.01
W0.00
External teaching bit
T0000
IN5
OUT1
BUSY
W0.00
External teaching bit
RSET
W0.00
T0001
BUSY
When the external teaching bit (W0.00) turns ON,
IN0 and IN3 are turned ON.
If the BUSY signal is OFF 5 ms after IN0 and IN3
turn ON, the command input for external
teaching (IN5) is turned ON
The command input for external teaching (IN5) is
kept ON for 2 ms and then turned OFF.
When the BUSY signal turns OFF to indicate
that external teaching has been completed,
processing after external teaching is executed
(W0.01 is turned ON).
Note
Important
This sample program is used to input IN5 to external teaching.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
I/O Signal Allocations
Output signalsOUT1 (BUSY signal)CIO 0.01
The BUSY signal will remain ON while external teaching is being executed.
If the cycle time is too long, the PLC may not be able to detect when the BUSY signal is ON. If necessary, turn OFF
W0.00 after a suitable time elapses.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection
59
Page 62
2-2
(2) Performs
measurements once
Trigger input Sensor
Or other
device
(1) TRIG signal ON
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
Overview
If you mount a Parallel Interface Sensor Data Unit , in addi tion t o outpu tting OR j udgement resu lt s, y ou can al so
use the Parallel Interface Sensor Data Unit to output the judgement results of judgement conditions that you
set for parallel output (called parallel judgement output) and the results of measurement values and
expressions for inspection items (called parallel data output).
The measurement trigger can be chosen from the following two types:
• Single measurement: One measurement is performed for each external trigger.
• Continuous measurement: Measurements are performed continuously.
Refer to the following page for data output timing and signal status after measurement trigger execution.
Aligning the Data Output Timing with the External Device: p. 66
Performing One Measurement for Each External Trigger
A measurement trigger is input as the TRIG signal from a proximity sensor, PLC, or other external device.
One measurement is performed when the TRIG signal turns ON.
60
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 63
Performing Continuous Measurements
PLC
(2) Performs continuous
measurements
Or other
device
(1) IN7 signal ON (IN0 to IN6 are OFF)
Note
Continuous measurements are performed while the continuous measurement command is input from an
external device.
Setting Output Data
You can set the data to output after measurements.
Output Data
You can output any of the following data through the Parallel Interface Sensor Data Unit.
DataOutput contentsSignal used to output the data
Overall judgement
result
Parallel judgement
output
Parallel data output Measurement values for inspection items and
Judgement result of multiple inspection items
(ON if even one judgement result is NG)
Judgement results of the judgement conditions
that are set for parallel output
results from expressions
The results is output with the OR signal.
The results are assigned to and output with
D0 to D15.
The data is output as 16-bit data on D0 to
D15.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Outputting the Overall Judgement Result (OR Signal)
When the results of the inspection items are judged, if even one individual judgement result is NG, the OR
output signal is turned ON.
• You can also turn ON the overall judgement result output signal when all individual judgement results are OK.
Changing the Judgement Output ON Conditions: p. 44
• You can select whether to use the judgement result of one of the calculations (0 through 31) as the overall judgement.
Section 4 Setting Up Inspections in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337)
• You can adjust the timing for outputting the OR signal and the ON time after judgement processing.
Adjusting the Judgement Output Timing: p. 42
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
61
Page 64
Parallel Judgement Outputs
You can set judgement conditions for parallel output and then output the judgement results for those
conditions.
Setting the Items to Judge and the Judgement Conditions
You can assign up to 16 judgement results to and output them from the D0 to D15 signals.
As the items to judge, you can specify the measurement data from inspection items that can be output and the
calculation results from the expression settings.
Use the following procedure to set the items to judge and the judgment conditions.
(1) Setting the Items to Judge
You can assign the parameters from the inspection items to the data output signals (D0 to D15).
The following procedure shows how to assign the measured position X of [0. Search] to D0.
[In/Out] − [I/O setting] − [Output data set] − [Par. Jdg Output] − [Basic] Ta b Page
5If the inspection item allows multi-point output,
press the number ([0] to [31]) of the inspection result
for which to output the data from the list of inspection results.
To register something to D1 or higher, repeat this process.
(2) Setting the Judgement Conditions
[In/Out] − [I/O setting] − [Output data set] − [Par. Jdg Output] − [Basic] Ta b Page
1Press [Judgement condition].
2Set the correlation range that is to be judged as OK.
Reflecting Judgement Results to the Overall Judgement
62
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 65
You can specify whether to reflect the judge ment resul t o f a parallel judgement output in the overall jud gemen t.
(The default is to reflect them.)
You can output the following data as 16-bit data by setting them as the output data (data 0 to data 31):
measurement data from inspection items that can be output and the calculation results from the expression
settings.
Setting the Data to Output
You can individually assign the parameters of the inspection items to output data (data 0 to data 31).
The following procedure shows how to assign the measured position X of [0. Search] to data 0 for a parallel
output.
[In/Out] − [I/O setting] − [Output data set] − [Par. Jdg Output] − [Basic] Ta b Page
1Press [Data settings].
2Press [Data 0].
3Press [I0. Search].
4Press [Position X X].
5If the inspection item allows multi-point output,
press the number ([0] to [31]) of the inspection result
for which to output the data from the list of inspection results.
To register something to data 1 or higher, repeat t his process.
allel Connection
Controlling Operation and Outputting Data with a Par-
Setting the Output Form
[In/Out] − [I/O setting] − [Output data set] − [Par. Jdg Output] − [Basic] Ta b Page
1Press [Output format].
2Press [Output form].
3Set [Data form] to [Binary] or [BCD].
Stopping Data Output
You can also prevent the output data that is set from actually being output. (The default setting is [Yes].)
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
63
Page 66
[In/Out] − [I/O setting] − [Output data set] − [Parallel Dat a Output Sett ing] − [Det ails] Tab Page −
Note
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
[Output parameter] − [Data output]
Output Specifications
• Only the integer portions of numbers are output. All digits before the decimal point are rounded off.
• The following range of values can be output.
Binary data: −32768 to +32767
BCD data: −999 to +999
If the measurement value is out of range, the actual measurement value is not output and the minimum or
maximum value of the range is output instead.
Data formatMeasurement value that is below the possi-
ble output range
Measurement value that is above the possible output range
Binary dataA value of −32768 is output.A value of +32767 is output.
BCDA value of −999 is output.A value of 999 is output.
The data that is output to the OR and D signals after a measurement is held until the next measurement is performed. The values will continue to be output even after all measurements have been completed.
However, if you set the output timing of the OR signal to [One-shot output] in the [Output mode] parameter, the OR
signal will turn OFF after the specified output time has elapsed.
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
64
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 67
Timing Chart
Overall judgement
Parallel
judgement output
(D0 to D15)
BUSY signal
OFF
ON
OR signal
D signals
OFF
ON
RUN signal
OFF
ON
TRIG signal
OFF
ON
GATE signal
OFF
ON
Measurements executed.
GATE
ON delay
Output time
Output period
Run Mode entered.
ON for 1 ms min.
Setup Mode entered.
The FQ2 starts measurements when it detects the rising edge
(OFF to ON transition) of the TRIG signal.
The following timing chart shows the data output timing for parallel judgement outputs.
Output Signals
allel Connection
2
Controlling Operation and Outputting Data with a Par-
SignalFunction
RUNThis signal is ON while the Sensor is ready to take measurement and it is in Run Mode.
The RUN signal is OFF in Setup Mode. Change to Run Mode for operation.
BUSY This signal is ON when the Sensor is performing measurements, changing scenes, or performing other
tasks. Do not input the next command while the BUSY signal is ON.
The process that is currently being executed and the command that is input will not be executed correctly.
ORThis signal outputs the overall judgement. The signal is valid when the measurements are completed (i.e.,
when the BUSY signal changes from ON to OFF).
DThese signals output the parallel judgement output data and the calculation results of the expressions that
are set for parallel data output.
Y ou can set whether the signal turns ON for an OK or for an NG judgement in the [Judgment output condi-
GATE This signal is used to control the timing of reading the D signals at an external device.
tion] output setting.
Changing the Settings of the Output Signals: p.73
It is turned ON for the period of time that is required to reliably read the D signals at the external device.
Set the output period so that the total output time is shorter than the measurement interval (i.e., the TRIG
signal input interval).
The GATE signal is output only if p arallel judgement output and parallel dat a output are set. The OR signal
will be ON while the TRIG signal can be input.
Input Signals
Signal Function
TRIGThis signal is used to input a measurement trigger from an external device, such as a photoelectric switch.
One measurement is performed on the rising edge (OFF to ON transition) of the TRIG signal. Keep the
TRIG signal ON for at least 1 ms.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
65
Page 68
Aligning the Data Output Timing with the External Device
You can use one of the followin g data output methods to align the ti min g o f data output with an external device.
• Aligning with the GATE Signal Status (No Handshaking): p. 66
• Outputting Measurement Results for Data Send Requests from the External Device (Handshaking): p. 69
• Offsetting the Timing of Outputting Measurement Results: p. 71
1Press [Output control] and select the output control
method.
• None: p. 66
• Handshaking p. 69
• Synchronized Output: p. 71
2Set the communications specifications for data out-
put.
ItemParameterDescription
Output controlNone (default), Hand-
Output period2.0 to 5,000.0 ms
GATE ON delay 1.0 to 1,000.0 ms
Output time1.0 to 1,000.0 ms
Timeout0.5 to 120.0 s
Number of delay 1 to 15
shaking, or Sync. Output
10.0 ms (default)
1.0 ms (default)
5.0 ms (default)
10.0 s (default)
1 (default)
None: Measurement results are output without synchronizing with the external device.
Handshaking: Measurement results are output while synchronizing with the PLC.
Sync. output: Measurement results are output without synchronizing with the externa l
device.
This setting is enabled only when the [Output control] or [Sync. Output] paramet er is set to
[None].
Set the period for outputting measurement results.
Set a value that is longer that the GATE ON delay plus the output time and shorter than the
measurement interval.
If you set a value that is longer than the measurement interval, the output timing will
become delayed as measurements are repeated.
Set the time from when the result is output to the parallel interface until the GATE signal
turns ON.
This is the time to wait until the data output stabilizes.
Set a value that is longer than the delay time of the external device.
This setting is enabled only when the [Output control] parameter is set to [None] or [Sync.
output].
Set the time to turn ON the GATE signal.
Set the time that is required for the external device to read the measurement results.
This setting is enabled only when the [Output control] parameter is set to [Handshaking].
A timeout error will occur at the following times if there is no response from the external
device within the time that is set.
When the DSA signal turns ON after measurements are completed
When the DSA signal turns OFF after the GATE signal turns ON
When the DSA signal turns ON after the GATE signal turns OFF
This setting is enabled only when the [Output control] parameter is set to [Sync. output].
Set the number of times to ignore the TRIG signal turning ON between when the TRIG signal turns ON and the measurement results are output.
Reading Data When the GATE Signal Is Output (No Handshaking)
The Sensor will output the measurement results without synchronizing with the external device, but the GATE
signal is also output.
The GATE signal is used to control the timing of when the external device reads the measurement data.
Adjust the external device so that it reads the measurement results when the GATE signal is output.
66
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 69
*1:You can change the settings of when the GATE signal is turned ON after the measurement data is output and the length of time that the
External device
FQ2
(2) GATE signal
*1
(1) Measurement processing
and results output (OR and
D0 to D15)
Measurement done (BUSY output OFF)
Note
GATE signal will remain ON.
Setting the Output Timing for the GATE Signal: p. 66
The GATE signal will not be output if there is no data set for parallel judgement output and parallel data output.
If only the OR signal is output, read the OR signal when the BUSY signal turns OFF.
Single Measurement
Example: Three Data Items Set for Parallel Data Output
Timing Chart
allel Connection
2
Controlling Operation and Outputting Data with a Par-
RUN signal
TRIG signal
BUSY signal
OR signal
D0 to D15
signals
GATE signal
Run Mode entered.
ON
OFF
ON
OFF
ON
OFF
ON while measurements are being processed
(depends on BUSY output conditions)
ON
OFF
The total output time is as follows: Output period × Number of output data items.
ON for 1 ms min.
GATE ON delay
Turned ON when overall judgement is NG.
(Polarity of all output signals: Positive)
Data 0
Output time
Output period
Data 1
Setup Mode entered.
Data 2
1The RUN signal turns ON when measurements are enabled and the Sensor is in Run Mode.
2Turn ON the TRIG signal while the BUSY signal is OFF.
3Measurement begins and the BUSY signal is turned ON during the measurement process.
4When the measurement has been finished, the measurement results are output using an OR sig-
nal and the D0 to D15 signals, and the BUSY signal is turned OFF.
*1You can also set the [BUSY output] parameter so that the BUSY signal is turned OFF after the completion of data logging, image logging,
or displaying results.
*1
5After the BUSY signal turns OFF, the GATE si gnal is turned ON when the time that is set in the
[GATE ON delay] parameter in the communications settings has elapsed.
*2
6The GATE signal is turned ON, and then the GATE signal is turned OFF when the time that is set
in the [Output time] parameter in the communications settings has elapsed.
*2Set the GATE ON delay and output time for the GATE signal so that the total time does not exceed the output period.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
*2
67
Page 70
Important
Data 0
Data 0
Data 0
Output time
Output period
OFF
ON
D0 signal
GATE signal
GATE ON delay
Continuous measurements ended.
IN7 signal
OFF
ON
BUSY signal
OFF
ON
OR signal
ON while measurements are being processed
(depends on BUSY output conditions)
OFF
ON
OFF
ON
Allow 5 ms min. and then turn ON IN7.
Run Mode entered.
RUN signal
Setup Mode entered.
Measurements
executed.
Measurements
executed.
Turned ON when overall judgement is NG.
(Polarity of all output signals: Positive)
IN0 to IN6
signals are
OFF
Continuous
measurements
started.
Measurements
executed.
Measurements
executed.
Data Output Time and TRIG Signal Input Interval
Set the input interval for the TRIG signal so that it is equal to or greater than the total output time. If the input interval
for the TRIG signal is shorter than the total output time, the output data buffer will eventually overflow and output data
will be discarded.
Continuous Measurements
Example: Only Data 0 Set for Parallel Data Output
Timing Chart
1The RUN signal turns ON when measurements are enabled and the Sensor is in Run Mode.
2Turn ON IN7 while IN0 to IN6 are OFF. If this status is held while the BUSY signal is OFF, contin-
3When measurement results are output, the GATE signal is turned ON when the time that is set in
4The GATE signal is turned ON, and then the GATE signal is turned OFF when the time that is set
*1Set the GATE ON delay and output time for the GATE signal so that the total time does not exceed the output period.
68
5Continuous measurements end when the IN7 signal is turned OFF.
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
uous measurements will begin and the BUSY signal will remain ON while continuous m easurements are being performed.
the [GATE ON delay] parameter in the communications se tt ings has elapsed.
in the [Output time] parameter in the communications settings has elapsed.
*1
*1
FQ2-S/CH User’s Manual
for Communications Settings
Page 71
The ERROR signal will turn ON if the input command is not executed normally.
Note
External device
FQ2
(2) Measurement
results output.
*1
(1) DSA signal sent.
Set at least one data output for parallel judgement output and then read the OR signal when the GATE signal turns
ON.
Outputting Measurement Results for Data Send Requests from the External Device (Handshaking)
With handshaking, measurement results are output after there is a data send request (DSA signal) from the
external device.
Handshaking is effective for sequentially outputting many measurement results and it is a reliable way to
transfer data.
*1The overall judgement (OR) is output even if the DSA signal is not output by the external device.
DSA Signal
The DSA signal is used by the external device to req uest the next data t ransmission. The Sensor will not output
data until the DSA signal is turned ON. When the external device is ready for reception, turn ON the DSA
signal.
Timing Chart
Example: Three Data Items Set for Parallel Data Output
allel Connection
2
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
69
Page 72
If the DSA signal does not turn ON
within the specified time after
measurements are completed, a
timeout error will occur.
If more than one data item is being output for one
measurement and the DSA signal does not turn
ON within the specified time after the GATE
signal turns OFF, a timeout error will occur.
If the DSA signal does not turn OFF within the specified time
after the GATE signal turns ON, a timeout error will occur.
Overall judgement (Output when measurements have been
completed regardless of the DSA signal.)
Data 0
Timeout Time 1
Timeout Time 3
Timeout Time 2
Data 1
GATE
ON delay
TRIG signal
OFF
ON
OFF
ON
ON for 1 ms min.
BUSY signal
OFF
ON
OFF
ON
OR signal
GATE signal
OFF
ON
DSA signal
ON while measurements are being processed
(depends on BUSY output conditions)
Run Mode entered.
RUN signal
Setup Mode entered.
Data 2
D0 to D15
signals
1Turn ON the TRIG signal while the BUSY signal is OFF.
2Measurement begins and the BUSY signal is turned ON during the measurement process.
3At the same time or after the TRIG signal turns ON, the external device turns ON the DSA signal
to request data transmission.
*1If you do not turn ON the DSA signal within the specified timeout time after measurements are completed, a timeout error will occur. (This
is timeout time 1.)
*1
70
4When the measurement has been finished, the measurement result is output using an OR signal,
and the BUSY signal is turned OFF.
*2You can also set the [BUSY output] parameter so that the BUSY signal is turned OFF after the completion of data logging, image logging,
or displaying results.
5The DSA signal is ON, and thus the D0 to D15 signals are output and the GATE signal turns ON.
6When the DSA signal is turned OFF, the GATE signal turns OFF.
*3If you do not turn OFF the DSA signal within the specified timeout time after the GATE signal turns ON, a timeout error will occur. (This is
timeout time 2.)
7If more than one data item is being output for one me asurement an d you do not t urn ON the DSA
signal within the specified timeout time after the GATE signal turns OFF, a timeout error will occur. (This is timeout time 3.)
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
*2
*3
FQ2-S/CH User’s Manual
for Communications Settings
Page 73
Offsetting the Timing of Outputting Measurement Results
Note
The measurement result is output when the TRIG signal turns ON the number of times set for the [Number of
delay] parameter.
This allows you to delay the output timing of the measurement result from the Sensor according to the actual
processing timing of the line.
Example: Sequential Feed Line That Uses a Star Wheel
In a line like this, you can synchronize the output timi ng of the measurement result s and the discharge t iming of
NG products that are detected.
2
1st
3rd
2nd
Encoder
4th
OK
Result output
NG
Discharge device
OR
TRIG
Sensor
If you set the [Number of delay] parameter to 4, the measurement result output is delayed by four TRIG
signals.
• With synchronized output, the number of times that the TRIG signal turns ON is counted. Therefore, use synchronized output only when only one measurement result is output for each measurement. (Output either the parallel
judgement or data.)
• Use a measureme nt trigger only for single measurements.
If you perform continuous measurements by inputting a command, the output timing will not be correct and the
Sensor may malfunction.
allel Connection
Controlling Operation and Outputting Data with a Par-
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
71
Page 74
Timing Chart
(Result not
output.)
The results for (1) is output when the TRIG signal
turns ON the third time.
Result for (1)Result for (2)Result for (3)Result for (4)
(1)(2)(3)(4)(5)
TRIG signal
OFF
ON
OFF
ON
OFF
ON
OFF
ON
ON for 1 ms min.
BUSY signal
OR signal
D0 to D15 signals
GATE signal
Run Mode entered.
RUN signal
Setup Mode entered.
GATE ON delay
Output time
ON while measurements are being processed
(depends on BUSY output conditions)
Overall judgement
result for (1)
Overall judgement
result for (2)
Overall judgement
result for (3)
Overall judgement
result for (4)
Overall judgement
result for (5)
Operation When [Number of Delay] Is Set to 2
1Repeatedly turn ON the TRIG signal while the BUSY signal is OFF.
2The OR signal is output when the TRIG signal is turned ON.
3When the TRIG signal turns ON for the third time, the measurement result (D0 to D15) for the first
time that the TRIG signal turned ON is output and the GATE signal is also output at this time.
4When the TRIG signal turns ON fo r the fourth time, the measurement result (D0 to D15) for the
second time that the TRIG signal turned ON is output and the GATE signal is also output at this
time.
5Each time the TRIG signal turns ON after that, the measurement result (D0 to D15) from when the
TRIG signal turned ON two times previously is output.
72
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 75
Changing the Settings of the I/O Signals
Note
Changing the Settings of the Out p ut Sign a ls
Adjusting the Judgment Output Timing
You can change the timing of outputting the measurement result with the OR signal (after finalizing the
measurement result) according to the needs of the external device.
Adjusting the Judgment Output Timing: p. 42
Changing the Judgment Output ON Conditions
You change the ON condition for the OR signal to turn ON the signal when the judgement result is OK or when
it is NG.
Changing the Judgment Output ON Condition: p. 44
Adjusting the End Timing of the BUSY Signal
You can change the end timing of the BUSY signal.
Adjusting the End Timing of the BUSY Signal: p.45
Changing the Output Polarity of the Output Signals
You can change the ON/OFF output polarity of the output signals
[In/Out] − [I/O setting] − [I/O] − [Output]
1Press [Output polarity] and select the ON/OFF polarity for all output signals.
ItemParameterDescription
You can reverse the ON/OFF conditions of the output signals.
For example, when the BUSY signal uses positive polarity, the signal is
ON while the Sensor is processing something. If you change the setting to
negative polarity, the Sensor will be ready to receive data or signals when
the BUSY signal is ON.
Output polarity
Positive (default)
Negative
Applicable Output Signals
• RUN
•OR
•BUSY
• ERROR
•STGOUT
•SHTOUT
•DSA
•GATE
• D0 to D15
•ACK
allel Connection
2
Controlling Operation and Outputting Data with a Par-
• You can use output signals as given below when RS-232C Interface Sensor Data Unit is connected to Sensor.
Use a measurement trigger only for single measurements.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
73
Page 76
Setting the Output Time of the ACK Signal
Important
Important
You can set the output time of the normal execution completion signal for parallel commands.
[In/Out] − [I/O setting] − [I/O] − [Output] − [ACK signal ON period]
The ACK signal is not output for normal completion of continuous measurement commands.
Changing the Output Timing and Output Time of the STGOUT Signal
Y o u can cha nge the out put s ettings o f the STGOUT signal t o adjust whe n and f or how l ong the e xtern al li ghting
When the strobe polarity is set to [Negative], a delay of about 200 to 300 μs occurs from when the TRIG signal is input
until the STGOUT signal goes low. When a high-speed shutter is used, set the [Output polarity] parameter to [Positive].
Enter the delay time from when the TRIG signal is
input until the external lighting is lit. This setting is
applicable for external trigger input only.
Set the pulse width of the output signal (STGOUT)
that tells the external lighting when to light.
• Timing Chart for Strobe Trigger Output Signal
The STGOUT signal turns ON in sync with the trigger input signal from an external device.
ON
Trigger input (TRIG)
OFF
Trigger delay
ON
Imaging element
shutter signal
STGOUT
Polarity of all output signals: Positive
OFF
ON
OFF
Strobe output delay
Exposure time
Strobe output time
74
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 77
Controlling Operation from an External Device
IN7 IN6 IN5 IN4 IN3 IN2 IN1 IN0
Execution
Command
The following Sensor functions can be controlled with command inputs from an external device without
connecting the Touch Finder.
OperationDescriptionReference
Switching the sceneThis command changes the scene when the line process changes.p. 75
Clearing measurement
values
Clearing an errorThis command turns the ERROR signal OFF.
Re-registering the model
and reference color
TeachingThis command uses the image that is currently being input to execute
Clearing the OR and D signals
Saving data in the Sensor This command saves the current settings (scene data and system data)
Retrying Inspection by
External
Signal (trigger retry)
This command clears the measurement values.
The OR signal and D signals are not cleared.
The ERROR indicator is also turned OFF.
This command re-registers the model and reference color.p. 79
teaching for all of the registered items.
This command clears the OR signal and D signals.p. 81
in the Sensor.
This command continues inspection when the trigger signal is ON.p. 84
p. 76
p. 77
p. 80
p. 82
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Input Format (IN7 to IN0)
Changing the Scene
This command changes the scene to shift to a different process.
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
101Input the scene number as a binary value.10100001
(Changes to scene 1.)
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
75
Page 78
Timing Chart
0
IN7 signal
OFF
ON
RUN signal
OFF
ON
IN0 to IN6
signals
Run Mode entered.Setup Mode entered.
BUSY signal
ACK signal
OFF
ON
OFF
ON
OFF
ON
Command execution
Allow 5 ms min.
and then turn ON IN7.
ON for 1 ms min.
ACK output time
0100001 (Changes to scene 1.)
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is ready to take measurement and it is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal indicates that the Sensor is currently changing the scene.
Do not input the next command while the BUSY signal is ON. The process that is currently being e xecu ted and th e command that is input will not be executed correctly.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK output
time.
76
Input Signals to Change the Scene
SignalFunction
IN0 to IN4 These signals specify the scene number (0 to 31).
IN5Turn ON.
IN6Turn OFF.
IN7This signal functions as the execution trigger. Set th e IN0 to IN6 signa ls, wait for at least 5 ms, a nd then tur n ON the IN7
signal. The BUSY signal will be ON while the command is being executed.
Clearing Measurement Values
This command clears the measurement values.
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1100000011000000
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 79
Timing Chart
0
IN7 signal
OFF
ON
OFF
ON
RUN signal
OFF
ON
IN0 to IN6
signals
Run Mode entered. Setup Mode entered.
BUSY signal
1000000
Allow 5 ms min. and then turn ON IN7.
ON for 1 ms min.
ACK signal
OFF
ON
ACK output time
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSY This signal does not change while clearing measurement values.
ACKWhen the command has been completed normally, this signal is turn ed ON fo r t he time t hat is set f or the ACK o utp ut time .
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Input Signals
SignalFunction
IN0 to IN5 Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for clearing measurement values. Set the IN0 to IN6 signals, wait for at least 5 ms, and then turn
ON the IN7 signal.
Clearing an Error
This command clears the error output status.
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1100000111000001
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
77
Page 80
ON for 1 ms min.
OR signal
OFF
ON
BUSY signal
OFF
ON
OFF
ON
RUN signal
OFF
ON
TRIG signal
OFF
ON
Run Mode entered.Setup Mode entered.
D signals
Measurements executed.
GATE signal
OFF
ON
OFF
ON
Output timeGATE ON delay
ERROR signal
OFF
ON
OFF
ON
OFF
ON
IN0 to IN6
signals
IN7 signal
OFF
ON
Data
TRIG is input.
ACK signal
ACK output time
1000001
Allow 5 ms min. and then turn ON IN7.
ON for 1 ms min.
Timing Chart
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal does not change while clearing errors.
ORThis signal does not change while clearing errors.
D0 to D15These signals do not change while clearing errors.
GATEThis signal does not change while clearing errors.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK
However, do not clear an error while the BUSY signal is ON. The command will not be executed correctly.
output time.
78
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 81
Input Signals
0
IN7 signal
OFF
ON
OFF
ON
RUN signal
OFF
ON
IN0 to IN6 signals
Run Mode entered.Setup Mode entered.
BUSY signal
Command execution
1001000
Allow 5 ms min.
and then turn ON IN7.
ON for 1 ms min.
ACK signal
OFF
ON
ACK output time
SignalFunction
IN0Turn ON.
IN1 to IN5Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for clearing an error.
Set the IN0 to IN6 signals, wait for at least 5 ms, and then tu r n ON the IN 7 sig nal .
Re-registering the Model and Reference Color
This command is input from an external devices, such as a PLC, t o re-register t he model s and reference colors
for registered inspection items based on the image that was just input.
Inspection itemsRe-registered data
Search, Shape Search III, Shape Search II, Sensitive Search, Models
Color DataReference color (hue, saturation, and brightness)
Edge Position, Edge Width, Edge Pitch, Area, and LabelingNone
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1100100011001000
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Timing Chart
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
79
Page 82
Output Signals
0
IN7 signal
OFF
ON
OFF
ON
OFF
ON
RUN signal
OFF
ON
IN0 to IN6 signals
Run Mode entered.Setup Mode entered.
BUSY signal
Command execution
1001001
Allow 5 ms min.
and then turn ON IN7.
ON for 1 ms min.
ACK signal
ACK output time
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal is ON during re-registration of the model and reference color.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK output
time.
Input Signals
SignalFunction
IN0 to IN2 Turn OFF.
IN3Turn ON.
IN4 and IN5 Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for executing re-registration of the model and reference color . Set t he IN0 to IN6 signals, wait for
at least 5 ms, and then turn ON the IN7 signal. The BUSY signal will be ON while the command is being executed.
Teaching
This command executes teaching for all registered items (excluding Edge Pitch) using the current input image.
Parameters
ExecutionCommandInput example
Timing Chart
IN7IN6IN5IN4IN3IN2IN1IN0
1100100111001001
80
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 83
Output Signals
ON for 1 ms min.
TRIG is input.
OR signal
BUSY signal
OFF
ON
OFF
ON
RUN signal
OFF
ON
TRIG signal
OFF
ON
Run Mode entered.Setup Mode entered.
D signals
Measurements executed.
GATE signal
OFF
ON
Output time
1000010
GATE ON delay
IN0 to IN6
signals
IN7 signal
OFF
ON
Data
0
ACK signal
OFF
ON
ACK output time
Allow 5 ms min.
and then turn ON IN7.
ON for 1 ms min.
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal is ON while teaching is being executed.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK
output time.
Input Signals
SignalFunction
IN0Turn ON.
IN1 and IN2Turn OFF.
IN3Turn ON.
IN4 and IN5Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for executing teaching. Set the IN0 to IN6 signals, wait for at least 5 ms, and then turn
ON the IN7 signal. The BUSY signal will be ON while the command is being executed.
Clearing the OR and D Signals
This command clears the OR signal and D signals.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1100001011000010
Timing Chart
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
81
Page 84
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal does not change while clearing the OR and D signals.
ORIf this signal was ON, it will be turned OFF.
D0 to D15If these signals were ON, they will be turned OFF.
GATEThis signal does not change while clearing the OR and D signals.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK
However, do not clear the OR and D signals while the BUSY signal is ON.
The command will not be executed correctly.
However, do not clear the OR and D signals while the GATE signal is ON.
The command will not be executed correctly. Also, the D and GATE outputs may not function correctly.
output time.
Input Signals
SignalFunction
IN0Turn OFF.
IN1Turn ON.
IN2 to IN5Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for clearing the OR and D signals.
Set the IN0 to IN6 signals, wait for at least 5 ms, and then tu r n ON the IN 7 sig nal .
Saving Data in the Sensor
This command saves the current settings (scene data and system data) in the Sensor.
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1101000011010000
82
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 85
Timing Chart
RUN signal
Run Mode entered. Setup Mode entered.
ON
OFF
IN0 to IN6
signals
0
1010000
ON for 1 ms min.
ON
IN7 signal
OFF
Allow 5 ms min.
and then turn ON IN7.
BUSY signal
ON
OFF
Command execution
ON
ACK signal
OFF
ACK output time
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal will be ON while data is being saved in the Sensor.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK
output time.
Input Signals
allel Connection
2
Controlling Operation and Outputting Data with a Par-
SignalFunction
IN0 to IN3Turn OFF.
IN4Turn ON.
IN5Turn OFF.
IN6Turn ON.
IN7This signal is the trigger for saving data in the Sensor .
FQ2-S/CH User’s Manual
for Communications Settings
Set the IN0 to IN6 signals, wait for at least 5 ms, and then tu r n ON the IN 7 sig nal .
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
83
Page 86
Retrying Inspection by External Signal (Trigger Retry)
Note
OFF
ON
OFF
ON
OFF
ON
IN7 signal
IN0 to IN6 signals
IN5 ON after at least 5 ms
Retry starts
ScanNGScanNGScan
OK
Retry ends
BUSY signal
OR signal
RUN signal
OFF
ON
Run Mode entered.Setup Mode entered.
0
0001100
ACK signal
OFF
ON
Measurement is repeated until all inspection items have been successfully scanned.
Retry inspection ends when any one of the following conditions is sati sfied:
(1) The scanning result of all inspection items is OK.
(2) Trigger retry (this command) turns OFF.
(3) The timeout time is exceeded.
• This function can be used in Run Mode only.
Parameters
ExecutionCommandInput example
IN7IN6IN5IN4IN3IN2IN1IN0
1000110010001100
Timing Chart
When inspection is OK
1Set the IN0 to IN6 signals.
2When IN5 is turned OFF > ON with the
BUSY signal OFF, trigger retry inspection
starts.
3When retry inspection starts, the BUSY
signal turns ON.
4When the overall judgment turns ON,
retry inspection ends and the BUSY
signal turns OFF.
5After verifying that the BUSY signal has
turned ON > OFF, IN5 is turned ON >
OFF.
84
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 87
When inspection is NG
Note
RUN signal
IN0 to IN6 signals
IN7 signal
BUSY signal
OR signal
ACK signal
Run Mode entered.Setup Mode entered.
ON
OFF
0001100
0
ON
OFF
ON
OFF
ON
OFF
ON
OFF
IN5 ON after at least 5 ms
Retry starts
ScanNGScanNGScan
Scan
NG
NG
Retry ends
ACK output time
1Set the IN0 to IN6 signals.
2When IN5 is turned OFF > ON with the
BUSY signal OFF, trigger retry inspection
starts.
3When retry inspection starts, the BUSY
signal turns ON.
4IN5 is turned OFF and retry inspection
ends. If retry inspection ends but the
overall judgment is NG, the OR signal
turns ON. (Output polarity: When ON at
NG)
Output Signals
SignalFunction
RUNThis signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode.
BUSYThis signal is ON while measurements are being processed (depends on BUSY output conditions).
ORThe overall judgment result is output from this signal.
ACKWhen the command has been completed normally, this signal is turned ON for the time that is set for the ACK
output time.
allel Connection
2
Controlling Operation and Outputting Data with a Par-
Input Signals
SignalFunction
IN0 to IN6With these signals, user (PLC) sets the commands.
IN7This signal is the trigger for Trigg er Retry. Set the IN0 to IN6 signals, wait for at least 5 ms, and then turn ON the
IN7 signal. The BUSY signal will be ON while the command is being executed.
The time the BUSY signal is ON is the trigger retry execution time.
Important
It may happen that the PLC is unable to recognize BUSY signal ON because the sample time is slow or otherwise. In
this event, have W0.00 turn OFF at a suitable time.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
85
Page 88
MEMO
86
Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit
FQ2-S/CH User’s Manual
for Communications Settings
Page 89
Controlling Operation and Outputting
Data with an Ethernet Connection
3
Ethernet Connection
Controlling Operation and Outputting Data with an
3-1 Controlling Operation and Outputting Data with EtherNet/IP
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S3FQ2-S4
Introduction to EtherNet/IP
EtherNet/IP is an industrial multi-vendor network that uses Ethernet.
The EtherNet/IP specifications are open standards managed by the ODVA (Open DeviceNet Vendor
Association). EtherNet/IP is used by a wide range of industrial devices.
Because EtherNet/IP uses standard Ethernet technology, various general-purpose Ethernet devices can be
used in the network.
EtherNet/IP has mainly the following features.
High-speed, High-capacity Data Exchange through Tag Data Links
The EtherNet/IP protocol supports implicit communications, which allows cyclic communications called tag
data links with EtherNet/IP devices.
Tag Data Links at Specified Communications Cycle for Each Applicat ion Regardl ess of the Number o f Nodes
Tag data links (cyclic communications) operate at the cyclic period that is specified for each application,
regardless of the number of nodes. Data is exc hang ed over the network at th e refr esh cy cle tha t i s se t for ea ch
connection. The communications refresh cycle will not increase even if the number of nodes is increased, i.e.,
the concurrency of the connection’s data is maintained.
Because the refresh cycle can be set for each connection, each application can communicate at its ideal
refresh cycle. For example, interprocess interlocks can be transferred at high speed, while the production
commands and the status monitor information are transferred at low speed.
On a network to which many devices are connected, performance may drop (e.g., responses may be delayed or packets lost) or communications errors may occur when there is temporarily high traffic on the network. Test the operation
under actual conditions before you start actual operation of the system.
88
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Page 91
Data Exchange with EtherNet/IP
Vision Sensor
Connection
PLC
Output tag set name: B
Output tag set name:
Input_101
Input tag set name: A
Ethernet (EtherNet/IP)
Target
Connection
Originator
Tag: D0
Tag: D100
Tag: Input_101
Connection from
FQ2 to PLC
Input tag set name:
Output_100
Tag:
Output_100
Connection from
PLC to FQ2
Note
Data is exchanged cyclically between Ethernet devices on the EtherNet/IP network using tag data links as
shown below.
3
Ethernet Connection
Controlling Operation and Outputting Data with an
Data Exchange Method
To exchange data, a connection is opened between two EtherNet/IP devices.
One of the nodes requests the connection to open a connection with a remote node.
The node that requests the connection is called the originator, and the node that receives the request is called
the target.
Data Exchange Memory Locations
The memory locations that are used to exchange data across a connect ion are specified as tags.
You can specify memory addresses or variables for tags.
A group of tags consists of an output tag set and an input tag set.
To communicate by EtherN et/IP with a PLC that does not support tag data link communication, use the message
communication function rather than tag data link.
Communicating with the Sensor Controller with EtherNet/IP Message Communications: p.121
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with EtherNet/IP Communications
89
Page 92
FQ2 Communications for EtherNet/IP Connections
Y ou can use Ethe rNet/IP t ag dat a links to communicat e between the PLC and the Sen sor to perform control via
command/response communications or to output data after measurements.
The FQ2 complies with EtherNet/IP conformance test version A10.
To connect to OMRON Controllers and communicate through EtherNet/IP, you use the Network Configurator to
set up tag data links (i.e., tags, tag sets, and connection se ttings).
Refer to the following manuals for details on the tag data link settings that are made with the Network
Configurator.
• NJ-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506)
• CS/CJ-series EtherNet/IP Units Operation Manual (Cat. No. W465)
• CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (Cat. No. W495)
90
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Page 93
Types of Communications Areas
(1) Command area
PLC
• Control inputs
• Command code
• Command parameters
(2) Response area
(3) Output area
• Control outputs
• Command code
• Response code
• Response data
• Output data
• Character string to output
Vision Sensor
Execution
After measurements
Output Tag Set
Input Tags
*1
Output Tags
Input Tag Set
Input Tag SetOutput Tag Set
20 bytes
16 bytes
32 to
256 bytes
The control commands that are
written to the Command Area
are executed.
Measurement results are
written to the response area
in the PLC.
The execution results
from the Vision Sensor
are written here.
Output data from the
Vision Sensor is written
here.
Measurement results are
written to the output area.
The following control commands
are written to the Vision Sensor.
Input
connection
to Sensor
Output
connection
to PLC
Response
Command
For EtherNet/IP communications, the following three communications areas are used in the PLC to perform
communications.
Areas Used for the Different Control Methods
(1) Command areaThis is the area to which you write control commands for
the Sensor to execute.
Command/response
communications
Data output after measurements
(2) Response area
(3) Output areaThis is the area to which the Sensor writes output data for
This is the area to which the Sensor writes the results of
control commands executed from the command area.
measurements after an inspection is performed.
3
Ethernet Connection
Controlling Operation and Outputting Data with an
*1:The response area (2) and output area (3) are assigned to continuous memory addresses or to a variable.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with EtherNet/IP Communications
91
Page 94
Setting Up EtherNet/IP Communications
▲
Important
▲
Setting Network Settings in the Sensor
Set the IP address of the Sensor according to the network where the external devices, such as PLCs, are
connected.
1Press [Communication type].
2Press [EtherNet/IP].
3Set the EtherNet/IP communications parameters as
described in the following table.
[Output handshake] Set to [Yes]
[Output handshake] Set to [No]
92
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Page 95
ParameterDescriptionSetting range
Note
If the total size of the data that is specified as
output data exceeds the size that is set here,
all of the data will not be output at the same
time, but will be separated over more than one
cycle.
Output handshake Set whether to synchronize with the PLC when
data is output.
No: Measurement results are output without
synchronizing with the PLC.
Data Output after Measurements
When Handshaking Is Disabled:
Y es: Measurement results are output while synchronizing with the PLC.
Data Output after Measurements
When Handshaking Is Enabled:
Output data sizeSet the data size to output from the output area.
Any changes in the setting are applied when
the Sensor is restarted.
Set the input connection (input tag set) to 16
bytes greater than the size that you set for this
parameter.
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with EtherNet/IP Communications
93
Page 96
ParameterDescriptionSetting range
Refreshing task
period
Set the communications cycle for cyclic tag
data link communications for the Sensor. Set
the same value as you set for the requested
packet interval (RPI) on the Network Configurator.
1 to 10,000 ms (default:10 ms)
Important
• Set this parameter to the same value as you
set for the requested packet interval (RPI) in
the PLC.
• This parameter is necessary for the FQ2 to
synchronize with the communications cycles
of the cyclic tag data link communications
that are set for tag connections on the Network Configurator and in the PLC.
• If the value in the FQ2 is longer than the
value in the PLC, cyclic data exchange will
not be performed according to the expected
communications cycle.
• The sm aller the setting of this parameter is,
the more the measurement processing time
will be affected. For the lowest setting of
1 ms, the processing time will increase by
approximately 5% to 10%.
TimeoutThis parameter is displayed and can be set only
when [Output handshake] is set to [Yes].
A timeout error will occur if there is no response
from the PLC within the time that is set.
• From when measurements are completed
until the DSA Bit turns ON
• From when the GATE flag turns ON until the
DSA Bit turns OFF
• From when the GATE flag turns OFF until the
DSA Bit turns ON
Data output period This parameter is displayed and can be set only
when [Output handshake] is set to [No]. Set the
period for outputting measurement results.
0.1 to 120.0 s (default: 10.0 s)
2 to 5,000 ms (default: 40 ms)
Important
Set the Sensor measurement interval to be longer than the Measurement time + Data output
period value.
GATE signal ON
period
This parameter is displayed and can be set only
when [Output handshake] is set to [No].
Set the time to turn ON the GATE signal.
Set the time that is required for the PLC to read
the measurement results.
1 to 1,000 ms (default: 20 ms)
Important
Set GATE output period that is longer than the
PLC cycle time and the packet interval (RPI).
94
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Page 97
Tag Data Link Setting Methods
Important
This section describes how to set data link s for EtherNet/IP.
The communications areas in the PLC for which data links are created to the Sensor are specified as tags and
tag sets, and the connections are set for tag data link communications.
Tags, tag sets, and connections are set from the Network Configurator.
Refer to the following manuals for details on the tag data link settings that are made with the Network
Configurator.
• NJ-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506)
• CS/CJ-series EtherNet/IP Units Operation Manual (Cat. No. W465)
• CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (Cat. No. W495)
• To connect the FQ2 to an NJ/CJ-series CPU Unit, install the EDS file that defines the connection information for the
FQ2 in the Network Configurator. Download the EDS file from the OMRON website.
• After tag data links are set, the Sensor will automatically be restarted to enable the settings.
Tags, Tag Sets, and Connection Settings
The communications areas in the PLC are set as tag data link connections as shown in the following table.
• Tag and Tag Set Settings in the PLC
ParameterSettings
Command areaResponse area and output area
Type of tags and
tag set
Tag and tag set
names
Data size20 bytes48 to 272 bytes (total size of response area and
*1Specify the I/O memory address of the first word in the response area.
The output area is assigned immediately after the response area.
If you specify a variable name, the variable is assigned for both the response area and output area.
Refer to Accessing Communications Areas Using Variables with NJ-series Controllers on p. 105 for information on how to access the signals in the communications areas from the user program when variables are assigned.
Output tag setInput tag set
I/O memory addresses or variable namesI/O memory addresses or variable names
output area)
*1
3
Ethernet Connection
Controlling Operation and Outputting Data with an
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with EtherNet/IP Communications
95
Page 98
Settings in the FQ2 (Device Parameter Settings)
1Right-click the FQ2 in the network on the Network Configurator and select [Parameter] − [Edit].
2The Edit Device Parameters Dialog Box will be displayed. Make the required settings.
Parameter nameValueSetting range
001 Input Size
The total size of response area and output
48 to 272
*1
area
*2
002 Output Size
003 RPI
*1Although the data size can be set as high as 502 bytes, with the current version set one of the following as the total data size for the output
area (data output size) and the response area (16 bytes).
• 48 bytes (default)
• 80 bytes
• 144 bytes
• 272 bytes
*2Although the data size can be set as high as 502 bytes, with the current version use the default setting of 20 bytes.
*3The packet interval (RPI) is set in the connection settings between the PLC and the Sensor. No setting is required here.
*3
The data size of command area20
The requested packet interval10000
Connection Settings
ParameterSetting
Originator device (PLC)Input tag setPLC_tag_set_name-[**Byte]
**: This is the total size of the response area and
Target device (Sensor)Output tag setInput_101-[**Byte]
**: This is the total size of the response area and
output area that you set.
Input tag setOutput_100-[20Byte]
Packet interval (RPI)Any (default: 20.0)
*1If multi-cast connections are used, however, use an Ethernet switch that has multi-cast filtering, unless the tag set is received by all nodes
in the network.
*2Set the same value as you set for the refreshing task period in the EtherNet/IP communications settings.
*2
96
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Page 99
• If I/O memory ad dresses are specified for the communications areas, the informatio n in the communications areas
Important
will be cleared when the operating mode of the PLC changes unless addresses in the CIO Area, which are maintained, are specified.
• The following assembly object is required to specify instances when the EDS file is not used.
Assembly Object Settings
Parameter nameSettingRemarks
Instance ID100Output connection
101Input connection
Setting the Data to Output Automatically after Measurements
You can specify the measurement data to output automatically to the PLC after measurements.
Data That Can Be Output
• Data Output
On the FQ2, data that is output after measurement can be assigned to Data 0 to Data 31 in the output data
settings.
When an item is assigned to an output data setting , the data is output in units of four bytes per item.
The maximum data size that can be output at once is 256 bytes.
3
Ethernet Connection
Controlling Operation and Outputting Data with an
Note
If multiple inspection results are assigned to one output data setting, that output data setting will be set for more than
four bytes of data output. As a result, it is possible that an item that exceeds the data size (256 byes) that can be output at once will be set in the data output setting. In this case, the output will be divided and output over multiple
cycles.
Output Data Size and Number of Output Data Upper Value Setting: p. 26
The measurement data from inspection items that can be output and the calculation results from the
expression settings can be output.
For data that can be output, refer to the Measurement Data That Can Be Used for External Outputs andCalculations for each inspection item.
Assigning Detection Results to Output Data: p. 98
Assigning More Than One Detection Result to Output Data: p. 98
• Outputting Character Strings (Only supported on the FQ2-S4/CH)
You can output a character string for each of the inspection items that reads a character string, such as the
OCR inspection item. Also, when reading the character string fails, you can output a specific character string
that is set in advance.
Outputting Read Character Strings: p. 101
FQ2-S/CH User’s Manual
for Communications Settings
Controlling Operation and Outputting Data with EtherNet/IP Communications
97
Page 100
Assigning Inspection Results to Output Data
▲
▲
You can individually assign the parameters of the inspection items to output data (data 0 to data 31).
The following procedure shows how to assign the measured position X of [0. Search] to data 0 for a binary
output.
[In/Out] − [I/O setting] − [Output data setting] − [Link data output/Fieldbus data output] −
[Output data set]
1Press [0. Data 0].
2Press [Data setting].
3Press [I0. Search].
4Press [Position X X].
5If the inspection item allows multi-point output,
press the number ([0] to [31]) of the inspection result
for which to output the data from the list of inspection results.
To register something to data 1 and higher, repeat this process.
The settings will be enabled after you restart the Sensor.
Assigning More Than One Inspection Result to the Same Output Data
You can assign more than one inspection result to the same data output to output all of the assigned results.
This is possible for the following inspection results.
• Parameters for the same inspection item: You can assign up to five inspection results.
• Inspection results that support multi-point output: You can assign inspection results within the specified range (0 to
31).
The following procedure shows how to assign more than one inspection result to data 0.
[In/Out] − [I/O setting] − [Output data setting] − [Link data output/Fieldbus data output] −
[Output data set]
1Press [0. Data 0].
2Press [Multi-data setting].
98
Controlling Operation and Outputting Data with EtherNet/IP Communications
FQ2-S/CH User’s Manual
for Communications Settings
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.