Thank you for purchasing the FQ2-S/CH.
This manual provides information regarding functions, performance and operating methods that
are required for using the FQ2-S/CH.
When using the FQ2-S/CH, be sure to observe the following:
• The FQ2-S/CH must be operated by personnel knowledgeable in electrical engineering.
• To ensure correct use, please read this manual thoroughly to deepen your understanding of the
product.
• Please keep this manual in a safe place so that it can be referred to whenever necessary.
APPLICATION CONSIDERATIONS
(Please Read)
User's Manual for
Communications Settings
Overview of Communication Specifications
Controlling Operation and Outputting
Data with a Parallel Connection
Controlling Operation and Outputting
Data with an Ethernet Connection
Controlling Operation and Outputting
Data with an RS-232C Connection
Appendices
1
2
3
4
5
Smart Camera
FQ2-S/CH
Product manuals
Important
Note
2-2 Par
FQ2-CH1
FQ2-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 full product performance,
such as operational precautions.
2
Indicates application procedures.
Indicates pages where related information can be found.
1-3 Control Methods Using an External Device . . . . . . . . . . . . . . . . . . . . . 18
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
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
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.
10
Commands That Can Be Input to the Sensor from an External Device
Ty p eDescription
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.18.
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
Ty p eDescription
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.18.
Overall judgementNG is output whenever there is one or more NGs in the judgement results for mul-
Measured valuesThe measured values from inspection items can be output. The output items must
Communicating with an External Device
tiple inspection items.
The overall judgement can be output through the OR signal or through the JG 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.18.
For information on the JG output parameter.
be inspection items for output and registered as output data (data 0 to data 31).
Refer to the following for details.
Settings Required for Data Output: p.61, 97, 124, 148, 169, 198.
You can also use commands to obtain results after a measurement is performed.
*1
FQ2-S/CH User’s Manual
for Communications Settings
Ty p eDescription
Trigger sensor
External device
Status signal
Control signal
Sensor
Character output (FQ2-S4/CH
series only)
You can output character strings and numbers that are read by inspection items
such as OCR, Barcode, 2D-code, or 2D-code (DPM). Refer to Items That
Can Be Output as Output Data: p.22 for details.
You can also use commands to obtain results after a measurement is performed.
1
Control Methods for the Sensor
There are three methods that you can use to control the Sensor from a PLC or other external device. They are
described in this section.
For details on each control method, refer to their corresponding section.
Control Methods
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)
1Control with Control Signals and Status Signals (Refer to Control with Control Signals and
Status Signals: p.18)
Control and status confirmation for the Sensor is performed with the ON/OFF status of the control and
status signals.
This method is best suited for basic operations such as measurement triggers or to check the operating
status of the Sensor.
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
11
2Command/Response Method (Refer to Command/Response Method: p.20)
External device
I/O memory
Sensor
Command Area
Response Area
(1) Command
(3) Response
Output Area
(2) Command
execution
External device
I/O memory
Sensor
Command Area
Response Area
(2) Measurement data
Output Area
(1) Measurement processing
Control is performed by storing the control command and the response to that command in the I/O memory of a PLC.
This method is best suited to send multiple commands to the Sensor without using PLC communications
instructions.
3Data Output after Measurements (Refer to Data Output after Measurements: p.21)
After a measurement is executed, the measurement data specified for output is automatically output to
the specified words in the I/O memory of the PLC.
This is suited to reception of the measurement result data of each inspection item.
The Sensor can be controlled from a PLC, computer, or other external device using a variety of communication
protocols.
The communication protocols that can be used to control the Sensor from an external device are describedbelow.
12
Communicating with an External Device
Communication Protocols for Communication with the Sensor
PLC
Computer
Control can be performed through different communications protocols.
Parallel
PLC Link
No-protocol (TCP)
EtherNet/IP
PROFINET
No-protocol (UDP)
No-protocol (FINS/TCP)
Sensor
FQ2-S/CH User’s Manual
for Communications Settings
Applicable Communications Protocols
The communication protocols of each communication method that can be used with the Sensor are as follows:
OK: Supported, ---: Not supported.
Communications
method
Contact
inputs
Data sharing
Frame
transmission
*1:When connected to a CJ-series PLC, specify the areas in the I/O memory.
*2:This connection is via the RS-232C Interface Sensor Data Unit. Only supported on the FQ2-S3/S4/CH series.
Communi-
OverviewCommunications cable type
cations
protocol
ParallelData is exchanged between an external device and the
Sensor through combinations of ON/OFF signals from
multiple physical contacts.
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.
EtherNet/IP This is an open communications protocol.
Tag data links are used for communication with the Sen-
sor.
On the PLC, structure variables are created that corre-
spond to the control signals, command/response data,
and measurement data. These variables are then used
as tags to input and output data through tag data links
to exchange data between the PLC and the Sensor.
PROFINET This is an open communications protocol.
RT (Real-time) of soft real-time communication (SRT) is
used for communication with the Sensor.
The control signals, Command Area/Response Area,
and area to store measurement data are assigned in
the I/O memory of the PLC, and data is exchanged
cyclically to share data between the PLC and the Vision
System.
No-protocol (TCP)
No-protocol (UDP)
No-protocol (FINS/
TCP)
Command frames are sent to the Sensor and response
frames are received from the Sensor without the use of
any specific protocol.
Data can be exchanged between the PLC, computer, or
other external device and the Sensor by sending and
receiving ASCII or binary format data.
This is a command system (FINS) for message services
that can be used in common on OMRON networks.
Data can be exchanged between an OMRON PLC and
the Sensor by a command/response method.
*1
Parallel
I/O
OK---OK
---OK---
---OK---
---OK---
---OK---
---OK---
Ethernet RS-232C
*2
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
13
Connection Compatibility
Note
Yes: Supported, No: Not supported
Type of connection to
FQ2-S/CH
EtherNet/IP---NoNoYesYesYesYesYes
PLC Link on EthernetNo---NoYesYesYesYesYes
PROFINETNoNo---YesYesYesYesYes
TCP no-protocol communications on Ethernet,
UDP no-protocol communications on Ethernet
FINS/TCP no-protocol communications on Ethernet
RS-232C
Parallel
communications
*1:This applies when an RS-232C Interface Sensor Data Unit is connected.
*2:This applies when a Parallel Interface Sensor Data Unit is connected.
*1
Sensor’s standard parallel
communications
Parallel Inter-
*2
face
Other connection
EtherNet/IP PLC Link
YesYesYes---NoNoYesYes
YesYesYesNo --- No YesYes
YesYesYesNo No --- YesNo
YesYesYesYesYesYes--- No
YesYesYesYesYesNo No ---
on Ethernet
PROFINET
TCP no-protocol
communications on
Ethernet,
UDP no-protocol
communications
on Ethernet
FINS/TCP
no-protocol communications
on Ethernet
RS-232C *1Parallel communications
Sensor’s
standard
parallel communications
Parallel
Interface
*2
Connections Across Network Routers
You can connect to a Sensor on a different network than the Touch Finder or PC Tool through a router.
• To connect to a Sensor, directly specify the IP address of the Sensor. Automatic connection to a Sensor is not
possible.
• Use a fixed IP address for the Sensor to connect to.
14
Communicating with an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Models That Are Compatible with the Communications Protocols
This section lists the external devices that can communicate with the FQ2-S/CH series for each
communications protocol.
PLC Link
OMRON
❍: Can connect U: Only some models can connect ✕: Cannot connect
SeriesCPU UnitInterface
Direct connection with CPU
unit (built-in port)
SYSMAC_CJ2CJ2H or CJ2MU (Built-in port only.)CJ1W-EIP21 (PLC Link
SYSMAC_CJ1CJ1H or CJ1G✕CJ1W-EIP21 (PLC Link
CJ1MU (Built-in port only.)CJ1W-EIP21 (PLC Link
SYSMAC_CSCS1H, CS1D, or CS1G✕CS1W-EIP21 (PLC Link
SYSMAC_CP1CP1LU (Built-in port only.)---
CP1H✕CJ1W-EIP21 (PLC Link
SYSMAC_OneNSJ✕NSJW-ETN21
Connection via Ethernet unit
only) or CJ1W-ETN21
only) or CJ1W-ETN21
only) or CJ1W-ETN21
only) or CS1W-ETN21
only) or CJ1W-ETN21
Mitsubishi Electric
❍: Can connect U:Only some models can connect ✕: Cannot connect
SeriesModel nameCPU UnitCPU nameInterface
MELSEC-QnUUniversal mod-
MELSEC-Q Series High-
els
Basic modelsQnCPUQ00JCPU,
performance
models
QnUDECPU
QnUDCPU
QnUCPUQ00UJCPU,
QCPUQ02CPU,
Q03UDECPU,
Q04UDEHCPU,
Q06UDEHCPU,
Q10UDEHCPU,
Q13UDEHCPU,
Q20UDEHCPU,
or
Q26UDEHCPU
Q03UDCPU,
Q04UDHCPU,
Q06UDHCPU,
Q10UDHCPU,
Q13UDHCPU,
Q20UDHCPU, or
Q26UDHCPU
Q00UCPU,
Q01UCPU, or
Q02UCPU,
Q00CPU, or
Q01CPU
Q02HCPU,
Q06HCPU,
Q12HCPU, or
Q25HCPU
Direct connection with CPU
unit (built-in port)
❍QJ71E71-100, Q71E71-B2,
✕
✕
✕
✕
Connection via Ethernet unit
or QJ71E71-B5
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
15
SeriesModel nameCPU UnitCPU nameInterface
MELSEC-QnAS
Series
------Q2ASCPU,
Q2ASCPU-S1,
Q2ASHCPU, or
Q2ASHCPU-S1
Direct connection with CPU
unit (built-in port)
✕A1SJ71QE71N3-T
Connection via Ethernet unit
EtherNet/IP
❍: Can connect U:Only some models can connect ✕: Cannot connect
SeriesCPU UnitInterface
Direct connection with CPU
unit (built-in port)
SYSMAC NJNJ501 or NJ301❍CJ1W-EIP21
SYSMAC_CJ2CJ2M or CJ2HU (Built-in port only.)CJ1W-EIP21
SYSMAC_CJ1CJ1H or CJ1G✕CJ1W-EIP21
CJ1MU (Built-in port only.)CJ1W-EIP21
SYSMAC_CSCS1H, CS1D, or CS1G✕CS1W-EIP21
Connection via EtherNet/IP
unit
No-protocol (TCP), No-protocol (UDP)
OMRON
SeriesCPU UnitInterface
Direct connection with CPU
unit (built-in port)
SYSMAC CJ2CJ2H or CJ2M---CJ1W-ETN21
SYSMAC CJ1CJ1H or CJ1G---CJ1W-ETN21
CJ1M---CJ1W-ETN21
SYSMAC CSCS1H, CS1D, or CS1G---CS1W-ETN21
SYSMAC CP1CP1LU (Built-in port only.)---
CP1H---CJ1W-ETN21
SYSMAC OneNSJ---NSJW-ETN21
Connection via Ethernet unit
No-protocol (FINS/TCP)
OMRON
SeriesCPU UnitInterface
Direct connection with CPU
unit (built-in port)
SYSMAC CJ2CJ2H or CJ2MU (Built-in port only.)CJ1W-EIP21 or CJ1W-
SYSMAC CJ1CJ1H or CJ1G---CJ1W-EIP21 or CJ1W-
CJ1MU (Built-in port only.)CJ1W-EIP21 or CJ1W-
SYSMAC CSCS1H, CS1D, or CS1G---CS1W-EIP21 or CS1W-
16
Communicating with an External Device
Connection via Ethernet unit
ETN21
ETN21
ETN21
ETN21
FQ2-S/CH User’s Manual
for Communications Settings
SeriesCPU UnitInterface
Direct connection with CPU
unit (built-in port)
SYSMAC CP1CP1LU (Built-in port only.)---
CP1H---CJ1W-ETN21
SYSMAC OneNSJ---NSJW-ETN21
Connection via Ethernet unit
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Communicating with an External Device
17
1-3
FQ2-S1
FQ2-S2
FQ2-CH
Trigger 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
Control Methods Using an External Device
FQ2-S3FQ2-S4
This section describes the methods that you can use to control the Sensor from a PLC or other external device.
Control with Control Signals and Status Signals
Control and status confirmation for the Sensor is performed with the ON/OFF status of the control and status
signals.
Measurement triggers and other signals are input as control signals from the PLC.
The operating status of the Sensor, judgement results, and other status information can be confirmed through
status signals sent from the Sensor.
(1) The external device turns ON the TRIG signal to input a measurement trigger.
(2) When the Sensor confirms that the TRIG signal is ON, it outputs the BUSY signal to the external device
and begins a measurement.
(3) When the Sensor finishes the measurement, it outputs the judgement results on the OR signal.
Control Signals and Status Signals
The types of signals that are input to and output from the sensor as control signals and status signals are
shown below. “Use of signal in each protocol” in the table below lets you check whether or not a signal is used
in each protocol.
Note that this table does not show whether simultaneous use of signals in differing communication protocols is
possible. For restrictions on communication protocols that can be used simultaneously, refer to
Connection Compatibility on page 14.
Input Signals (PLC to Sensor)
SignalSignal nameFunction
EXEControl Com-
mand Execution
Signal
TRIGMeasure BitTurn ON this signal to execute
DSA
(Used only for
handshaking output control.)
ERCLRError Clear Bit
18
Control Methods Using an External Device
Data Output
Request Signal
Turn ON this signal (from the
PLC) to send a command to the
FQ-S/CH series.
measurement.
Use this signal (from the PLC) during handshaking to request from
the FQ-S/CH series the external
output of the data output results.
Turn ON this signal to clear the ERR
signal from the Sensor Controller.
Signals for each communications protocol
ParallelPLC Link
---OKOKOK
OK---OKOK
OKOKOKOK
------OKOK
EtherNet/IP
FQ2-S/CH User’s Manual
for Communications Settings
PROFINET
SignalSignal nameFunction
IN (IN0 to IN7)Command Input
Signals
These signals are used to input
commands from a parallel interface.
Signals for each communications protocol
ParallelPLC Link
OK---------
EtherNet/IP
PROFINET
Output Signals (Sensor to PLC)
SignalSignal nameFunction
BUSYBusy Signal
FLGControl Com-
mand Completion Signal
GATEData Output
Completion Signal
READYCamera Image
Input Enabled
Signal
OR
DO (DO0 to
DO15)
ERRError SignalThe FQ2-S/CH series provides
Overall Judgement
Output Signal
Data Output Signals
This signal tells when new commands and other external inputs
cannot be 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.
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.
notification with this signal when
it detects the following errors.
Refer to Section 8 Trouble-
shooting in Vision Sensor FQ2S/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.
*2
*5
Signals for each communications protocol
ParallelPLC Link
OKOKOKOK
*1
---OKOKOK
OKOKOKOK
------OKOK
OK---OKOK
OK---------
OKOKOKOK
EtherNet/IP
1
Overview of Communication Specifications
PROFINET
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
19
SignalSignal nameFunction
IN5IN4 through IN0
Execution
Command
Execution
Command
IN7IN6 through IN0
Standard ParallelParallel Interface Sensor Data Unit
RUNMeasurement
Mode Signal
ACKCommand Com-
pletion Flag
SHTOUTExposure Com-
pletion Signal
STGOUTStrobe Trigger
Output
*1:The execution of commands or other processing received through any other protocol cannot be detected.
The parallel BUSY signal can be used in all protocols.
If you use more than one protocol and need to detect command execution, use the parallel communications BUSY signal.
*2:This signal is linked to the measurement processing.
It is not associated with the BUSY signal. It is not related to the parallel interface OR signal.
The FQ2-S/CH series turns ON
this signal when measurements
can be performed and it is in Run
Mode.
This signal tells when execution
of the DI command has been
completed.
This signal tells when Camera
exposure has been completed.
This is the trigger signal for the
strobe.
Signals for each communications protocol
ParallelPLC Link
OK---OKOK
OK---------
OK---------
OK---------
EtherNet/IP
PROFINET
Command/Response Method
Parallel
Commands are input to the Sensor by turning the IN signals (Standard Parallel: IN0 to IN5, Parallel Interface
Sensor Data Unit: IN0 to IN7) ON and OFF. There is no direct response to these commands. Confirm whether
a command was received by checking the BUSY signal.
The command code is input with part of the IN signals (Standard Parallel: IN0 to IN4, Parallel Interface Sensor
Data Unit: IN0 to IN6), and the command is executed by turning ON the execution bit (Standard Parallel: IN5,
Parallel Interface Sensor Data Unit: IN7).
PLC Link, EtherNet/IP, or PROFINET
Command/response control signals can be exchanged by storing control commands from the PLC to the
Sensor and responses from the Sensor to the PLC in the I/O memory of the PLC. This enables you to send
single measurement and scene switch requests to the Sensor without any sequence control with
communications commands from the PLC.
20
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Memory Areas Used by the Command/Response Control Method
(1) Command Area
(5) Response Area
(2) Command
(4) Response
PLC
CPU Unit
I/O memory
(communications areas)
• Switch Scene Number
• Single Measurement, etc.
OK, etc.
(3) Command is processed.
Sensor
Command AreaYou write the control commands to execute for the Sensor to this area.
Response AreaYou read the results of executing the control commands that were written to the Command Area
from this area.
Flow of Communications between the PLC and the Sensor
(1) The PLC (the user) writes a control command to a specified PLC I/O memory area (the Command Area).
Parameter Notation Examples for Command Control: p.200
(2) The PLC (the user) then turns ON the EXE bit to send the control command to the Sensor.
(3) The Sensor executes the received control command.
(4) The Sensor returns a response to the PLC after the control command is executed.
(5) The PLC (the user) stores the response in a specified PLC I/O memory area (the Response Area).
The available control commands depend on the communications protocol that is used.
Communications commands are sent to the Sensor through sequence control in the PLC. An external device
and the Sensor communicate through no-protocol communications.
Data Output after Measurements
After a Single Measurement or Start Continuous Measurements command is executed, the Sensor
automatically outputs the data that corresponds to the measurements that have been specified as output items
to the PLC. This allows you to easily pass measurement results data from the inspection items to the PLC. You
can also choose to output only when the PLC meets the conditions that are required to receive the data (i.e.,
when handshaking is turned ON).
The output destination for data depends on the protocol that is used to communicate between the external
device and the Sensor, as described below.
PLC Link, EtherNet/IP, or PROFINET
The output data is automatically output to the following area that is specified PLC I/O memory.
Area of Memory Used for Data Output after Measurement
Data Output AreaThe output data for the measurement is written to this area by the Sensor after execution of the
measurement.
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
21
Flow of Communications between the PLC and the Sensor
Data
Output Area
• Specified data is automatically output.
• Output characters
(2) Data
CPU Unit
PLC
I/O memory
(communications areas)
Sensor
Measurement
execution
(1)
The data to output after measurement and the PLC I/O memory area (Data Output Area) to store that data are
specified in advance. ( Setting Required for Data Output: p.61, 97, 124, 148, 169, 198.)
(1) Measurement is executed.
(2) After a measurement is executed, the specified measurement data is stored in the Data Output Area in
the PLC.
Parallel
A Parallel Interface Sensor Data Unit can be installed to enable data output.
The output data is output to the PLC signal wires via the D signals (D0 to D15).
This is only supported on the FQ2-S4/CH series.
• Results calculated based on the values of the measured parameters
• Judgement results from expression results (Parallel Judgement Output)
Character Output (This is Only Supported on the FQ2-S4/CH Series.)
After measurement, you can automatically output character strings that are read by OCR and other inspection
items to the PLC. Character strings can be output for the following inspection items.
•OCR
• Bar code
•2D-code
•2D-code (DPM)
Number of Characters That Can Be Output
The number of characters that can be output are shown below for each inspection item.
22
• OCR: Max. 128 characters
• Bar code, 2D-code, 2D-code (DPM): Max. 1024 characters
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
For the character output setting procedures and output specifications for each communication type, refer to the
Note
CR
Before conversion After conversion
LF
&h0D
&h7F
&h8541
DEL
&h8543
Character code
&h0A
&hFF
&h8542
&h8544
FF
following:
Outputting Character Strings
• EtherNet/IP: p.101
• PLC link: p.128
• PROFINET: p.151
• No-protocol (TCP), No-protocol (UDP): p.175
• Endian
Little endian data is output.
• Code Conversion
The converted codes are outputted for the following character codes.
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
23
Order of Output of Measurement Data and Characters (Only Supported on the FQ2-S4/CH Series)
When measurement data the data (output data settings 0 to 31) and characters are output together, the
characters are output after the data such as inspection item parameters and calculation results are output.
Example:
Read result 1: ABC
Read result 2: 0123
[Data output] − [Data 0]: 3 (Number of characters: 1)
[Data output] − [Data 1]: 4 (Number of characters: 2)
The following information will be output for the above.
EtherNet/IP, PLC Link, PROFINET
Increment from first
address in output area
+0Data 0 (4 bytes)Inspection item 0: Number of characters
+1
+2Data 1 (4 bytes)Inspection item 1: Number of characters
+3
+4‘B’‘A’Inspection item 0: Characters “ABC”
+500‘C’
+6‘1’‘0’Inspection item 1: Characters “0123”
+7‘3’‘2’
+800Filled with zeros. (Only when the character string length is not a
Output dataAssigned output data
Upper byte Lower byte
multiple of 4.)
No-protocol (TCP)
3 (Field delimiter) 4 (Record delimiter) ABC (Field delimiter) 0123 (Record delimiter) CR
CR is Delimiter, CR is not output by No-protocol (UDP) Communications.
24
Control Methods Using an External Device
FQ2-S/CH User’s Manual
for Communications Settings
Output Data Size and Number of Output Data Upper Value Setting (EtherNet/IP, PLC Link, PROFINET)
Data 0
Output 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
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
25
EtherNet/IP, PROFINET
+0
Output 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.30
*1:At the first data output, a GATE (Data Output Completion) signal is output.
*2:If the size of the specified output data exceeds the set value of the output data size setting, the data is output separately as shown below.
26
Control Methods Using an External Device
Output data size setting: 256 bytes
First Data Output
Output data 0 Output data 0
Output data 63
256
bytes
Second Data Output
Output data 7
Zeros are written to
unused bytes.
72 bytes
The previous data will be
overwritten. Adjust the
timing with handshaking to
get the data.
FQ2-S/CH User’s Manual
for Communications Settings
PLC Link
+0
Output 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 output data] (number of output data upper value)
parameter setting (e.g., 256 bytes) is discarded.
For the [Max output data] setting, refer to Initial Settings for PLC Link Communications on page 122.
1
Overview of Communication Specifications
FQ2-S/CH User’s Manual
for Communications Settings
Control Methods Using an External Device
27
Parallel Output of Measurement Data (Only Supported on the FQ2-S3/S4/CH Series)
4 bytes
Parallel data output
PLC
0. Measurement data 0
31. Measurement data 31
Reception
buffer
Data output order
Measurement
data 31
Measurement
data 0
GATE
signal
D0 to D31
signals
ON
OFF
Parallel judgement
output D0
Parallel data output
(data 0)
Parallel judgement
output D1
Parallel data output
(data 0)
Parallel judgement
output D15
Parallel data output
(data 0)
D0
D1
D15
When a Parallel Interface Sensor Data Unit is connected to the Sensor, the two types of data output below can
be performed, in addition to output of measurement judgement results.
Output data typeOutput data
Parallel Data OutputThe measurement data is output. A maximum of 32 items can be output.
Parallel Judgement OutputThe judgement results are output. A maximum of 16 judgement result items can be
output. The following two types of judgement results can be output:
• Judgement results for specified inspection items
• Judgement results of set judgement conditions for the specified item values
Order of Parallel Data Output
Parallel Output of Multiple Items
Items set to output numbers 0 to 31 of parallel data output are output by item (4 bytes) in ascending order to the
reception buffer of the PLC. The GATE signal turns OFF > ON
When this occurs, the first data item that was output to the PLC reception buffer (data 0) is overwritten by the
next output data item (data 1).
Therefore, the data output to the PLC reception buffer must be saved to PLC memory each time the GATE
signal turns ON for each data item.
*1
at each output.
*1:The operation of the DSA signal depends on whether handshaking for output control is enabled. Data Output Control with Handshak-
Data Output Timing
Output Sequence
If both parallel judgement output and parallel data output are performed at the same time, parallel judgement
output will be performed first followed by parallel data output.
Example: Parallel Judgement Output of D0 to D15 and Parallel Data Output of Data 0
28
Control Methods Using an External Device
ing: p.30.
FQ2-S/CH User’s Manual
for Communications Settings
Loading...
+ 414 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.