Omron FQ2-S/CH Series User Manual

Omron FQ2-S/CH Series User Manual

Smart camera
Hide thumbs Also See for FQ2-S/CH Series:
Table of Contents

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading

Summary of Contents for Omron FQ2-S/CH Series

  • Page 1 Smart Camera FQ2-S/CH Series User's Manual for Communications Settings Cat. No. Z338-E1-04...
  • Page 2 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.
  • Page 3 APPLICATION CONSIDERATIONS (Please Read) Overview of Communication Specifications User's Manual for Communications Settings 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 Smart Camera FQ2-S/CH...
  • Page 4 Product manuals The information required to use the FQ2-S/CH Series is divided into two manuals by objective: “FQ2-S/CH Series User’s Manual” and “FQ2-S/CH Series User's Manual for Communications Settings”. Read each manual as appropriate for your objective. Manual Description Contents...
  • Page 5: Table Of Contents

    1-1 Confirming the System Configuration ......8 FQ2-S/CH Series System Configuration ....... 8 1-2 Communicating with an External Device .
  • Page 6 3. Controlling Operation and Outputting Data with an Ethernet Connection 3-1 Controlling Operation and Outputting Data with EtherNet/IP Communications........88 Introduction to EtherNet/IP .
  • Page 7 3-5 Controlling Operation and Outputting Data with FINS/TCP No-protocol Commands ......193 Introduction to FINS Commands .
  • Page 8 FQ2-S/CH User’s Manual for Communications Settings...
  • Page 9 Overview of Communication Specifications 1-1 Confirming the System Configuration ......8 1-2 Communicating with an External Device ..... . . 10 1-3 Control Methods Using an External Device .
  • Page 10: Confirming The System Configuration

    FQ2-S3 FQ2-S4 FQ2-CH 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.
  • Page 11 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. Basic configuration External devices FQ2-S/CH Series Trigger sensor Special Ethernet Cable (RJ45/M12) Switching hub for...
  • Page 12: Communicating With An External Device

    1-2 Communicating with an External Device FQ2-S1 FQ2-S2 FQ2-S3 FQ2-S4 FQ2-CH 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.
  • Page 13: Control Methods For The Sensor

    Type Description Measured values The measured values from inspection items can be output. The output items must 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.
  • Page 14: Communication Protocols For Communication With The Sensor

    Command/Response Method (Refer to Command/Response Method: p.22) Control is performed by storing the control command and the response to that command in the I/O mem- ory of a PLC. This method is best suited to send multiple commands to the Sensor without using PLC communications instructions.
  • Page 15 Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection: p.34 Data shar- PLC Link This is OMRON’s communications protocol for Vision System. The control signals, Command Area/Response Area, and area to store measurement data are assigned in the I/O memory of the PLC, and data is exchanged cyclically to share data between the PLC and the Vision System.
  • Page 16 (RS-232C) cables in No-protocol communication. 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 can be exchanged between an OMRON PLC and the (FINS/TCP) Sensor by a command/response method.
  • Page 17 • 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...
  • Page 18 Mitsubishi Electric : Can connect :Only some models can connect : Cannot connect Interface Direct connection with CPU Connection via Ether- Series Model name CPU Unit CPU name unit (built-in port) net unit Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU, Q10UDEHCPU,  QnUDECPU Q13UDEHCPU, Q20UDEHCPU, or Q26UDEH- Universal models...
  • Page 19 No-protocol (TCP), No-protocol (UDP) OMRON Interface Direct connection with CPU Connection via Ethernet unit Series CPU Unit unit (built-in port)  SYSMAC NJ NJ501 or NJ301 (Built-in port only.) SYSMAC CJ2 CJ2H or CJ2M CJ1W-ETN21 CJ1H or CJ1G CJ1W-ETN21 SYSMAC CJ1...
  • Page 20 RS-232C (SDU2 is connected) OMRON Interface Direct connection with CPU Via serial communication unit / board Series CPU Unit unit (built-in port) CJ1W-SCU21-V  CJ2H CJ1W-SCU41-V1 CJ1W-SCU22 CJ1W-SCU42 Sysmac_CJ2 CJ1W-SCU21-V1  CJ2M CJ1W-SCU41-V1 (Built-in port only.) CJ1W-SCU22 CJ1W-SCU42 CJ1W-SCU21-V1 ...
  • Page 21: Control Methods Using An External Device

    1-3 Control Methods Using an External Device FQ2-S1 FQ2-S2 FQ2-S3 FQ2-S4 FQ2-CH 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.
  • Page 22 To check whether a command is being exe- cuted, access the Command Com- pletion (FLG) signal. Control Com- The FQ2-S/CH series uses this signal to tell the user (PLC) that mand Comple- command execution has been tion Signal completed.
  • Page 23 The signal turns OFF only when the error status is cleared by a con- trol command. Measurement The FQ2-S/CH series turns ON Mode Signal this signal when measurements can be performed and it is in Run Mode.
  • Page 24: Command/Response Method

    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.
  • Page 25: Data Output After Measurements

    No-protocol (TCP) Communications, No-protocol (UDP) Communications, No-protocol (FINS/ TCP) Communications Communications commands are sent to the Sensor through sequence control in the PLC. An external device and the Sensor communicate through no-protocol communications. Data Output after Measurements After a Single Measurement or Start Continuous Measurements command is executed, the Sensor automatically outputs the data that corresponds to the measurements that have been specified as output items to the PLC.
  • Page 26 Items That Can Be Output as Output Data Measurement Data The following data items can be output by allocating measurement results and judgement results to output data 0 to output data 31. • Judgement result • Measured parameters (correlation values, reference coordinates, etc.) •...
  • 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 calculation results are output. Example: ・...
  • Page 28 Output Data Size and Number of Output Data Upper Value Setting (EtherNet/IP, PLC Link, PROFINET) 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.
  • Page 29 EtherNet/IP, PROFINET 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.
  • Page 30 PLC Link 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 124.
  • Page 31 Parallel Output of Measurement Data (Only Supported on the FQ2-S3/S4/CH Series) When a Parallel Interface Sensor Data Unit is connected to the Sensor, the two types of data output below can be performed, in addition to output of measurement judgement results. Output data type Output data Parallel Data Output...
  • Page 32 Timing Chart The following timing chart shows the data output timing for parallel judgement outputs. Run Mode entered. Setup Mode entered. RUN signal ON for 1 ms min. TRIG signal The FQ2 starts measurements when it detects the rising edge (OFF to ON transition) of the TRIG signal.
  • Page 33 Data Output Control with Handshaking 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.
  • 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.
  • Page 35: With A Parallel Connection

    Controlling Operation and Outputting Data with a Parallel Connection 2-1 Controlling Operation and Outputting Data with the Sensor's Standard Parallel Connection ....... . 34 2-2 Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit.
  • Page 36: Sensor's Standard Parallel Connection

    2-1 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 flow with external devices.
  • Page 37 24 V Power supply Turns OFF when the Max 5 sec Sensor is ready for operation. BUSY Sensor system is initializing. The time of initializing depends on the scene data. Note You can mount a Parallel Interface Sensor Data Unit to enable using other signals and increase the number of sig- nals that you can use with parallel communications.
  • Page 38: Setting The Measurement Trigger

    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 Outputting Data with the Sensor's Standard Parallel Connection FQ2-S/CH User’s Manual...
  • Page 39 Sample Ladder Program 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. W0.00 OUT1 When the single measurement command bit (W0.00) turns ON, the TRIG signal is turned TRIG Single BUSY signal...
  • Page 40 Note 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 Color Signal State Description The signals shown at the left are used. Gray Refer to the following informa- tion for signal wiring.
  • Page 41 Sample Ladder Program 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. W0.00 When the continuous measurement command bit (W0.00) turns ON, the command #0000 parameter for continuous measurements Continuous...
  • Page 42: Setting The Outputs

    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...
  • Page 43 Black OUT0 (OR2) Outputs the judgement for OR2. Section 2 Installation and Connections Orange OUT1 (OR5) Outputs the judgement for in Sensor FQ2-S/CH Series OR5. User's Manual (Cat. No. Z337) Light OUT2 (OR14) Outputs the judgement for blue OR14. 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.
  • Page 44 Timing Chart Output OR0 to OR31 signals are held until the next judgement output. ON for 1 ms min. TRIG signal BUSY signal ON while measurements are being processed (depends on BUSY output conditions) Example: Turned ON when individual OR0 signal judgement is NG.
  • Page 45  One-shot output The status of the output OR signal is turned OFF after a specified time has passed. (Setting range: 0 to 1,000 ON for 1 ms min. TRIG signal BUSY signal ON while measurements are being processed (depends on BUSY output conditions) OR signal Overall judgement...
  • Page 46 Item Description After the measurement results are finalized, if the judgement output ON condition One-shot output is met, the OR signal is turned ON for the one-shot output time. It is then turned Output mode OFF once the specified time has expired. Level output (default) The judgement is output after measurement results are finalized and the ON/OFF status of the OR signal is held until it is changed for the next measurement result.
  • Page 47 Adjusting the End Timing of the BUSY Signal The end timing of the BUSY signal can be changed. [In/Out] − [I/O setting] − [I/O setting] − [Output] Tab Page − [BUSY output] Item Description Measurement (default) The BUSY signal turns OFF when the measurement is completed. Data logging The BUSY signal turns OFF when data logging is completed.
  • Page 48: Controlling The Sensor From An External Device

    Changing the Types of Commands That Can Be Used You can select the types of commands used in IN0 to IN5. Settings [In/Out] − [I/O setting] − [I/O setting] − [Input] − [Input mode] Item Description Standard mode (default) IN0 to IN4 are only used for line process changes. A maximum of 32 scenes are selectable.
  • Page 49 Example: To change to scene 1 in Scene number Scene number in Sensor Standard Mode, specify (0 to 31) (0 to 15) as follows: FQ2-S/CH Series White User's Manual Purple (Cat. No. Z337) (IN4 IN0) Yellow Trigger to change the scene...
  • Page 50 Sample Ladder Program 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. W0.00 When the scene change bit (W0.00) turns ON, the scene number is input to IN0 to IN3 and #1100 IN4 is turned ON.
  • Page 51 Green for signal wiring. Section 2 Installation and White Connections Purple in Sensor FQ2-S/CH Series User's Manual Yellow Command input for registering the measure- (Cat. No. Z337) ment reference again Orange OUT1 (BUSY) Processing in progress (default) Timing Chart 1Turn OFF IN0 to IN4 and turn ON IN3.
  • Page 52 Sample Ladder Program This sample program is used to input IN5 to re-register a model. W0.00 When the mode re-register bit (W0.00) turns ON, IN3 is turned ON. #800 Model re-register bit W0.00 TMHH 0000 Model If the BUSY signal is OFF 5 ms after IN3 turns re-register bit ON, the command input for registering the mode again (IN5) is turned ON.
  • Page 53 Refer following Green information for signal wiring. Section 2 Installation White and Connections Purple in Sensor FQ2-S/CH Series Yellow Command input for clearing errors User's Manual Orange OUT1 (BUSY) Processing in progress (default) (Cat. No. Z337) Light blue OUT2 (ERROR)
  • Page 54 Green information for signal wiring. Section 2 Installation White and Connections Purple in Sensor FQ2-S/CH Series Yellow Command input for clearing measure- User's Manual ment values (Cat. No. Z337) Orange OUT1 (BUSY) Processing in progress (default) Timing Chart 1Turn ON IN0 and IN2 and turn OFF IN1, IN3 and IN4.
  • Page 55 Command parameters for trigger retry (this command) Section 2 Installation White and Connections Purple in Sensor FQ2-S/CH Series Yellow Command input for trigger retry (this com- User's Manual mand) (Cat. No. Z337) Orange OUT1 (BUSY) Busy...
  • Page 56 Sample Ladder Program This sample ladder program executes trigger retry when the I/O input mode is Expanded Mode. Trigger retry is executed at W0.00 ON. W0.00 When trigger retry execution (W0.00) #0C00 is turned ON, the command Trigger retry execution parameter for sensor restart (001100) is output to Q:1 (IN0 to IN4).
  • Page 57 Green information for signal wiring. Command parameters for Sensor reset Section 2 Installation White and Connections Purple in Sensor FQ2-S/CH Series Yellow Command input for Sensor reset User's Manual Orange OUT1 (BUSY) Busy (default) (Cat. No. Z337) 1IN0, IN2 and IN4 are turned OFF, IN1 and IN3 are turned ON.
  • Page 58 Sample Ladder Program This sample program inputs IN5 to restart the Sensor. Trigger retry is executed at W0.00 ON. W0.00 When Sensor restart execution (W0.00) is turned ON, the command parameter for #A00 Sensor restart Sensor restart (001010) is output to Q:1 (IN0 to 4).
  • Page 59 Command parameters for saving data to the Sensor Section 2 Installation White and Connections Purple in Sensor FQ2-S/CH Series Yellow Command input for saving data to the User's Manual Sensor (Cat. No. Z337) Orange OUT1 (BUSY)
  • Page 60 Refer to the following information Green for signal wiring. Command parameter for external teaching Section 2 Installation and White Connections Purple in Sensor FQ2-S/CH Series User's Manual Yellow Command input for external teaching (Cat. No. Z337) Orange OUT1 (BUSY) Processing in progress (default)
  • Page 61 Sample Ladder Program This sample program is used to input IN5 to external teaching. W0.00 When the external teaching bit (W0.00) turns ON, IN0 and IN3 are turned ON. #900 External teaching bit W0.00 TMHH 0000 External teaching bit If the BUSY signal is OFF 5 ms after IN0 and IN3 turn ON, the command input for external teaching (IN5) is turned ON T0000...
  • Page 62: Parallel Interface Sensor Data Unit

    2-2 Controlling Operation and Outputting Data with a Parallel Interface Sensor Data Unit Overview If you mount a Parallel Interface Sensor Data Unit, in addition to outputting OR judgement results, you can also 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).
  • Page 63: Setting Output Data

    • You can select whether to use the judgement result of one of the calculations (0 through 31) as the overall judge- ment. 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.
  • 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.
  • Page 65 You can specify whether to reflect the judgement result of a parallel judgement output in the overall judgement. (The default is to reflect them.) [In/Out] − [I/O setting] − [Output data set] − [Par. Jdg Output] − [Details] Tab Page − [Output parameter] −...
  • Page 66 [In/Out] − [I/O setting] − [Output data set] − [Parallel Data Output Setting] − [Details] Tab Page − [Output parameter] − [Data output]  Output Specifications • Only the integer portions of numbers are output. All digits before the decimal point are rounded off. •...
  • Page 67  Timing Chart The following timing chart shows the data output timing for parallel judgement outputs. Run Mode entered. Setup Mode entered. RUN signal ON for 1 ms min. TRIG signal The FQ2 starts measurements when it detects the rising edge (OFF to ON transition) of the TRIG signal.
  • Page 68: Aligning The Data Output Timing With The External Device

    Aligning the Data Output Timing with the External Device You can use one of the following data output methods to align the timing of data output with an external device. • Aligning with the GATE Signal Status (No Handshaking): p. 66 •...
  • Page 69 Measurement done (BUSY output OFF) External device (1) Measurement processing and results output (OR and D0 to D15) (2) GATE signal 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 GATE signal will remain ON.
  • Page 70 Important 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.
  • Page 71 Note The ERROR signal will turn ON if the input command is not executed normally. Set at least one data output for parallel judgement output and then read the OR signal when the GATE signal turns 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.
  • Page 72 Run Mode entered. Setup Mode entered. RUN signal ON for 1 ms min. TRIG signal ON while measurements are being processed (depends on BUSY output conditions) BUSY signal Overall judgement (Output when measurements have been OR signal completed regardless of the DSA signal.) D0 to D15 Data 1 Data 0...
  • Page 73 Offsetting the Timing of Outputting Measurement Results 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.
  • Page 74  Timing Chart Operation When [Number of Delay] Is Set to 2 Run Mode entered. Setup Mode entered. RUN signal ON for 1 ms min. TRIG signal ON while measurements are being processed (depends on BUSY output conditions) BUSY signal Overall judgement Overall judgement Overall judgement...
  • Page 75: Changing The Settings Of The I/O Signals

    Changing the Settings of the I/O Signals Changing the Settings of the Output Signals  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.
  • Page 76  Setting the Output Time of the ACK Signal 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] Important The ACK signal is not output for normal completion of continuous measurement commands. ...
  • Page 77: Controlling Operation From An External Device

    Controlling Operation from an External Device The following Sensor functions can be controlled with command inputs from an external device without connecting the Touch Finder. Operation Description Reference Switching the scene This command changes the scene when the line process changes. p.
  • Page 78 Timing Chart Run Mode entered. Setup Mode entered. RUN signal IN0 to IN6 0100001 (Changes to scene 1.) signals ON for 1 ms min. IN7 signal Allow 5 ms min. and then turn ON IN7. Command execution BUSY signal ACK signal ACK output time Output Signals Signal...
  • Page 79 Timing Chart Run Mode entered. Setup Mode entered. RUN signal IN0 to IN6 1000000 signals ON for 1 ms min. IN7 signal Allow 5 ms min. and then turn ON IN7. BUSY signal ACK signal ACK output time Output Signals Signal Function This signal is ON while the Sensor is in Run Mode.
  • Page 80 Timing Chart Run Mode entered. Setup Mode entered. RUN signal ON for 1 ms min. TRIG signal TRIG is input. BUSY signal Measurements executed. OR signal D signals Data GATE signal GATE ON delay Output time ERROR signal IN0 to IN6 1000001 signals Allow 5 ms min.
  • Page 81 Input Signals Signal Function Turn ON. IN1 to IN5 Turn OFF. Turn ON. This signal is the trigger for clearing an error. Set the IN0 to IN6 signals, wait for at least 5 ms, and then turn ON the IN7 signal. Re-registering the Model and Reference Color This command is input from an external devices, such as a PLC, to re-register the models and reference colors for registered inspection items based on the image that was just input.
  • Page 82 Output Signals Signal Function This signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode. BUSY This signal is ON during re-registration of the model and reference color. When the command has been completed normally, this signal is turned ON for the time that is set for the ACK output time.
  • Page 83 Output Signals Signal Function This signal is ON while the Sensor is in Run Mode. It will be OFF in Setup Mode. BUSY This signal is ON while teaching is being executed. When the command has been completed normally, this signal is turned ON for the time that is set for the ACK output time.
  • Page 84 Output Signals Signal Function This 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 the OR and D signals. However, do not clear the OR and D signals while the BUSY signal is ON. The command will not be executed correctly.
  • Page 85 Timing Chart Run Mode entered. Setup Mode entered. RUN signal IN0 to IN6 1010000 signals ON for 1 ms min. IN7 signal Allow 5 ms min. and then turn ON IN7. BUSY signal Command execution ACK signal ACK output time Output Signals Signal Function...
  • Page 86 Retrying Inspection by External Signal (Trigger Retry) Measurement is repeated until all inspection items have been successfully scanned. Retry inspection ends when any one of the following conditions is satisfied: The scanning result of all inspection items is OK. Trigger retry (this command) turns OFF. The timeout time is exceeded.
  • Page 87  When inspection is NG 1Set the IN0 to IN6 signals. Run Mode entered. Setup Mode entered. 2When IN5 is turned OFF > ON with the RUN signal BUSY signal OFF, trigger retry inspection starts. IN0 to IN6 signals 0001100 3When retry inspection starts, the BUSY IN5 ON after at least 5 ms signal turns ON.
  • Page 88 MEMO 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-1 Controlling Operation and Outputting Data with EtherNet/IP Communications......... . .88 3-2 Controlling Operation and Outputting Data with PLC Link Communications.
  • Page 90: Controlling Operation And Outputting Data With Ethernet/Ip Communications

    3-1 Controlling Operation and Outputting Data with EtherNet/IP Communications FQ2-S1 FQ2-S2 FQ2-S3 FQ2-S4 FQ2-CH 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.
  • Page 91 Data Exchange with EtherNet/IP Data is exchanged cyclically between Ethernet devices on the EtherNet/IP network using tag data links as shown below. Originator Target Vision Sensor Connection Output tag set name: Input tag set name: A Connection from Input_101 FQ2 to PLC Tag: D0 Tag: Input_101 Connection...
  • Page 92: Fq2 Communications For Ethernet/Ip Connections

    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 settings).
  • Page 93 Types of Communications Areas 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 area This is the area to which you write control commands for the Sensor to execute.
  • Page 94: Setting Up Ethernet/Ip Communications

    Set the IP address and subnet mask according to the network where the external devices, such as PLCs, are connected. Note If you connect OMRON CS/CJ-series PLCs to the Ethernet, the following default IP addresses are assigned to the PLCs. • IP address: 192.168.250.node_address Important To use EtherNet/IP communications, do not automatically assign an IP address to the Sensor.
  • Page 95 Parameter Description Setting range Output handshake Set whether to synchronize with the PLC when • Yes data is output. • No No: Measurement results are output without (default: Yes) synchronizing with the PLC. Data Output after Measurements When Handshaking Is Disabled: .
  • Page 96 Parameter Description Setting range Refreshing task Set the communications cycle for cyclic tag 1 to 10,000 ms (default:10 ms) period data link communications for the Sensor. Set the same value as you set for the requested packet interval (RPI) on the Network Configura- tor.
  • Page 97: Tag Data Link Setting Methods

    • 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.
  • Page 98  Settings in the FQ2 (Device Parameter Settings) Right-click the FQ2 in the network on the Network Configurator and select [Parameter] − [Edit]. The Edit Device Parameters Dialog Box will be displayed. Make the required settings. Parameter name Value Setting range 001 Input Size The total size of response area and output 48 to 272...
  • Page 99: Setting The Data To Output Automatically After Measurements

    Important • If I/O memory addresses are specified for the communications areas, the information in the communications areas will be cleared when the operating mode of the PLC changes unless addresses in the CIO Area, which are main- tained, are specified. •...
  • 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.
  • Page 101 Set the following items on the display to set expres- sions. Item Description Expression Register the expression to use to output multiple data. Examples: LPR (0, 3, I0.X, I0.Y) LPC (0, I0.C, I0.X, I0.Y) Const. Used to insert numbers and symbols into the expression. Data Used to select the inspection items for which to output data and insert the parameters to output into the expression.
  • Page 102 Output Results The expression that is registered for data 0 assigns the data for 16 items (64 bytes) in the output area as shown below. Output area data Assigned data Output data 0 (4 bytes) I0.X[0] (Position X 1st point) Output data 1 (4 bytes) I0.Y[0] (Position Y 1st point) Output data 2 (4 bytes)
  • Page 103 You can set whether to output the character string that results from reading. Outputting the character string is possible for the following inspection results. • OCR Reading and Verifying Character Strings in FQ2-S/CH Series User's Manual (Cat. No. Z337) • Bar code Reading Bar Codes in FQ2-S/CH Series User's Manual (Cat. No. Z337) •...
  • Page 104: Memory Assignments And Commands

    Memory Assignments and Commands Memory Assignments This section describes the assignments of the command area for the input connection to the Sensor and the response and output areas for the output connection to the PLC.  Input Connection to Sensor (PLC Originator to Sensor Target) •...
  • Page 105 Signal Signal name Function Application method Command code Command code This I/O port stores the command code. Command/ response com- Parameters 1 to 3 Command param- These I/O ports store the command parameters. munications eters  Output Connection to PLC (Sensor Originator to PLC Target) •...
  • Page 106 Signal Signal name Function Application method GATE Data Output Com- This signal turns ON when the Sensor finishes outputting Data output pleted data. after measure- ments If [Output handshake] is set to [Yes], this signal automati- cally turns OFF when the Data Output Request Bit (DSA) signal from the PLC turns OFF.
  • Page 107 Signal Signal name Function Application DATA0-63 Output data 0 to 63 These I/O ports output the output data that is Command/ specified for the data output method. response commu- The data that can be output is determined by nications the set value of the Output data size setting as follows: 32 bytes: Output data 0 to 7 64 bytes: Output data 0 to 15...
  • Page 108 • Data Type to Access the Command Area Name of data type: S_EIPOutput Type of derivative data type: Structure Name of data type Data type S_EIPOutput STRUCT ControlFlag U_EIPFlag The data type that was defined above (1) CommandCode DWORD 32-bit bit string data CommandParam1 UDINT 32-bit integer data...
  • Page 109 • Assignment Example for Variable Data Type That Matches the Response and Output Areas Response Area Bits − − − − − − − − − − RUN OR READY BUSY FLG Status − − − − − − − −...
  • Page 110 • Command Area Signal name Variable name EIPOutput.ControlFlag.F[0] TRIG EIPOutput.ControlFlag.F[1] ERCLR EIPOutput.ControlFlag.F[15] EIPOutput.ControlFlag.F[16] Command code EIPOutput.CommandCode Command parameter 1 EIPOutput.CommandParam1 Command parameter 2 EIPOutput.CommandParam2 Command parameter 3 EIPOutput.CommandParam3 • Response Area Signal name Variable name EIPInput.StatusFlag.F[0] BUSY EIPInput.StatusFlag.F[1] READY EIPInput.StatusFlag.F[2] EIPInput.StatusFlag.F[3] EIPInput.StatusFlag.F[4] EIPInput.StatusFlag.F[15]...
  • Page 111  Accessing Communications Areas by Specifying I/O Memory Addresses AT specifications can be set for variables to individually specify the I/O memory addresses that are assigned in the communications areas. Setting Tag Sets (Network Configurator) Specify the tag names in the PLC directly by using the I/O memory addresses that are assigned in the communications areas.
  • Page 112 Commands (EtherNet/IP) This section describes the EtherNet/IP commands.  Execution Commands Command code in Command name Function Reference command area (hex) 1020 0010 Start Continuous Measure- Starts continuous measurements. p.215 ments 1030 0010 End Continuous Measure- Ends continuous measurements. p.216 ments 2010 0010...
  • Page 113 Important After you execute the Reset command (0010F010 hex) for the Sensor, turn OFF the EXE signal before the Sensor restarts. If you leave the EXE signal ON, the Sensor will restart repeatedly.  Commands to Get Status Command code in Command name Function Reference...
  • Page 114 Command code in Command name Function Reference command area (hex) 5000 0020 Get Latest Error Information Acquires the Sensor's most recent error p.239 code. 7010 0020 Acquire Communication Input Acquires the input status (allowed/prohib- p.240 Status ited) for the communications protocol set with the Set Communication Input Status com- mand.
  • Page 115 Command code in Command name Function Reference command area (hex) 8030 0030 Batch Set D Terminal Status Batch sets the ON/OFF status for the D termi- p.256 nals (D0 to D15). F000 0030 Set Execution Mode Sets the FQ2 execution status (execution p.257 mode).
  • Page 116 Command code in Command name Function Reference command area (hex) 4010 0070 Save All Image Data Saves all image data saved in the Sensor’s p.271 memory by the logging function to the SD card inserted in the Touch Finder as ifz data. 4020 0070 Save Latest Input Image Data Saves the latest input image to the SD card...
  • Page 117: Timing Chart For Ethernet/Ip Communications

    Timing Chart for EtherNet/IP Communications  Performing Measurements with the TRIG Signal Execute Measure- Command ment (TRIG) signal Area Command Execution Active (BUSY) signal Trigger Input Ready Response (READY) signal Area Overall judgement (OR) (2) (3) (1) Measurement starts when the TRIG signal turns ON while the BUSY signal is OFF. (2) The BUSY signal turns ON when measurement begins.
  • Page 118  Execution of Control Commands Other Than Continuous Measurements with the Control Command Execu- tion Bit (EXE) Signal Command code Command parameters Command Area Control Command Execution Bit (EXE) signal Command code Command Execution Active Control Command (BUSY) signal Execution Active Trigger Input Ready (READY) signal Response...
  • Page 119  Execution of Control Commands for Continuous Measurements with the Control Command Execution Bit (EXE) Signal Command code Command parameters Command Area Control Command Execution Bit (EXE) signal Command code Command Continuous measure- Execution Active ments executed. (BUSY) signal Trigger Input Ready (READY) signal Response...
  • Page 120 Note During execution of continuous measurements, the BUSY signal remains ON. The Sensor will acknowledge the EXE signal only after the End Continuous Measurements command is executed.  Data Output after Measurements When Handshaking Is Enabled Second data output First data output Data Output Request Bit (DSA) Command...
  • Page 121 Important Set the parameters so that the following conditions are met for the data output period and time. • Set the timeout time in the connection settings between the PLC and Sensor so that it is longer than the measure- ment processing time of the Sensor.
  • Page 122: Sample Ladder Programming

    Sample Ladder Programming  Command/Response Communications The following sample program is used to clear measurement values. The Clear Measurement Values command (lower bytes: #2010, upper bytes: #0010) is sent to the Sensor. First RUN Period Flag Sets the lower word of the Clear Measurement Values command.
  • Page 123: Message Communications

    Communicating with the Sensor Controller with EtherNet/IP Message Communications Message communications are used when communicating with a PLC that does not support tag data link communications or when using functions, such as character string output, that are not supported in tag data link communications.
  • Page 124: Controlling Operation And Outputting Data With Plc Link Communications

    3-2 Controlling Operation and Outputting Data with PLC Link Communications This section explains how to configure the communication settings that are required for communication between the sensor and external devices by PLC Link. Communication specifications (PLC I/O memory area used for PLC Link communication and types of communication commands) are also described, and a communication timing chart is provided.
  • Page 125 PLC (master) Vision Sensor (slave) Command area Command The following control commands are The control commands written to the written to the Vision Sensor. Command Area are executed. Control signals ● Command code ● Command parameters ● Command/ response Execution communi- Response area cations...
  • Page 126: Setting Up Plc Link Communications

    Set the IP address and subnet mask according to the network where the external devices, such as PLCs, are connected. Note If you connect OMRON CS/CJ-series PLCs to the Ethernet, the following default IP addresses are assigned to the PLCs. • IP address: 192.168.250.node_address Important •...
  • Page 127 Item Description Setting range Command (com- If PLC Link (SYSMAC) is selected: Area type Select the area for the mand area) CIO Area (CIO) Command Area in the Work Area (WR) PLC. Holding Bit Area (HR) Auxiliary Bit Area (AR) DM Area (DM) EM Area (EM0 to EMC) Default: CIO Area (CIO)
  • Page 128 • Changes to settings are not applied until the Sensor is restarted. Therefore, save the settings and then restart the Sensor Section 5 Testing and Saving Settings in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Section 7 Convenient Functions in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) •...
  • Page 129: Setting The Data To Output Automatically After Measurements

    Setting the Data to Output Automatically after Measurements You can set in advance the data to output automatically after measurements. (You can set up to 32 data items.) 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.
  • Page 130 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.
  • Page 131 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. •...
  • Page 132  Expression Setting Example This example registers an expression to output the following inspection results for data 0. Inspection item: 0 Search Parameters to output: Position X, Position Y, Reference SX, and Reference SY Multi-point output setting: Multi-point output Check Box selected, Count = 4 LPR(0,I0.C I0.X,I0.Y,I0.SX,I0.SY) Function...
  • Page 133 You can set whether to output the character string that results from reading. Outputting the character string is possible for the following inspection results. • OCR Reading and Verifying Character Strings in FQ2-S/CH Series User's Manual (Cat. No. Z337) • Bar code Reading Bar Codes in FQ2-S/CH Series User's Manual (Cat. No. Z337) •...
  • Page 134 Parameter Setting Description String output ON/OFF OFF (default) Sets whether to output the character string that results from reading. Partial output ON/OFF No (default) Sets whether to specify the range of characters to output. 1 to 128 for OCR Output string setup 1 to 1024 for Bar code Sets the output range.
  • Page 135: Memory Assignments For Plc Link Communications

    Memory Assignments for PLC Link Communications This section describes the assignments for the Command, Response, and Data Output Areas.  Command Area PLC (Master) to Sensor (Slave) First Bits Contents word ERRCLR Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv EXE Control sig- nals (32 Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv DSA bits)
  • Page 136 First Bits Contents word ERR Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv READY BUSY FLG Control signals Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv Resv GATE (32 bits) Command code Com- mand...
  • Page 137 Signal Signal name Function Application Command code Command code This I/O port returns the command code that Command/ was executed. response commu- nications Response code Response code This I/O port contains the response code of the executed command. Response data Response data This I/O port contains the response data of the executed command.
  • Page 138 Command Tables for PLC Link Communications This section describes the commands used in PLC Link communications.  Execution Commands First word of com- Command name Function Reference mand area (hex) 1010 0010 Single Measurement Executes one measurement. p.214 1020 0010 Start Continuous Measure- Starts continuous measurements.
  • Page 139  Commands to Get Status First word of com- Command name Function Reference mand area (hex) 1000 0020 Get Scene Number Acquires the scene number currently being p.226 used.  Commands to Set Status First word of com- Command name Function Reference mand area (hex)
  • Page 140 First word of com- Command name Function Reference mand area (hex) 7020 0020 Acquire Communication Out- Acquires the output status (allowed/prohib- p.241 put Status ited) for the communications protocol set with the Set Communication Output Status com- mand. 8010 0020 Acquire Terminal Status Acquires the ON/OFF status of the input sig- p.242...
  • Page 141  Load Setting Data Commands First word of com- Command name Function Reference mand area (hex) 1000 0060 Load Scene Data Loads scene data that is stored on the SD p.259 card inserted in the Touch Finder. 2000 0060 Load All Scene Data Loads all scene data that is stored on the SD p.260 card inserted in the Touch Finder.
  • Page 142  Save Setting Data Commands First word of com- Command name Function Reference mand area (hex) 1000 0070 Save Scene Data Saves scene data to the SD card inserted in p.267 the Touch Finder as a file. 2000 0070 Save All Scene Data Saves all scene data as a file to the SD card p.268 inserted in the Touch Finder.
  • Page 143: Timing Chart For Plc Link Communications

    Timing Chart for PLC Link Communications  Command/Response Communications 1. The command code and command parameters are set from the PLC. Command code 2.The PLC turns ON the Control Command Execution Bit (EXE) signal. The execution command is sent to the Vision Sensor.
  • Page 144  Data Output after Measurements When Handshaking Is Enabled 1. When the PLC is ready to receive output data, the Data Output Request First data output Bit (DSA) is turned ON from the PLC and a request is made to the Vision Sensor to output the data.
  • Page 145: Sample Ladder Programming

    Sample Ladder Programming  Command/Response Communications The following sample program is used to perform single measurements. The single measurements command (lower bytes: #1010, upper bytes: #0010) is sent to the Sensor. First RUN Period Flag Sets the lower word of the measurement command.
  • Page 146: Outputting Data And Controlling Operation Through Profinet

    3-3 Outputting Data and Controlling Operation through PROFINET FQ2-S1 FQ2-S2 FQ2-S3 FQ2-S4 FQ2-CH Overview of PROFINET PROFINET is a network for industrial use that applies industrial Ethernet (100 Mbps, Full duplex) to PROFIBUS PROFINET is an open standard that is managed by PI (PROFIBUS and PROFINET International), and is used in a variety of types of industrial equipment.
  • Page 147 PROFINET IO Communication Specifications of PROFINET IO The communication specifications of PROFINET IO are described below. Communication Specifica- Type Details Support on FQ2 tions RT (real-time) communica- Uses standard Ethernet hardware and Supported tion achieves the same level of perfor- mance as the existing Fieldbus.
  • Page 148 I/O Devices I/O devices consist of DAPs and I/O modules. The functions and properties of these devices are described in a GSD file. • DAP (Device Access Point) : This is an Ethernet access point, and is used by means of a communica- tion program.
  • Page 149 I/O controller I/O device Vision Sensor Cyclic Output Data External device (control output, Input Area Communication (PLC FQ2) measurement results, etc.) cycle Output Area External device Cyclic Input (control input, (PLC FQ2) Communication Data commands, etc.) cycle Ethernet (PROFINET) CR is classified into IO data CR, record data CR and alarm CR. Within the IO data CR, data communication is performed for each refreshing task period.
  • Page 150: Fq2 Communications For Profinet Connections

    FQ2 Communications for PROFINET Connections You can use PROFINET IO data CR to communicate between the PLC and the Sensor to perform control via command/response communications or to output data after measurements. The FQ2 complies with PROFINET conformance class A. To connect to external devices and communicate using PROFINET, configure the PROFINET IO data CR settings with the Engineering Tool.
  • Page 151: Setting Up Profinet Communications

    Setting Up PROFINET Communications 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. (Setup Mode) − [Sensor settings] − [Network] − [Ethernet] − [IP address setting] Press [Fixed].
  • Page 152 Parameter Description Setting range Output handshake Set whether to synchronize with the external • Yes device when data is output. • No No: Measurement results are output without (default: Yes) synchronizing with the external device. Data Output after Measurements When Handshaking Is Disabled: p. 118 Yes: Measurement results are output while syn- chronizing with the external device.
  • Page 153 Parameter Description Setting range Timeout This parameter is displayed and can be set only 0.1 to 120.0 s (default: 10.0 s) when [Output handshake] is set to [Yes]. A timeout error will occur if there is no response from the external device within the time that is set. •...
  • Page 154: Communication Settings Procedure

    Communication Settings Procedure To use PROFINET communication, the settings below must be configured. Configure network settings of Sensor Set on the FQ2.  Setting Up PROFINET Communications: p.149 Configure default PROFINET settings • Fieldbus settings  Configure IO supervisor (computer) settings •...
  • Page 155: Setting The Data To Output Automatically After Measurements

    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.
  • Page 156 Press [Position X X]. If 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 inspec- tion results. To register something to data 1 and higher, repeat this process. The settings will be enabled after you restart the Sensor.
  • Page 157 Item Description Math. Either of the following two functions can be inserted. • LPR function (order of the measurement data) The measurement data is output in order. Format: LPR(start_number,number_of_data,data_1, data_2,...data_5) You can omit data 2 to data 5. • LPC function (order of the detection points) Data is output for each detected measurement point.
  • Page 158 You can set whether to output the character string that results from reading. Outputting the character string is possible for the following inspection results. • OCR Reading and Verifying Character Strings in FQ2-S/CH Series User's Manual (Cat. No. Z337) • Bar code Reading Bar Codes in FQ2-S/CH Series User's Manual (Cat. No. Z337) •...
  • Page 159: Memory Assignments And Commands

    Parameter Setting Description NG String output on/off Yes (default) Sets whether to output an NG string. If [Yes] is selected, [Error string] setting for the Inspection Item is outputted from the Sensor when scanning is fail. [Inspection item] - [Modify] - [Output parameter] - [Error string] Note •...
  • Page 160 Output Area Bits Description (command area) Command parameter 2 Command parameter 2 (32 bits) Command parameter 3 Command parameter 3 (32 bits) Signal Signal name Function Application method Control Command Turn ON this signal from the external device to send a Command/ Execution Bit control command for the Sensor to execute.
  • Page 161 Input Area Bits Description (response area) Command code Command code (32 bits) Response code Response code (32 bits) Response data Response data (32 bits) Signal Signal name Function Application method Control Command This signal turns ON when the Sensor completes execu- Command/ Completed tion of the control command.
  • Page 162 Signal Signal name Function Application method GATE Data Output Com- This signal turns ON when the Sensor finishes outputting Data output pleted data. after measure- ments If [Output handshake] is set to [Yes], this signal automati- cally turns OFF when the Data Output Request Bit (DSA) signal from the external device turns OFF.
  • Page 163 Input Area Bits Description (Output Area) +140 Output data 32 Output data 31 (32 bits) +141 +142 +143 · · · · · · · · · +268 Output data 64 Output data 63 (32 bits) +269 +270 +271 Signal Signal name Function Application...
  • Page 164 Command code in Command name Function Reference command area (hex) 00102020 Clear Data Output Buffer Clears all data in the data output buffer of the p.217 Sensor. Clears the statistical data (such as the num- ber of measurements, the number of NG overall judgments, the NG rate, and other 00102060 Clear Statistical Data...
  • Page 165  Commands to Get Status Command code in Command name Function Reference command area (hex) 00201000 Get Scene Number Acquires the scene number currently being p.226 used.  Commands to Set Status Command code in Command name Function Reference command area (hex) 00301000 Select Scene Changes the scene number to be used.
  • Page 166 Command code in Command name Function Reference command area (hex) Acquires the output status (allowed/prohib- 00207020 Acquire Communication Out- ited) for the communications protocol set with p.241 put Status the Set Communication Output Status com- mand. 00208010 Acquire Terminal Status Acquires the ON/OFF status of the input sig- p.242 nal for the specified parallel I/O terminal.
  • Page 167  Load Setting Data Commands Command code in Command name Function Reference command area (hex) 00601000 Load Scene Data Loads scene data that is stored on the SD p.259 card inserted in the Touch Finder. 00602000 Load All Scene Data Loads all scene data that is stored on the SD p.260 card inserted in the Touch Finder.
  • Page 168  Save Setting Data Commands Command code in Command name Function Reference command area (hex) 00701000 Save Scene Data This command saves scene data to the SD p.267 card inserted in the Touch Finder as a file. 00702000 Save All Scene Data This command saves all scene data as a file p.268 to the SD card inserted in the Touch Finder.
  • Page 169: Timing Chart For Profinet Communications

    Timing Chart for PROFINET Communications  Performing Measurements with the TRIG Signal Command Execute Measure- ment (TRIG) signal Area Command Execution Active (BUSY) signal Trigger Input Ready Response (READY) signal Area Overall judgement (OR) (2)(3) (1) Measurement starts when the TRIG signal turns ON while the BUSY signal is OFF. (2) The BUSY signal turns ON when measurement begins.
  • Page 170  Execution of Control Commands Other Than Continuous Measurements with the Control Command Execution Bit (EXE) Signal Command code Command parameters Command Area Control Command Execution Bit (EXE) signal Command code Command Control Command Execution Active Execution Active (BUSY) signal Response Trigger Input Ready (READY) signal...
  • Page 171  Execution of Control Commands for Continuous Measurements with the Control Command Execution Bit (EXE) Signal Command code Command parameters Command Area Control Command Execution Bit (EXE) signal Command code Command Continuous measure- Execution Active ments executed. (BUSY) signal Trigger Input Ready (READY) signal Response Area...
  • Page 172 Note During execution of continuous measurements, the BUSY signal remains ON. The Sensor will acknowledge the EXE signal only after the End Continuous Measurements command is executed.  Data Output after Measurements When Handshaking Is Enabled Second data output First data output Data Output Request Bit (DSA) Command...
  • Page 173: Sample Ladder Programming

    Important Set the parameters so that the following conditions are met for the data output period and time. • Set the data output period so that it is longer that the GATE signal ON period and shorter than the measurement interval of the Sensor.
  • Page 174 Note While the trigger input (TRIG signal) for parallel measurements is ON, the PROFINET BUSY signal will also be ON. Therefore, no PROFINET commands will be executed. Any PROFINET commands will be executed after execution of the parallel commands. You can also use a PROFINET to perform measurements and output data with the paral- lel I/O measurement trigger signal (TRIG).
  • Page 175: Control And Output In No-Protocol (Tcp) / No-Protocol (Udp)

    Set the IP address and subnet mask according to the network where the external devices, such as PLCs, are connected. Note If you connect OMRON CS/CJ-series PLCs to the Ethernet, the following default IP addresses are assigned to the PLCs. • IP address: 192.168.250.node_address FQ2-S/CH User’s Manual...
  • Page 176 Initial Settings for No-protocol Communications You must set the communications method of the destination external device to perform no-protocol communications. [Sensor settings] − [Data output] − [No-protocol data] Press [No protocol (TCP)] or [No protocol (UDP)]. If you selected [No protocol (TCP)], select [TCP serv- er] or [TCP client] for [Connection mode] and then press [Back].
  • Page 177: Setting The Data To Output Automatically After Measurements

    Setting the Data to Output Automatically after Measurements You can set the data to output automatically after measurements. (You can set up to 32 data items.) Data That Can Be Output • Data Output On the FQ2, data output after measurement can be assigned to Data 0 to Data 31 in the output data settings. The data of items assigned in the output data settings are output in units of 4 bytes per item.
  • Page 178 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.
  • Page 179 Set the following items on the display to set expres- sions. Item Description Register the expression to use to output multiple data. Examples: Expression LPR (0, 3, I0.X, I0.Y) LPC (0, I0.C, I0.X, I0.Y) Const. Used to insert numbers and symbols into the expression. Used to select the inspection items for which to output data and insert the parameters to output into the expression.
  • Page 180 Output order Assigned data I0.Y[1] (Position Y 2nd point) I0.SX[1] (Reference SX 2nd point) I0.SY[1] (Reference SY 2nd point) I0.X[2] (Position X 3rd point) I0.Y[2] (Position Y 3rd point) I0.SX[2] (Reference SX 3rd point) I0.SY[2] (Reference SY 3rd point) I0.X[3] (Position X 4th point) I0.Y[3] (Position Y 4th point) I0.SX[3] (Reference SX 4th point) I0.SY[3] (Reference SY 4th point)
  • Page 181 Item Description Setting range Digits of inte- Sets the number of digits in the integer part of 1 to 10 digits the number. Default: 6 digits Digits of dec- Set the number of digits in the integer part. 0 to 4 digits imal Default: 4 digits −...
  • Page 182 Note Data that is output after measurement is output until the last data even after the measurement is finished. Data out- put is not interrupted midway. • When Output Format Is Binary Set the numerical expression. Select either fixed decimal or floating-point decimal. •...
  • Page 183 You can set whether to output the character string that results from reading. Outputting the character string is possible for the following inspection results. • OCR Reading and Verifying Character Strings in FQ2-S/CH Series User's Manual (Cat. No. Z337) • Bar code Reading Bar Codes in FQ2-S/CH Series User's Manual (Cat. No. Z337) •...
  • Page 184 Controlling the Sensor from an External Device (Procedure for No-protocol Command/Response Communications) Command Format This section describes the command format for no-protocol communications. Commands defined in the command list can be used. Set commands and parameters in ASCII. If the command has an argument parameter, set the parameter after inserting a space (0x20). If it has multiple parameters, insert a space before each parameter.
  • Page 185 Format of no-protocol (UDP) commands Delimiters are not necessary in commands used in no-protocol (UDP) communication. Delimiters are also not used in responses. In cases such as a Get Scene Number command where the acquired data is followed by an OK response, the acquired data and OK are sent in separate packets. Command List (No-protocol (TCP), No-protocol (UDP)) The following table lists the no-protocol commands.
  • Page 186 Type of command Command Abbreviation Function Reference Commands to get status SCENE Acquires the scene number currently p.294 being used. Commands to set status SCENE Changes the scene number to be p.295 used. CAMDATA Acquires the value of the specified p.296 camera parameter.
  • Page 187 Type of command Command Abbreviation Function Reference PARAPORT- Acquires the input signal ON/OFF COND status for the specified parallel I/O ter- p.316 minal. POSITIONDATA Acquires data from a position com- p.318 pensation item or filter item. REGIMAGE Loads a registered image saved to p.319 the SD card or PC Tool as the mea- surement image.
  • Page 188 Type of command Command Abbreviation Function Reference SETITEMFIG- Changes the range set as the mea- PARAM SIFP surement region or the model regis- p.332 tration region for an inspection item. Changes the range set as the mea- surement region or the model regis- SETPOSFIG- SPFP tration region for an image adjustment...
  • Page 189 Type of command Command Abbreviation Function Reference Loads calibration data that is stored on the SD card inserted in the Touch CLBLOAD None Finder as the data for the specified p.353 calibration number. Loads all calibration data that is CGRLOAD None stored on the SD card inserted in the p.354...
  • Page 190: Binary Data File Load And Save Commands

    Type of command Command Abbreviation Function Reference LASTIMAGE- Saves the latest input image to the SAVE SD card inserted in the Touch Finder p.366 as ifz data. Saves measurement data saved in LOGDATASAVE the Sensor’s memory by the logging p.367 Save setting data com- function to the SD card inserted in the mands...
  • Page 191 Binary Data File Save Command The flow below is used to save various types of setting files in an external device as data in binary data format. PLC (user-created program) Preparation for check command execution Check command transmission Check command execution (Checks size of binary data to be saved) Review size of storage Judges if binary data...
  • Page 192 Command List (Load/Save Commands for Binary Data Files) A table of load/save commands for binary data files is shown below. Type of command Command Abbreviation Function Reference Before loading scene data in binary data for- PRESCNLOADB None mat, the Sensor checks whether or not it can p.369 receive binary data.
  • Page 193 Type of command Command Abbreviation Function Reference Before scene data in binary data format is output, a check is performed to determine if PRESCNSAVEB None the data can be received by the external p.379 device that will receive the data. SCNSAVEB None This command outputs the scene data in...
  • Page 194 Type of command Command Abbreviation Function Reference Before images saved to the Sensor's mem- ory are output in binary data format, a check PREIMAGESAVEB None is performed to determine if the data can be p.384 received by the external device that will receive the data.
  • Page 195: Controlling Operation And Outputting Data With Fins/Tcp No-Protocol Commands

    Range for Receiving FINS Commands The FQ2 can receive FINS commands that are sent by an OMRON CPU Unit on the same Ethernet network. The FQ2 can send responses to the received commands to the CPU Unit that sent the commands.
  • Page 196: Setting Up Fins/Tcp No-Protocol Communications

    Set the IP address and subnet mask according to the network where the external devices, such as PLCs, are connected. Note If you connect OMRON CS/CJ-series PLCs to the Ethernet, the following default IP addresses are assigned to the PLCs. • IP address: 192.168.250.node_address Controlling Operation and Outputting Data with FINS/TCP No-protocol Commands FQ2-S/CH User’s Manual...
  • Page 197: List Of Fins Commands

    Initial Settings for FINS/TCP No-protocol Communications You must set the communications method of the destination external device to perform no-protocol communications. [Sensor settings] − [Data output] − [No-protocol data] Press [No protocol (FINS/TCP)]. Set [Connection mode] to either [TCP server] or [TCP client].
  • Page 198 Command codes (hex) MRC+SRC com- Sensor command Type of command Function Reference mand code code 280F 00101010 Executes one measurement. p.392 280F 00102010 Clears the measurement values. p.393 280F 00102040 Clears the error output status (error output and p.393 error indicator). 280F 00102060 Clears the statistical data...
  • Page 199 Command codes (hex) MRC+SRC com- Sensor command Type of command Function Reference mand code code 280F 00205000 Acquires the Sensor's most recent error code. p.425 Acquires the input status (allowed/prohibited) 280F 00207010 for the communications protocol set with the p.404 Set Communication Input Status command.
  • Page 200 Command codes (hex) MRC+SRC com- Sensor command Type of command Function Reference mand code code Sets the input status (allowed/prohibited) of the 280F 00307010 communications port for the specified commu- p.411 nications protocol. 280F 00307020 Sets the output status (allowed/prohibited) for p.412 the specified communications protocol.
  • Page 201 Command codes (hex) MRC+SRC com- Sensor command Type of command Function Reference mand code code Saves all image data saved in the Sensor’s 280F 00704010 memory by the logging function to the SD card p.443 inserted in the Touch Finder as ifz data. 280F 00704020 Saves the latest input image to the SD card...
  • Page 202 MEMO Controlling Operation and Outputting Data with FINS/TCP No-protocol Commands FQ2-S/CH User’s Manual for Communications Settings...
  • Page 203: With An Rs-232C Connection

    Controlling Operation and Outputting Data with an RS-232C Connection 4-1 Introduction to RS-232C Connections ......202 4-2 Controlling Operation and Outputting Data with RS-232C No-protocol Communications .
  • Page 204: Introduction To Rs-232C Connections

    Refer to the following sections for the specifications and wiring methods of the RS-232C Interface Sensor Data Unit: Section 2 Installation and Connections in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Note Parallel Input Signals for an RS-232C Interface Sensor Data Unit •...
  • Page 205: Rs-232C No-Protocol Communications

    RS-232C communications parameters. [Sensor settings] − [Data output] − [No-protocol data] Press [Communication type] − [No protocol (RS-232C)]. Set the RS-232C communications parameters. Note If you connect to an OMRON PLC, set the PLC to Host Link com- munications. Item Description Parameter Set the baud rate to use for RS-232C communications.
  • Page 206: Setting The Data To Output Automatically After Measurements

    Item Description Parameter Interval timeout Set the time in seconds to generate a timeout error. 1 to 120 s, 0: Not monitored. (default: 0 s) Total timeout Set the time in seconds to generate a timeout error. 1 to 120 s, 0: Not monitored. (default: 0 s) Setting the Data to Output Automatically after Measurements You can set the data to output automatically after measurements.
  • Page 207 Appendices 5-1 Command Control ........206 5-2 Detailed EtherNet/IP Communications Specifications .
  • Page 208: Command Control

    5-1 Command Control This section describes the commands that are used to control the Sensor Controller from an external device. Parameter Notation Examples for Command Control This section provides examples of binary inputs of parameters and other arguments for command control. Four-byte Data The following example shows the input to change the scene to scene number 5 with the Switch Scene command.
  • Page 209 Command (PLC to Sensor Controller) First word in Hexadeci- Bits Description Command Area mal notation 12 to 15 8 to 11 4 to 7 0 to 3 4000 0100 0000 0000 0000 Command code 0070 0000 0000 0111 0000 0001 0000 0000 0000...
  • Page 210: Command List

    Command List This section lists the commands that you can use with the FQ2 and the communications protocols for which each command is supported. For Ethernet/IP (Message Communication Sensor Object) commands, refer to the Non-protocol (TCP/UDP)'s table column. Execution Commands OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel...
  • Page 211 OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel PLC link EtherNet/ PROFINET No-proto- No-proto- p. 137 p. 161 col (TCP/ col (FINS) p. 46, p. 75 (Tag Data UDP/RS- p. 196 Links) 232C) p. 111 p.
  • Page 212 OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel PLC link EtherNet/ PROFINET No-proto- No-proto- p. 137 p. 163 col (TCP/ col (FINS) p. 46, p. 75 (Tag Data UDP/RS- p. 198 Links) 232C) p. 111 p.
  • Page 213 OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel PLC link EtherNet/ PROFINET No-proto- No-proto- p. 138 p. 164 col (TCP/ col (FINS) p. 46, p. 75 (Tag Data UDP/RS- p. 198 Links) 232C) p. 112 p.
  • Page 214 OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel PLC link EtherNet/ PROFINET No-protocol No-proto- p. 139 p. 165 (TCP/UDP/ col (FINS) p. 46, p. 75 (Tag Data RS-232C) p. 198 Links) p. 113 p. 186, p.
  • Page 215 File Save Commands OK: Applicable command, RST: Command with restricted execution, NA: Non-applicable command Function Parallel PLC link EtherNet/ PROFINET No-protocol No-proto- p. 140 p. 166 (TCP/UDP/ col (FINS) p. 46, p. 75 (Tag Data RS-232C) p. 198 Links) p. 113 p.
  • Page 216: Command Details

    Command Details Details for PLC Link, EtherNet/IP(Tag Data Link) and PROFINET commands Single Measurement This command executes one measurement. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000...
  • Page 217 Start Continuous Measurements This command starts continuous measurements. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0010 0000 Command code 0000 0000 0001 0000 Response (Sensor to PLC)
  • Page 218 End Continuous Measurements This command ends continuous measurements. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0011 0000 Command code 0000 0000 0001 0000 Response (Sensor to PLC)
  • Page 219 Clear Data Output Buffer This command clears all data from the data output buffer of the Sensor. If an error occurs in the PLC after measurement, data will remain in the data output buffer of the Sensor. This command clears the data. The command prevents deviation of the data after an error occurs.
  • Page 220 Clear Statistical Data This command clears the statistical data (such as the number of measurements, the number of NG overall judgments, the NG rate, and other information since the power supply was turned ON) produced by the logging function held by the Sensor. Command (PLC to Sensor) First word of com- Bits...
  • Page 221 Re-register Model (Search, Shape search III, Shape search II, Sensitive search, Color data) This command re-registers the reference values for the registered inspection items based on the previously loaded image. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11...
  • Page 222 Teaching (Filter/Position Compensation Item) This command updates reference data for the specified image adjustment processing item (filter item/position compensation item). For image adjustment processing items that have models, the model and reference data are updated. Command (PLC to Sensor) First word of com- Bits Description mand area...
  • Page 223 Teaching (Inspection Item) This command updates the reference data for the specified inspection item. For inspection items that have models, the model and reference data are updated. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3...
  • Page 224 Re-register Reference Value (Inspection Item) This command re-registers the reference values for the specified inspection item based on the previously loaded image. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 0100...
  • Page 225 Acquire Registered Image: p.224 A maximum of 1000 registered images (image registration number: 0 to 999) can be set. For the PC Tool, the data is saved in the "\..\My Documents\OMRON FQ\" folder. Command (PLC to Sensor) First word of com-...
  • Page 226 Acquire Registered Image This command loads a registered image saved to the SD card or PC Tool as the measurement image. The registered image is the latest image or a logging image that has been assigned a number between 0 and 999 and has been registered in advance with the Set Registered Image command.
  • Page 227 Echo Returns as is any character string sent by an external device. Responds in the response areas +6+7 with the data that was set in command areas +4+5. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7...
  • Page 228 Get Scene Number This command Acquires the scene number currently being used. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0000 0000 Command code 0000 0000...
  • Page 229 0000 0000 0000 Data number 0000 0000 0000 0000 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Response (Sensor to PLC) First word of Bits Contents response area 12 to 15 8 to 11 4 to 7...
  • Page 230 Get Inspection Item Data This command acquires parameters and measurement values for the specified inspection item. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0010...
  • Page 231 Acquire Camera Parameter This command acquires the value of the specified camera parameter. Command (PLC to Sensor) First word of Bits Description command 12 to 15 8 to 11 4 to 7 0 to 3 area 0001 0000 0100 0000 Command code 0000 0000...
  • Page 232 Camera Item Range Description parameter number X coordinate of the partial The following ranges depending Reduces the range of the image to input start point on the processing resolution of input. the Sensor's internal camera. Specify the X and Y coordinates of 0.3M: Cannot be used.
  • Page 233 Model Range FQ2-S3-13 1/1 to 1/4,155 FQ2-S3-13M FQ2-S4-13 FQ2-S4-13M FQ2-S3-08 1/1 to 1/4,155 (Built-in lighting off) FQ2-S3-08M 1/250 to 1/60,000 (Built-in lighting on) FQ2-S4-08 FQ2-S4-08M FQ2-S1 1/1 to 1/50,000 (Built-in lighting off) FQ2-S2 1/250 to 1/50,000 (Built-in lighting on) FQ2-S4 FQ2-S4-M FQ2-CH1-M The value about the gain is the following.
  • Page 234 Get Software Version Information Acquires the Sensor's software version. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0011 0000 0000 0000 Command code 0000 0000 0100 0000...
  • Page 235 Acquire System Data This command acquires the value set for the specified system data. Command (PLC to Sensor) First word of Bits Description command 12 to 15 8 to 11 4 to 7 0 to 3 area 0100 0000 0001 0000 Command code 0000...
  • Page 236 System Type Item Data Range Description data num- size Logging Measurement 0: None Specifies the logging con- control data 1: All dition for measurement 2: NG only data for each inspection item. Logging Statistical data 0: None Specifies whether or not to control 1: Yes record statistical data (such...
  • Page 237 System Type Item Data Range Description data num- size Parallel OUT1 signal 0: Control signal Specifies whether to use control assignment 1 to 32: OR0 to 31 the signal as a control sig- 1001 to 1032: Expression 1 to 32 nal or to use the signal as a 2001: OR (overall judgement) judgment output (OR indi-...
  • Page 238 System Type Item Data Range Description data num- size Parallel OR one-shot 1 to 10,000 Specifies the output time Interface output time (x0.1 ms) when using one- Sensor shot output. Data Unit Parallel Output control 0: No handshake Specifies the control Interface 1: Handshake method for output timing.
  • Page 239 System Type Item Data Range Description data num- size RS-232C All OUT sig- 0: Positive Specifies the polarity for all Interface nals polarity 1: Negative output signals. Sensor Data Unit RS-232C Parallel com- 0: Standard mode Defines the parallel com- Interface mand mode 1: Expanded mode...
  • Page 240 Acquire Statistical Data Acquires the statistical data (such as the number of measurements, number of NG overall judgments, and other information, since the power supply was turned ON) held by the Sensor. The following types of statistical data are available. Specify the data to be read from these types with this command.
  • Page 241 0000 0000 0: OK, FFFFFFFF: NG 0000 0000 0000 0000 Response data Latest error code 0000 0000 0000 0000 Section 8-1 Error Histories in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) FQ2-S/CH User’s Manual Command Control for Communications Settings...
  • Page 242 Acquire Communication Input Status This command acquires the input status (allowed/prohibited) for the communications protocol set with the Set Communication Input Status command. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 0111...
  • Page 243 The communications protocol types are defined by the following numbers. Communications Communications type Remarks protocol No. No protocol (Ethernet) No-protocol (UDP) No-protocol (TCP) No-protocol (FINS/TCP) No protocol (RS-232C) Parallel I/O Fieldbus EtherNet/IP PROFINET Reserved Results in an error when speci- fied.
  • Page 244 Acquire Terminal Status Acquires the ON/OFF status of the input signal for the specified parallel I/O terminal. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 1000 0000 0001...
  • Page 245 Batch Acquire Terminal Status Batch acquires the ON/OFF status for the all parallel I/O input terminals other than the IN terminals. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 1000 0000...
  • Page 246 Batch Acquire IN Terminal Status Batch acquires the ON/OFF status for the IN terminals. Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 1000 0000 0011 0000 Command code...
  • Page 247 Acquire Execution Mode Acquires the FQ2 execution status (execution mode). Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 1111 0000 0000 0000 Command code 0000 0000 0010...
  • Page 248 Acquires the current date and time Acquires parameters for the current date and time information having in the Sensor. Command (PLC to Sensor) Correspond Bits Contents command 12 to 15 8 to 11 4 to 7 0 to 3 area 0010 0000 0000...
  • Page 249 Set Preprocessing Item Data for Image Adjustment Sets parameters for a position compensation item or filter item. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0001...
  • Page 250 Set Inspection Item Data Sets parameters for the specified inspection item. Command (PLC to Sensor) First word of com- Bits Contents mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0010 0000 Command code 0000 0000 0101...
  • Page 251 Set Camera Parameter Sets the value for the specified camera parameter. Camera parameter numbers: p. 229 Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 0001 0000 0100...
  • Page 252 Set System Data Sets the value to the specified system data. System data numbers and details: p. 233 Note All output signals are turned OFF after command is executed. All output signals except RUN signal are turned OFF when Sensor Data Unit is connected. Command (PLC to Sensor) First word of com- Bits...
  • Page 253 Set Terminal Offset Data This command sets the value of the terminal offset data that is added to the IN0 to IN4 command parameters when executing parallel commands. When using parallel command scene changing, you can change the scenes to change to by changing the Set Terminal Offset Data value.
  • Page 254 Set Communication Input Status This command sets the input status (allowed/prohibited) of the communications port for the specified communications protocol. Communications protocols with the input status set to prohibited will no longer receive communications after being set as such. However, for inputs related to hardware (parallel STEP signal and DSA signal), this setting is not applicable. Command (PLC to Sensor) First word of com- Bits...
  • Page 255 Set Communication Output Status This command sets the output status (allowed/prohibited) of the communications port for all the communications protocol. Communications protocols with the output status set to prohibited will no longer output signals after being set as such. Command (PLC to Sensor) First word of com- Bits Description...
  • Page 256 Command (PLC to Sensor) First word of com- Bits Description mand area 12 to 15 8 to 11 4 to 7 0 to 3 1000 0000 0001 0000 Command code 0000 0000 0011 0000 0000 0000 0000 0000 Terminal type •...
  • Page 257 Batch Set Terminal Status Batch sets the ON/OFF status for the all parallel I/O output terminals other than the D terminals (D0 to D15). Important • Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand.
  • Page 258 Batch Set D Terminal Status Batch sets the ON/OFF status for the D terminals (D0 to D15). Important Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand. Set Execution Mode: p.257 Command (PLC to Sensor) First word of com- Bits...
  • Page 259 Set Execution Mode Sets the FQ2 execution status (execution mode). Note When using commands (Set Terminal Status/Batch Set Terminal Status/Batch Set DO Status) to control the ON/OFF status of the parallel I/O terminals with communication commands, change the FQ2 to stop mode with this com- mand.
  • Page 260 Set the date and time information Sets the date and time information of build-in Sensor. Command (PLC to Sensor) First word of Bits Contents command 12 to 15 8 to 11 4 to 7 0 to 3 area 0001 0000 0001 0000 Command code...
  • Page 261 Load Scene Data Loads scene data that is stored on the SD card inserted in the Touch Finder. The source for scene data is the following fixed directory on the SD card. \Sensor name\SCN The file name is not case sensitive. The file name extension can be omitted. Note All of output signals are turned OFF after executing commands.
  • Page 262 Load All Scene Data Loads all scene data that is stored on the SD card inserted in the Touch Finder. The source for all scene data is the following fixed directory on the SD card. \Sensor name\SGP The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 263 Load System Data This command loads system data that is stored on the SD card inserted in the Touch Finder. The source for system data is the following fixed directory on the SD card. \Sensor name\SYD The file name is not case sensitive. The file name extension can be omitted. Note All output signals are turned OFF after command is executed.
  • Page 264 Load All Setting Data This command loads all setting data (all scene data, system data, calibration group data) for the Sensor saved as a backup file from the SD card inserted in the Touch Finder. The source for backup files is the following fixed directory on the SD card. \Sensor name\BKD The file name is not case sensitive.
  • Page 265 Load Calibration Data This command loads calibration data that is stored on the SD card inserted in the Touch Finder as the specified calibration number. The source for calibration data is the following fixed directory on the SD card. \Sensor name\CLB The file name is not case sensitive.
  • Page 266 Load All Calibration Data This command loads all calibration data that is stored on the SD card inserted in the Touch Finder. The source for all calibration data is the following fixed directory on the SD card. \Sensor name\CGP The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 267 Load Model Dictionary Data This command loads model dictionary data that is stored on the SD card inserted in the Touch Finder as the model dictionary with the specified number. The source for model dictionary data is the following fixed directory on the SD card. \Sensor name\DIC The file name is not case sensitive.
  • Page 268 Load All Model Dictionary Data This command loads all model dictionary data that is stored on the SD card inserted in the Touch Finder. The source for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP The file name is not case sensitive.
  • Page 269 Save Scene Data This command saves scene data to the SD card inserted in the Touch Finder as a file. The destination for scene data is the following fixed directory on the SD card. \Sensor name\SCN The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 270 Save All Scene Data This command saves all scene data as a file to the SD card inserted in the Touch Finder. The destination for all scene data is the following fixed directory on the SD card. \Sensor name\SGP The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 271 Save System Data Saves system data as a file to the SD card inserted in the Touch Finder. The destination for system data is the following fixed directory on the SD card. \Sensor name\SYD The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 272 Save Image Data Saves image data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as ifz data. The destination for image data is the following fixed directory on the SD card. \Sensor name\LOGIMAGE\Number*1 Number is a five digit number starting from 00000.
  • Page 273 Save All Image Data This command saves all image data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as ifz data. The backup data destination and file name are fixed as follows. •...
  • Page 274 Save All Setting Data This command saves all setting data (all scene data, system data, calibration group data) for the Sensor to the SD card inserted in the Touch Finder as a backup file. \Sensor name\BKD The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of com- Bits...
  • Page 275 Save Calibration Data Saves the data for the specified calibration number as a file to the SD card inserted in the Touch Finder. The destination for scene data is the following fixed directory on the SD card. \Sensor name\CLB The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of Bits...
  • Page 276 Save All Calibration Data Saves all calibration data as a file to the SD card inserted in the Touch Finder. The destination for all calibration data is the following fixed directory on the SD card. \Sensor name\CGP The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of Bits...
  • Page 277 Save Model Dictionary Data Saves the specified number of model dictionary data as a file to the SD card inserted in the Touch Finder. The destination for scene data is the following fixed directory on the SD card. \Sensor name\DIC The file name is not case sensitive.
  • Page 278 Save All Model Dictionary Data Saves all model dictionary data as a file to the SD card inserted in the Touch Finder. The destination for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP The file name is not case sensitive.
  • Page 279 Save Latest Input Image Data Saves the latest input image to the SD card inserted in the Touch Finder as ifz data. The destination for image data is the following fixed directory on the SD card. \Sensor name\CAPTURE The file name is not case sensitive. The file name extension can be omitted. Command (PLC to Sensor) First word of Bits...
  • Page 280 Save Measurement Data Saves measurement data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for measurement data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 281 Save Statistical Data Saves statistical data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for statistical data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 282 Details of No-protocol TCP, No-protocol UDP, and No-protocol RS-232C Commands and EtherNet/IP (Message Communication Sensor Object) Details of the commands in this section are described in the command format of no-protocol (TCP). When using commands in no-protocol (UDP), EtherNet/IP (message communication Vision Sensor Object) note the following differences from no-protocol (TCP).
  • Page 283 CLRMEAS Clear Measurement Values This command clears the measurement values. <Command Format> Command Delimiter <Response Format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter CLRTOTAL or CTD Clear Statistical Data This command clears the statistical data (such as the number of measurements, the number of NG overall judgments, the NG rate, and other information since the power supply was turned ON) produced by the logging function held by the Sensor.
  • Page 284 DATASAVE Save Settings This command saves the current system data and all scene data in the Sensor. <Command Format> Command Delimiter <Response Format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter Command Control FQ2-S/CH User’s Manual for Communications Settings...
  • Page 285 ECHO or EEC Executes Echo-back (Loop-back). This command returns as is any character string sent by an external device. Only single-byte alphanumerics can be used. <Command format> E C H O Arbitrary character string (256 characters max.) Space (0x20) E E C Arbitrary character string (256 characters max.) Space (0x20) <Response format>...
  • Page 286 ITEMTEACH or IT Perform Teaching (Inspection Item) This command updates the reference data for the specified inspection item. The model data is also updated for inspection items that have model data. <Command Format> Delimiter Delimiter Space Inspection item number Space Inspection item number (0x20) (2 digits max.)
  • Page 287 MEASURE or M Start Continuous Measurements This command starts continuous measurements. If data output is not set, only continuous measurement is performed. If data output is set, continuous measurement is performed and the results corresponding to the number of measurements made are returned as response data. <Command Format>...
  • Page 288 When the Command Is Not Processed Normally Measurement Data returned result for the number of continuous measurements Measurement made. result Delimiter Note Set the data output to output measurement results. If data output is not set, only the command response is output. Setting the Data to Output Automatically after Measurements: p.
  • Page 289 MODEL Re-register Models This command re-registers the models for registered Search and Color Data inspection items. <Command Format> Command Delimiter <Response Format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter FQ2-S/CH User’s Manual Command Control for Communications Settings...
  • Page 290 POSITIONTEACH or PT Perform Teaching (Filter/Position Compensation Item) This command updates reference data for the specified image adjustment processing item (filter item/position compensation item). The model data is also updated in image adjustment processing items that have model data. <Command Format> Space (0x20) Delimiter...
  • Page 291 Registered Image command. Acquire Registered Image p.319 A maximum of 1000 registered images (image registration number: 0 to 999) can be set. For the PC Tool, the data is saved in the "\..\My Documents\OMRON FQ\" folder. <Command Format> Registered Registration...
  • Page 292 <Parameter Descriptions> Registered image number Specifies the image to be loaded as the measurement image. The image is registered in advance with the Set a Registered Image command and assigned a number. (0 to 999) Registration source Specifies the image to be set as the registered image. 0: Latest measurement image 1: Sensor logging image Logging image number...
  • Page 293 <Response Format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter TIMER or TMR This command executes the specified command after the specified waiting time elapses. <Command Format> T I M E R Command string Space (0x20) Space (0x20) Waiting time (msec)
  • Page 294 UPDATEREFITEM or URI Re-register Reference Values (Inspection Item) This command re-registers the reference value for the specified inspection item based on the previously loaded image. The model is not updated. <Command Format> Delimiter Inspection item number (2 digits max.) Space (0x20) Delimiter Inspection...
  • Page 295 UPDATEREFPOS or URP Re-register Reference Values (Position Compensation Item) This command re-registers the reference value for the specified position compensation item based on the previously loaded image. <Command Format> Delimiter Position compensation item number (1 digit max.) Space (0x20) Delimiter Position compensation item number (1 digit max.) Space...
  • Page 296 Commands to Get Status SCENE or S Acquire Scene Number This command acquires the scene number currently being used. <Command Format> Delimiter Delimiter <Response Format> When the Command Is Processed Normally Delimiter Scene number (2 digits max.) Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions>...
  • Page 297 Commands to Set Status SCENE or S Change Scene Number This command changes the scene number to use. <Command Format> S C E N E Delimiter Delimiter Scene number (2 digits max.) Scene number (2 digits max.) Space (0x20) Space (0x20) <Response Format>...
  • Page 298 Commands to Read Data CAMDATA or CD Acquire Camera Parameter This command acquires the value of the specified camera parameter. Camera parameter numbers: p. 229 <Command Format> Camera parameter number Command (3 digits max.) Space Delimiter (0x20) Delimiter Command Camera parameter number (3 digits max.) Space...
  • Page 299 Acquire the date and time information DATE This command acquires the value of the specified camera parameter. <Command Format> <Response Format> When the Command Is Processed Normally When the Command Is Not Processed Normally <Parameter Descriptions> Year/Month/Date/Hour/ Year: 4 digits Minute/Second Month: 2 digits Date: 2 digits...
  • Page 300 DICNOLIST or DNL Acquire List of Registered Dictionary Data Numbers This command acquires the list of registered dictionary data numbers. <Command Format> Command T CR Delimiter Delimiter Command <Response Format> When the Command Is Processed Normally Dictionary data Dictionary data Dictionary data number number...
  • Page 301 DIOFFSET or DIO Acquire Terminal Offset Data This command acquires the terminal offset data that is added to the IN0 to IN4 command parameters when executing parallel commands. If no value has been set with the Set Terminal Offset command, "0" is returned as the terminal offset value and "OK"...
  • Page 302 DIPORTCOND or DPC Batch Acquire IN Terminal Statuses Batch acquires the ON/OFF status for the IN terminals. <Command Format> Command D CR Delimiter Command Delimiter <Response Format> When the Command Is Processed Normally Acquired value Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions>...
  • Page 303 <Parameter Descriptions> Error code Returns the latest error code. If there is no error history, the response is 00000000. Section 8-1 Error Histories in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) FQ2-S/CH User’s Manual Command Control for Communications Settings...
  • Page 304 GETITEMFIGPARAM or GIFP Acquire Measurement Region/Model Region Information Set for an Inspection Item This command acquires the parameters for the measurement region or model registration region set for an inspection item. Note To check the figure number to be used when specifying a figure to change the settings of with the Set Inspection Item Figure command, do so using this command.
  • Page 305 <Parameter Descriptions> Inspection item number Specifies the inspection item number. (0 to 31) Region number Selects either a measurement region or a model registration region. The value that spec- ifies each region differs according to the inspection item type. Figure number The measurement region or model registration region range registers a complicated model or a measurement region by combining a maximum of 8 figures (rectangles, cir- cles, and other shapes).
  • Page 306 The information for the figure that is set as the model registration region or the measurement region is returned in the following manner for each figure type. Figure type of speci- Response parameters fied figure number Parameter Parame- Parame- Parame- Parame- Parame- Parame-...
  • Page 307 GETPOSFIGPARAM or GPFP Acquire Measurement Region/Model Region Information Set for an Image Adjustment Item (Filter Item/Position Compensation Item) This command acquires the parameters for the measurement region or the model registration region set for an image adjustment item (filter item/position compensation item). Note To check the figure number to be used when specifying a figure to change the settings of with the Set Image Adjust- ment Item Figure command, do so using this command.
  • Page 308 <Parameter Descriptions> Image adjustment item Specifies the image adjustment item (filter item/position compensation item) number. (filter item/position com- (0 to 7) pensation item) number Region number Selects the regions. The value that specifies each region differs according to the image adjustment item (filter item/position compensation item) type.
  • Page 309 Image adjustment item Command arguments (filter item/position compensation item) Region number Figure number type 0 (Edge 1 measurement region) Two-edge Position Com- 1 (Edge 2 measurement region) pensation 3 (Position compensation region) 0 (Edge 1 measurement region) Two-edge Midpoint Com- 1 (Edge 2 measurement region) pensation 3 (Position compensation region)
  • Page 310 GETDICFIGPARAM or GDFP Acquire Dictionary Data Cutout Region Parameters This command acquires the specified dictionary data cutout region parameters. <Command Format> Dictionary data number Space (2 digits max.) (0x20) Command G P A R A M Space Space Delimiter (0x20) (0x20) Figure number Space...
  • Page 311 Name Data type Upper/lower limit value Parameter 1 Figure types With the FQ2, fixed value of 8. Parameter 2 Rectangle upper-left X coordinate Parameter 3 Rectangle upper-left Y coordinate Integer type Parameter 4 Rectangle lower-right X coordinate Parameter 5 Rectangle lower-right Y coordinate FQ2-S/CH User’s Manual Command Control...
  • Page 312 INPUTTRANSSTATE or ITS Acquire Communication Input Status This command acquires the input status (allowed/prohibited) for the communications protocol set with the Set Communication Input Status command. <Command Format> Communications protocol type to be acquired Command (1 digit max.) Space Delimiter Delimiter (0x20) Command...
  • Page 313 External reference data Specifies the external reference data number. (0 to 9999) number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Acquired value Returns the data for the specified inspection item. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat.
  • Page 314 External reference data Specifies the external reference data number. number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Acquired text string Returns the text string data for the specified inspection item. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat.
  • Page 315 MODE Acquire Execution Mode Acquires the FQ2 execution status (execution mode). <Command Format> Command Delimiter <Response Format> When the Command Is Processed Normally Acquired value Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> Acquired value This command acquires the FQ2 execution mode 1: Run mode 2: Stop mode 10: Adjust mode...
  • Page 316 OUTPUTTRANSSTATE or OTS Acquire Communication Output Status This command acquires the output status (allowed/prohibited) for all the communications protocol set with the Set Communication Output Status command. <Command Format> Command Delimiter Delimiter Command <Response Format> When the Command Is Processed Normally Acquired value Delimiter...
  • Page 317 PARAALLCOND or PAC Batch Acquire Terminal Statuses Batch acquires the ON/OFF status for the all parallel I/O input terminals other than the IN terminals. <Command Format> Command Delimiter Command Delimiter <Response Format> When the Command Is Processed Normally Acquired value Delimiter When the Command Is Not Processed Normally Delimiter...
  • Page 318 PARAPORTCOND or PPC Acquire Terminal Status Acquires the input signal ON/OFF status for the specified parallel I/O terminal. <Command Format> Terminal type Terminal number Command (2 digits max.) (1 digit max.) Delimiter Space Space Space Space (0x20) (0x20) Delimiter (0x20) (0x20) Command Terminal type...
  • Page 319 <Parameter Descriptions> Terminal type Specifies the type of terminal for the terminal status to be acquired. • Sensor's standard parallel communications 0: TRIG 2: IN0 to IN5 • Parallel Interface Sensor Data Unit 0: TRIG 1: DSA 2: IN0 to IN7 13: RESET •...
  • Page 320 External reference data Specifies the external reference data number. number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Acquired value Returns the image adjustment data or threshold value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Command Control FQ2-S/CH User’s Manual...
  • Page 321 REGIMAGE or RID Acquire Registered Image This command loads a registered image saved to the SD card or PC Tool as the measurement image. The registered image is the latest image or a logging image that has been assigned a number between 0 and 999 and has been registered in advance with the Set a Registered Image command.
  • Page 322 SYSDATA or SD Acquire System Data This command acquires the value set for the specified system data. System data numbers and details: p. 233 <Command Format> System data number Command (3 digits max.) Space Delimiter (0x20) Delimiter Command System data number (3 digits max.) Space...
  • Page 323 TOTALDATA or TD Acquire Statistical Data Acquires the statistical data (such as the number of measurements, number of NG overall judgments, and other information, since the power supply was turned ON) possessed by the Sensor. The following types of statistical data are available. Specify the data to be read from these types with this command.
  • Page 324 VERGET Acquire Software Version This command acquires the version information of the Sensor software. <Command Format> Command Parameter S CR Space Delimiter (0x20) <Response Format> When the Command Is Processed Normally Date Software version Space Delimiter (0x20) Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions>...
  • Page 325 Acquire Sensor Model This command acquires the Sensor model. <Command Format> Command Parameter H CR Space Delimiter (0x20) <Response Format> When the Command Is Processed Normally Model F CR Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> Model Returns the model.
  • Page 326 Commands to Write Data CAMDATA or CD Set Camera Parameter Sets the value for the specified camera parameter. Camera parameter numbers: p. 229 <Command Format> Camera parameter number Setting value Command (3 digits max.) (6 digits max.) Space Space Delimiter (0x20) (0x20) Delimiter...
  • Page 327 DATE Change the date and time information of build-in Sensor. <Command Format> <Response Format> When the Command Is Processed Normally When the Command Is Not Processed Normally Note <Hour: 2 digits>, <Minute: 2 digits>, and <Second: 2 digits> can be omitted during setting. Settings cannot be updated when these are omitted, however, and the previous time will be kept unchanged.
  • Page 328 DIOFFSET or DIO Set Terminal Offset Data This command sets the value of the terminal offset data that is added to the IN0 to IN4 command parameters when executing parallel commands. When using parallel command scene changing, you can change the scenes to change to by changing the Set Terminal Offset Data value.
  • Page 329 DOPORTCOND or DPC Batch Set D Terminal Statuses Batch sets the ON/OFF status for the D terminals (D0 to D15). Important Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand. Set Execution Mode: p.341 <Command Format>...
  • Page 330 <Parameter Descriptions> Terminal status Specifies the ON/OFF status for the terminals as a hexadecimal value. (ON: 1, OFF: 0) (0 to 65,535) BIT0: D0 BIT1: D1 BIT2: D2 BIT3: D3 BIT4: D4 BIT5: D5 BIT6: D6 BIT7: D7 BIT8: D8 BIT9: D9 BIT10: D10 BIT11: D11...
  • Page 331 INPUTTRANSSTATE or ITS Set Communication Input Status This command sets the input status (allowed/prohibited) of the communications port for the specified communications protocol. Communications protocols with the input status set to prohibited will no longer receive communications after being set as such. However, for inputs related to hardware (parallel TRIG signal and DSA signal), this setting is not applicable.
  • Page 332 DICDELETE or DD Delete One Character from Dictionary Data This command deletes one character from the characters registered in the model dictionary. <Command Format> Character to Space be deleted Delimiter Command (0x20) (1 character) Dictionary data Deleted number character number Character to (2 digits max.) (1 digit)
  • Page 333 DICREGIST or DR Register Characters to Dictionary Data This command registers characters to the specified dictionary data. <Command Format> Space String to be registered (line 1) String to be registered (line 3) (0x20) (32 characters max.) (32 characters max.) Command Delimiter Dictionary data String to be registered...
  • Page 334 SETITEMFIGPARAM or SIFP Set Inspection Item Measurement Region/Model Region This command changes the range set as the measurement region or the model registration region for an inspection item. This command cannot set a new measurement region or model registration region. When using this command, execute it for an inspection item that has already been set with a measurement region or a model registration region.
  • Page 335 Depending on each inspection item type, the model registration region or measurement region is specified by the following values. Inspection item types Command arguments Region number Figure number 0 (measurement region) Bar Code 0 (measurement region) 2D-code 0 (measurement region) 2D-code (DPM) 0 (measurement region) Search...
  • Page 336 Figure type of Parameters specified figure Parame- Parame- Parame- Parame- Parame- Parame- Parame- Parame- number ter 0 ter 1 ter 2 ter 3 ter 4 ter 5 ter 20 ter 21 Line with width Figure type First X First Y Second X Second Y Line width ...
  • Page 337 SETPOSFIGPARAM or SPFP Set Measurement Region/Model Region for an Image Adjustment Item (Filter Item/Position Compensation Item) This command changes the range set as the measurement region or the model registration region for an image adjustment item (filter item/position compensation item). This command cannot set a new measurement region or model registration region.
  • Page 338 <Parameter Descriptions> Image adjustment item Specifies the image adjustment item (filter item/position compensation item) number. (filter item/position com- (0 to 7) pensation item) number Region number Selects the regions. The value that specifies each region differs according to the image adjustment item (filter item/position compensation item) type.
  • Page 339 Image adjustment item Command arguments (filter item/position compensation item) Region number Figure number type 0 (Position compensation region) Search Position Com- 1 (model registration region) 0 to 7 pensation 2 (measurement region) Edge Position Compen- 0 (measurement region) sation 2 (Position compensation region) 0 (Edge 1 measurement region) Two-edge Position Com- 1 (Edge 2 measurement region)
  • Page 340 SETDICFIGPARAM or SDFP Set Dictionary Data Cutout Region Parameters This command sets the specified dictionary data cutout region parameters. <Command Format> Dictionary data number Space (2 digits max.) (0x20) Command Parameter 1 Parameter 4 Space Space Figure number Space Space Delimiter (0x20) (0x20)
  • Page 341 External reference data Specifies the external reference data number. (0 to 9999) number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Setting value Specifies the setting value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) FQ2-S/CH User’s Manual...
  • Page 342 External reference data Specifies the external reference data number. number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Text string data Specifies the text string data for the specified inspection item. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat.
  • Page 343 MODE Set Execution Mode Sets the FQ2 execution status (execution mode). Note When using commands (Set Terminal Status/Batch Set Terminal Status/Batch Set DO Status) to control the ON/OFF status of the parallel I/O terminals with communication commands, change the FQ2 to stop mode with this com- mand.
  • Page 344 OUTPUTTRANSSTATE or OTS Set Communication Output Status This command sets the output status (allowed/prohibited) for all the communications protocol. Communications protocols with the output status set to prohibited will no longer output signals after being set as such. <Command Format> Communications protocol status to be set (1 digit max.) Command...
  • Page 345 PARAALLCOND or PAC Batch Set Terminal Statuses Batch sets the ON/OFF status for the all parallel I/O output terminals other than the D terminals (D0 to D15). Important • Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand.
  • Page 346 <Parameter Descriptions> Terminal status Specifies the ON/OFF status for the terminal. (ON: 1, OFF: 0) (0 to 16,383) • Sensor's standard parallel communications BIT1: ERROR BIT2: BUSY BIT3: OR • Parallel Interface Sensor Data Unit BIT0: RUN BIT1: ERROR BIT2: BUSY BIT3: OR BIT5: GATE BIT9: STGOUT...
  • Page 347 PARAPORTCOND or PPC Set Terminal Status This command sets the output signal ON/OFF status for the specified parallel I/O terminal. <Command Format> Terminal type Terminal number Terminal status Command (2 digits max.) (2 digits max.) (1 digit max.) Delimiter Space Space Space Space...
  • Page 348 <Parameter Descriptions> Terminal type Specifies the type of terminal for the terminal status to be set. • Sensor's standard parallel communications 4: ERROR 5: BUSY 6: OR • Parallel Interface Sensor Data Unit 3: RUN 4: ERROR 5: BUSY 6: OR 7: GATE 9: D0 to D15 10: STGOUT...
  • Page 349 External reference data Specifies the external reference data number. number Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Setting value Specifies the set value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) FQ2-S/CH User’s Manual...
  • Page 350 SYSDATA or SD Set System Data Sets the value to the specified system data. System data numbers and details: p. 233 Note All output signals are turned OFF after command is executed. All output signals except RUN signal are turned OFF when Sensor Data Unit is connected. <Command Format>...
  • Page 351 Load Setting Data Commands SCNLOAD This command loads scene data that is stored on the SD card inserted in the Touch Finder. The source for scene data is the following fixed directory on the SD card. \Sensor name\SCN <Command format> S C N L O A D File name of scene data Space (0x20)
  • Page 352 SGRLOAD This command loads all scene data that is stored on the SD card inserted in the Touch Finder. The source for all scene data is the following fixed directory on the SD card. \Sensor name\SGP <Command format> S G R L O A D Space (0x20) All scene data file name <Response format>...
  • Page 353 SYSLOAD This command loads system data that is stored on the SD card inserted in the Touch Finder. The source for system data is the following fixed directory on the SD card. \Sensor name\SYD Note All output signals are turned OFF after command is executed. All output signals except RUN signal are turned OFF when Sensor Data Unit is connected.
  • Page 354 BKDLOAD This command loads all setting data (all scene data, system data, calibration group data) for the Sensor saved as a backup file from the SD card inserted in the Touch Finder. The source for backup files is the following fixed directory on the SD card. \Sensor name\BKD <Command format>...
  • Page 355 CLBLOAD This command loads calibration data that is stored on the SD card inserted in the Touch Finder as the data for the specified calibration number. The source for calibration data is the following fixed directory on the SD card. \Sensor name\CLB <Command Format>...
  • Page 356 CGRLOAD This command loads all calibration data that is stored on the SD card inserted in the Touch Finder. The source for all calibration data is the following fixed directory on the SD card. \Sensor name\CGP <Command Format> C G R L O A D All calibration data file name Space (0x20) <Response Format>...
  • Page 357 DICLOAD This command loads model dictionary data that is stored on the SD card inserted in the Touch Finder as the model dictionary with the specified number. The source for model dictionary data is the following fixed directory on the SD card. \Sensor name\DIC <Command Format>...
  • Page 358 DGRLOAD This command loads all model dictionary data that is stored on the SD card inserted in the Touch Finder. The source for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP <Command Format> D G R L O A D All model dictionary data file name Space (0x20)
  • Page 359 Save Configuration Data Commands SCNSAVE This command saves scene data to the SD card inserted in the Touch Finder as a file. The destination for scene data is the following fixed directory on the SD card. \Sensor name\SCN <Command format> S C N S A V E Scene data file name Space (0x20)
  • Page 360 SGRSAVE This command saves all scene data as a file to the SD card inserted in the Touch Finder. The destination for all scene data is the following fixed directory on the SD card. \Sensor name\SGP <Command format> S G R S A V E All scene data file name Space (0x20) <Response format>...
  • Page 361 SYSSAVE Saves system data as a file to the SD card inserted in the Touch Finder. The destination for system data is the following fixed directory on the SD card. \Sensor name\SYD <Command format> S Y S S A V E System data file name Space (0x20) <Response format>...
  • Page 362 Note Image data is stored to the following directory when you use TouchFinder for PC. \My Documents\OMRON FQ\SDCard\Sensor name\LOGIMAGE\* The file is stored to the under the LOGIMAGE folder when you use TouchFinder for PC. There is no limit to store the number of file.
  • Page 363 ALLIMAGESAVE or AIS This command saves all image data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as ifz data. The destination for logging image data is the following fixed directory on the SD card. \Sensor name\LOGIMAGE\Number Number is a five digit number starting from 00000.
  • Page 364 BKDSAVE This command saves all setting data (all scene data, system data, calibration group data) for the Sensor to the SD card inserted in the Touch Finder as a backup file. The destination for backup data is the following fixed directory on the SD card. \Sensor name\BKD <Command format>...
  • Page 365 CLBSAVE This command saves the calibration data with the specified calibration number as a file to the SD card inserted in the Touch Finder. The destination for calibration data is the following fixed directory on the SD card. \Sensor name\CLB <Command Format>...
  • Page 366 <Response Format> When the Command Is Processed Normally When the Command Is Not Processed Normally <Parameter Descriptions> All calibration data file name Specifies the all calibration data file name to be saved. (64 characters max.) The file name extension (.cgp) can be omitted. Important •...
  • Page 367 DGRSAVE Saves all model dictionary data as a file to the SD card inserted in the Touch Finder. The destination for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP <Command Format> D G R S A V E All model dictionary data file name Space (0x20) <Response Format>...
  • Page 368 LASTIMAGESAVE or LIS Saves the latest input image to the SD card inserted in the Touch Finder as ifz data. The destination for image data is the following fixed directory on the SD card. \Sensor name\CAPTURE <Command Format> L A S T I M G E S A V E Image data file name Space (0x20)
  • Page 369 LOGDATASAVE or LDS Saves measurement data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for measurement data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 370 TOTALDATASAVE or TDS Saves statistical data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for statistical data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 371 Load Commands for Binary Data Files PRESCNLOADB (Check) / SCNLOADB (Execute) Loading scene data (binary data) The Sensor loads scene data in binary format. To execute this command, two types of commands are used, a confirmation command and an execution command.
  • Page 372 <Parameter Descriptions> File size scheduled to be sent Number of bytes of scene data scheduled to send (integer type) Scene data number Specifies the scene number you want to load. (Integer type) Specify 0 to 31. Scene data (binary) Scene data to be loaded (binary data) PRESGRLOADB (Check) / SGRLOADB (Execute) Loading all scene data (binary data) The Sensor loads all scene data in binary format.
  • Page 373 <Execution command format> Loads all scene data in binary data format. All scene data (binary) Space Delimiter (0x20) <Execution command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> File size scheduled to be sent Number of bytes of all scene data scheduled to send (integer type) All scene data (binary) All scene data to be loaded (binary data)
  • Page 374 <Confirmation command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter <Execution command format> Loads system data in binary data format. System data (binary) Space Delimiter (0x20) <Execution command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter...
  • Page 375 <Confirmation command format> Before loading all setting data for the Sensor in binary data format, the Sensor checks whether or not it can receive binary data. File size scheduled to be sent Space Delimiter (0x20) <Confirmation command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter...
  • Page 376 PRECLBLOADB (Check) / CLBLOADB (Execute) Loading calibration data (binary data) The Sensor loads calibration data in binary format as the specified calibration number. To execute this command, two types of commands are used, a confirmation command and an execution command. For how to execute the command using the confirmation command and the execution command, refer to Binary Data File Load and Save Commands: p.
  • Page 377 When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> File size scheduled to be sent Number of bytes of calibration data scheduled to be sent (integer type) Calibration data number Specifies the calibration number you want to load. (Integer type) Specify 0 to 31.
  • Page 378 <Execution command format> Loads all calibration data in binary data format. All calibration data (binary) Space Delimiter (0x20) <Execution command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> File size scheduled to be sent Number of bytes of all calibration data scheduled to send (integer type) All calibration data (binary) All calibration data to be loaded (binary data)
  • Page 379 <Confirmation command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter <Execution command format> Loads model dictionary data in binary data format. Model dictionary number Delimiter Space Space Model dictionary data (0x20) (0x20) (binary) <Execution command response format>...
  • Page 380 <Confirmation command format> Before loading all model dictionary data in binary data format, the Sensor checks whether or not it can receive binary data. File size scheduled to be sent Space Delimiter (0x20) <Confirmation command response format> When the Command Is Processed Normally Delimiter When the Command Is Not Processed Normally Delimiter...
  • Page 381 Save Commands for Binary Data Files PRESCNSAVEB (Check) / SCNSAVEB (Execute) Outputting scene data (binary data) This command outputs scene data for the Sensor in binary data format. To execute this command, two types of commands are used, a confirmation command and an execution command.
  • Page 382 <Execution command response format> When the Command Is Processed Normally Scene data (binary) Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> Scene data number Specifies the scene number (integer type) you want to output. Specify 0 to 31. Scene data size Number of bytes of scene data to output (integer type) Scene data (binary)
  • Page 383 When the Command Is Not Processed Normally Delimiter <Execution command format> This command outputs all scene data in binary data format. B CR Delimiter <Execution command response format> When the Command Is Processed Normally All scene data (binary) Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions>...
  • Page 384 <Confirmation command response format> When the Command Is Processed Normally System data size Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Execution command format> This command outputs system data in binary data format. B CR Delimiter <Execution command response format> When the Command Is Processed Normally System data (binary) Delimiter...
  • Page 385 PREBKDSAVEB (Check) / BKDSAVEB (Execute) Outputting system data and all scene data (binary data) This command outputs all setting data (all scene data, system data, calibration group data) for the Sensor as a backup file in binary data format. To execute this command, two types of commands are used, a confirmation command and an execution command.
  • Page 386 When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> BKD data size Number of bytes of all setting data to output (integer type) BKD data (binary) All setting data to output (binary data) PREIMAGESAVEB (Check) / IMAGESAVEB (Execute) Outputting image (binary data) This command outputs images stored in the Sensor memory in binary format.
  • Page 387 <Execution command response format> When the Command Is Processed Normally Image data (binary) Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> Image data number Specifies the image data number (integer type) you want to output. Specify 0 to 19. Image data size Number of bytes of image data to output (integer type) Image data (binary)
  • Page 388 When the Command Is Not Processed Normally Delimiter <Execution command format> Outputs all image data stored in the Sensor memory in binary format. B CR Delimiter <Execution command response format> When the Command Is Processed Normally All image data (binary) Delimiter Delimiter When the Command Is Not Processed Normally...
  • Page 389 <Confirmation command response format> When the Command Is Processed Normally Calibration data size Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Execution command format> This command outputs the calibration data in binary data format. B CR Delimiter <Execution command response format> When the Command Is Processed Normally Calibration data (binary) Delimiter...
  • Page 390 PRECGRSAVEB (Check) / CGRSAVEB (Execute) Outputting all calibration data (binary data) This command outputs all calibration data in binary data format. To execute this command, two types of commands are used, a confirmation command and an execution command. For how to execute the command using the confirmation command and the execution command, refer to Binary Data File Load and Save Commands: p.
  • Page 391 When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> All calibration data size Number of bytes of all calibration data to output (integer type) All calibration data (binary) All calibration data to output (binary data) PREDICSAVEB (Check) / DICSAVEB (Execute) Outputting model dictionary data (binary data) This command outputs model dictionary data with the specified number in binary data format.
  • Page 392 <Execution command response format> When the Command Is Processed Normally Model dictionary data (binary) Delimiter Delimiter When the Command Is Not Processed Normally Delimiter <Parameter Descriptions> Model dictionary data number Specifies the model dictionary data number (integer type) you want to output. Specify 0 to 31.
  • Page 393 When the Command Is Not Processed Normally Delimiter <Execution command format> This command outputs all model dictionary data in binary data format. B CR Delimiter <Execution command response format> When the Command Is Processed Normally All model dictionary data (binary) Delimiter Delimiter When the Command Is Not Processed Normally...
  • Page 394 FINS Command Details  Executing Measurements This command executes one measurement. If Ethernet output is not set, only the measurement is performed. If Ethernet output is set, the measurement is performed and the result is returned as response data. Command Format MRC (1 byte) SRC (1 byte) Sensor command code (4 bytes)
  • Page 395  Clearing Measurement Values This command clears the measurement values. Command Format MRC (1 byte) SRC (1 byte) Sensor command code (4 bytes) 00102010 Response Format MRES SRES Sensor command code (1 byte) (1 byte) (1 byte) (1 byte) (4 bytes) End code 00102010 End Codes...
  • Page 396  Clear Statistical Data This command clears the statistical data (such as the number of measurements, the number of NG overall judgments, the NG rate, and other information since the power supply was turned ON) produced by the logging function held by the Sensor. Command Format MRC (1 byte) SRC (1 byte)
  • Page 397  Re-register Models Re-registration is executed for registered Search, Shape Search ll, Sensitive Search or Color Data. Format Sensor command code (4 (1 byte) (1 byte) bytes) 00104010 Response Format MRES SRES Sensor command code (1 byte) (1 byte) (1 byte) (1 byte) (4 bytes) End code...
  • Page 398  Perform Teaching (Filter/Position Compensation Item) This command updates reference data for the specified image adjustment processing item (filter item/position compensation item). For image adjustment processing items that have models, the model and reference data are updated. Command Format Sensor command code (4 Filter item/position compensation (1 byte) (1 byte)
  • Page 399  Perform Teaching (Inspection Item) This command updates the reference data for the specified inspection item. For inspection items that have models, the model and reference data are updated. Command Format Sensor command code (4 Inspection item number (4 bytes) (1 byte) (1 byte) bytes)
  • Page 400  Re-register Reference Values (Position Compensation Item) This command re-registers the reference value for the specified position compensation item based on the previously loaded image. Command Format Sensor command code (4 Position compensation item num- (1 byte) (1 byte) bytes) (4 bytes) 00104031 Position compensation item num-...
  • Page 401  Re-register Reference Values (Inspection Item) This command re-registers the reference values for the specified inspection item based on the previously loaded image. Command Format Sensor command code (4 Inspection item number (4 bytes) (1 byte) (1 byte) bytes) 00104032 Inspection item number from 0 to 31 (2 digits max.) Response Format...
  • Page 402 Registered Image command. Acquire Registered Image p.401 A maximum of 1000 registered images (image registration number: 0 to 999) can be set. For the PC Tool, the data is saved in the "\..\My Documents\OMRON FQ\" folder. Command Format Sensor command code (4...
  • Page 403  Acquire Registered Image This command loads a registered image saved to the SD card or PC Tool as the measurement image. The registered image is the latest image or a logging image that has been assigned a number between 0 and 999 and has been registered in advance with the Set a Registered Image command.
  • Page 404  Echo This command returns the text string (half-width alphanumeric characters) sent by the external device as-is. Format Sensor command code (4 Arbitrary char- (1 byte) (1 byte) bytes) acter string (4 bytes) 00109010 2 words Response Format MRES SRES Sensor command code Arbitrary char- (1 byte)
  • Page 405  Get Scene Number This command acquires the scene number that is currently being used. Format Sensor command code (4 (1 byte) (1 byte) bytes) 00201000 Response Format MRES SRES Sensor command code (4 bytes) Scene number (1 byte) (1 byte) (1 byte) (1 byte) (4 bytes)
  • Page 406  Acquire Communication Input Status This command acquires the input status (allowed/prohibited) for the communications protocol set with the Set Communication Input Status command. Command Format Sensor command code (4 Communications protocol type to (1 byte) (1 byte) bytes) be acquired (4 bytes) 00207010 Communications protocol type to be acquired...
  • Page 407  Acquire Communication Output Status This command acquires the output status (allowed/prohibited) for all the communications protocol set with the Set Communication Output Status command. Command Format Sensor command code (4 (1 byte) (1 byte) bytes) 00207020 Response Format MRES SRES Sensor command code (4 bytes) Acquired value (1 byte)
  • Page 408  Acquire Terminal Status Acquires the input signal ON/OFF status for the specified parallel I/O terminal. Command Format Sensor command code (4 Terminal type (4 bytes) Terminal number (1 byte) (1 byte) bytes) (4 bytes) 00208010 2 digits max. 1 digit max. Response Format MRES SRES...
  • Page 409  Batch Acquire Terminal Statuses: 280F 00208020 Batch acquires the ON/OFF status for the all parallel I/O input terminals other than the IN terminals. Command Format Sensor command code (4 (1 byte) (1 byte) bytes) 00208020 Response Format MRES SRES Sensor command code (4 bytes) Terminal status (1 byte) (1 byte)
  • Page 410  Batch Acquire IN Terminal Statuses Batch acquires the ON/OFF status for the IN terminals. Command Format Sensor command code (4 (1 byte) (1 byte) bytes) 00208030 Response Format MRES SRES Sensor command code (4 bytes) Terminal status (1 byte) (1 byte) (1 byte) (1 byte)
  • Page 411  Acquire Execution Mode Acquires the FQ2 execution status (execution mode). Command Format Sensor command code (4 (1 byte) (1 byte) bytes) 0020F000 Response Format MRES SRES Sensor command code (4 bytes) Execution mode (1 byte) (1 byte) (1 byte) (1 byte) (4 bytes) End code...
  • Page 412  Change Scene Number This command changes the scene number to use. Format Sensor command code (4 Scene number (4 bytes) (1 byte) (1 byte) bytes) 00301000 Scene number to change to (2 digits max.) Response Format MRES SRES Sensor command code (4 bytes) (1 byte) (1 byte) (1 byte)
  • Page 413  Set Communication Input Status This command sets the input status (allowed/prohibited) of the communications port for the specified communications protocol. Communications protocols with the input status set to prohibited will no longer receive communications after being set as such. However, for inputs related to hardware (parallel TRIG signal and DSA signal), this setting is not applicable.
  • Page 414  Set Communication Output Status This command sets the output status (allowed/prohibited) for all the communications protocol. Communications protocols with the output status set to prohibited will no longer output signals after being set as such. Command Format Sensor command code (4 Communications protocol status (1 byte) (1 byte)
  • Page 415  Set Terminal Status This command sets the output signal ON/OFF status for the specified parallel I/O terminal. Note When turning the parallel terminals ON or OFF with this command, there are terminals that cannot be controlled if the FQ2 execution mode is not set to stop mode. In this case, first change the FQ2 execution mode to stop mode with the Set Execution Mode command, and then execute this command.
  • Page 416 Parameter Descriptions Terminal type Specifies the type of terminal for the terminal status to be set. • Sensor's standard parallel communications 4: ERROR 5: BUSY 6: OR • Parallel Interface Sensor Data Unit 3: RUN 4: ERROR 5: BUSY 6: OR 7: GATE 9: D0 to D15 10: STGOUT...
  • Page 417  Batch Set Terminal Statuses Batch sets the ON/OFF status for the all parallel I/O output terminals other than the D terminals (D0 to D15). Important • Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand.
  • Page 418  Batch Set D Terminal Statuses Batch sets the ON/OFF status for the D terminals (D0 to D15). Important Before executing this command, change the FQ2 execution mode to stop mode with the Set Execution Mode com- mand. Set Execution Mode: p.417 Command Format Sensor command code (4 Terminal status (4 bytes)
  • Page 419  Set Execution Mode Sets the FQ2 execution status (execution mode). Note When using commands (Set Terminal Status/Batch Set Terminal Status/Batch Set DO Status) to control the ON/OFF status of the parallel I/O terminals with communication commands, change the FQ2 to stop mode with this com- mand.
  • Page 420 External reference num- Specifies the external reference number. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Acquired value Returns the image adjustment data or threshold value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Command Control FQ2-S/CH User’s Manual...
  • Page 421 Specifies the number of the inspection item for which to acquire the data. (0 to 31) External reference num- Specifies the external reference number. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Acquired value Returns the data for the specified inspection item. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat.
  • Page 422  Get Version Information This command acquires the version information of the Sensor software. Format Sensor command code (4 (1 byte) (1 byte) bytes) 00403000 Response Format MRES SRES Sensor command code Software version (1 byte) (1 byte) (1 byte) (1 byte) (4 bytes) text string (4 bytes)
  • Page 423  Acquire Camera Parameter This command acquires the value of the specified camera parameter. Camera parameter numbers: p. 229 Command Format Sensor command code (4 Camera parameter number (1 byte) (1 byte) bytes) (4 bytes) 00401040 3 digits max. Response Format MRES SRES Sensor command code (4 bytes) Acquired value...
  • Page 424  Acquire System Data This command acquires the value set for the specified system data. System data numbers and details: p. 233 Command Format Sensor command code (4 System data number (4 bytes) (1 byte) (1 byte) bytes) 00404010 3 digits max. Response Format MRES SRES...
  • Page 425  Acquire Terminal Offset Data This command acquires the terminal offset data that is added to the IN0 to IN4 command parameters when executing parallel commands If no value has been set with the Set Terminal Offset command, "00000" is returned as the terminal offset value and "0000"...
  • Page 426  Acquire Statistical Data Acquires the statistical data (such as the number of measurements, number of NG overall judgments, and other information, since the power supply was turned ON) possessed by the Sensor. The following types of statistical data are available. Specify the data to be read from these types with this command.
  • Page 427 Parameter Descriptions Error code Returns the latest error code. If there is no error record, the response is 00000000. Section 8-1 Error Histories in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) FQ2-S/CH User’s Manual Command Control for Communications Settings...
  • Page 428 External reference num- Specifies the external reference number. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Set value Specifies the set value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Command Control FQ2-S/CH User’s Manual...
  • Page 429 Specifies the number of the inspection item to set. (0 to 31) External reference num- Specifies the external reference number. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat. No. Z337) Setting Specifies the set value. Section 9-2 External Reference Parameters in Sensor FQ2-S/CH Series User's Manual (Cat.
  • Page 430  Set Camera Parameter Sets the value for the specified camera parameter. Camera parameter numbers: p. 229 Command Format Sensor command code (4 Camera parameter number Setting value (1 byte) (1 byte) bytes) (4 bytes) (4 bytes) 00501040 3 digits max. Dependent on the camera parameter (1,000 times the...
  • Page 431  Set System Data Sets the value to the specified system data. System data numbers and details: p. 233 Note All output signals are turned OFF after command is executed. All output signals except RUN signal are turned OFF when Sensor Data Unit is connected. Command Format Sensor command code (4 System data number (4 bytes)
  • Page 432  Set Terminal Offset Data This command sets the value of the terminal offset data that is added to the IN0 to IN4 command parameters when executing parallel commands. When using parallel command scene changing, you can change the scenes to change to by changing the Set Terminal Offset Data value.
  • Page 433 Load Setting Data Commands  Load Scene Data Loads scene data that is stored on the SD card inserted in the Touch Finder. The source for scene data is the following fixed directory on the SD card. \Sensor name\SCN Format Sensor command code (4 Scene number (4 bytes) Scene data file name...
  • Page 434  Load All Scene Data Loads all scene data that is stored on the SD card inserted in the Touch Finder. The source for all scene data is the following fixed directory on the SD card. \Sensor name\SGP Format Sensor command code (4 Scene group number (4 bytes) Scene group data file (1 byte)
  • Page 435  Load System Data This command loads system data that is stored on the SD card inserted in the Touch Finder. The source for system data is the following fixed directory on the SD card. \Sensor name\SYD Note All output signals are turned OFF after command is executed. All output signals except RUN signal are turned OFF when Sensor Data Unit is connected.
  • Page 436  Load All Setting Data This command loads all setting data (all scene data, system data, calibration group data) for the Sensor saved as a backup file from the SD card inserted in the Touch Finder. The source for backup files is the following fixed directory on the SD card. \Sensor name\BKD Format Sensor command code (4...
  • Page 437  Load Calibration Data This command loads calibration data that is stored on the SD card inserted in the Touch Finder as the calibration data with the specified number. The source for calibration data is the following fixed directory on the SD card. \Sensor name\CLB Format Sensor command code (4...
  • Page 438  Load All Calibration Data This command loads all calibration data that is stored on the SD card inserted in the Touch Finder. The source for all calibration data is the following fixed directory on the SD card. \Sensor name\CGP Format Sensor command code (4 All scene data file name...
  • Page 439  Load Model Dictionary Number Data This command loads model dictionary data that is stored on the SD card inserted in the Touch Finder as the specified model dictionary number. The source for calibration data is the following fixed directory on the SD card. \Sensor name\DIC Format Sensor command code (4...
  • Page 440  Load All Model Dictionary Data This command loads all model dictionary data that is stored on the SD card inserted in the Touch Finder. The source for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP Format Sensor command code (4...
  • Page 441 Save Configuration Data Commands  Save Scene Data This command saves scene data to the SD card inserted in the Touch Finder as a file. The destination for scene data is the following fixed directory on the SD card. \Sensor name\SCN Format Sensor command code (4 Save scene number (4 bytes)
  • Page 442  Save Scene Group Data This command saves all scene data as a file to the SD card inserted in the Touch Finder. The destination for all scene data is the following fixed directory on the SD card. \Sensor name\SGP Format Sensor command code (4 Save scene group number...
  • Page 443  Save System Data Saves system data as a file to the SD card inserted in the Touch Finder. The destination for system data is the following fixed directory on the SD card. \Sensor name\SYD Format Sensor command code (4 System data file (1 byte) (1 byte)
  • Page 444  Save Image Data Saves image data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as ifz data. The destination for image data is the following fixed directory on the SD card. \Sensor name\LOGIMAGE\Number* Number is a five digit number starting from 00000.
  • Page 445  Save All Image Data This command saves all image data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as ifz data. The destination for logging image data is the following fixed directory on the SD card. \Sensor name\LOGIMAGE\Number Number is a five digit number starting from 00000.
  • Page 446  Save All Setting Data This command saves all setting data (all scene data, system data, calibration group data) for the Sensor to the SD card inserted in the Touch Finder as a backup file. The destination for backup data is the following fixed directory on the SD card. \Sensor name\BKD Format Sensor command code (4...
  • Page 447  Save Calibration Data This command saves the calibration data with the specified calibration number as a file to the SD card inserted in the Touch Finder. The destination for calibration data is the following fixed directory on the SD card. \Sensor name\CLB Format Sensor command code (4...
  • Page 448  Save All Calibration Data Saves all calibration data as a file to the SD card inserted in the Touch Finder. The destination for all calibration data is the following fixed directory on the SD card. \Sensor name\CGP Format Sensor command code (4 All calibration data file name (1 byte) (1 byte)
  • Page 449  Save Model Dictionary Data Saves the specified number of model dictionary data as a file to the SD card inserted in the Touch Finder. The destination for model dictionary data is the following fixed directory on the SD card. \Sensor name\DIC Format Sensor command code (4...
  • Page 450  Save All Model Dictionary Data Saves all model dictionary data as a file to the SD card inserted in the Touch Finder. The destination for all model dictionary data is the following fixed directory on the SD card. \Sensor name\DGP Format Sensor command code (4 All model dictionary data file...
  • Page 451  Save Latest Input Image Data Saves the latest input image to the SD card inserted in the Touch Finder as ifz data. The destination for image data is the following fixed directory on the SD card. \Sensor name\CAPTURE\Number Number is a five digit number starting from 00000. The images are saved in increments of 100 images for each number, and when there are over 100 images, the directory with the next number is created.
  • Page 452  Save Measurement Data Saves measurement data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for measurement data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 453  Save Statistical Data Saves statistical data saved in the Sensor's memory by the logging function to the SD card inserted in the Touch Finder as csv data. The destination for statistical data is the following fixed directory on the SD card. \Sensor name\LOGDATA The file name is automatically created as follows.
  • Page 454: Detailed Ethernet/Ip Communications Specifications

    5-2 Detailed EtherNet/IP Communications Specifications FQ2-S1 FQ2-S2 FQ2-S3 FQ2-S4 FQ2-CH This section lists the objects that are mounted in the Sensor. 1-1 01h Identity Object Class Attributes Access Name Data type Description Attribute value Revision UINT Revision of the object Max Instance UINT Maximum instance number...
  • Page 455 1-2 02h Message Router Object Class Attributes None Instance Attributes None Services None 1-3 06h Connection Manager Class Attributes None Instance Attributes None Services Code Service name Class Instances Remarks 54 hex Forward Open 4E hex Forward Close 1-4 F5h TCP/IP Interface Class Attributes Access Name...
  • Page 456 Access Name Data type Description Attribute value Interface Configuration STRUCT of: TCP/IP network interface set- tings IP Address UDINT IP address of the device Network Mask UDINT Network mask of the device Gateway Address UDINT Default gateway address Name Server UDINT Primary name server Name Server 2...
  • Page 457 MEMO FQ2-S/CH User’s Manual Detailed EtherNet/IP Communications Specifications for Communications Settings...
  • Page 458: Index

    Index GATE signal ON period 94, 126, 151 Numerics 0 Suppressed handshaking 31, 69 ACK signal ON period individual judgements input port No. 174, 195 baud rate interval timeout binary data file load and save commands BUSY signal Lighting control BUSY signal output polarity line delimiter character output...
  • Page 459 positive 45, 73 PROFINET record separator reference color re-registering refreshing task period 94, 150 response (response area) retry details retry interval RS-232C connections RS-232C no-protocol commands RS-232C no-protocol communications 203 scenes switching setting data communications specifications Parallel Sensor Data Unit setting the data to output automatically after measurements 204, 214...
  • Page 460: Revision History

    Revision History A manual revision code appears as a suffix to the catalog number at the bottom of the front and back covers of this manual. Cat. No. Z338-E1-04 Revision code Revision code Date Revised contents December 2013 Original production July 2014 Corrected minor mistakes.
  • Page 462 Hoffman Estates, IL 60169 U.S.A. Carl-Benz-Str. 4, D-71154 Nufringen, Germany Tel: (1) 847-843-7900/Fax: (1) 847-843-7787 Tel: (49) 7032-811-0/Fax: (49) 7032-811-199 © OMRON Corporation 2013-2016 All Rights Reserved. OMRON (CHINA) CO., LTD. OMRON ASIA PACIFIC PTE. LTD. In the interest of product improvement, Room 2211, Bank of China Tower, No.

Table of Contents