Object recognition sensor O2D22x 1 Preliminary note 1.1 Symbols used ► Instruction > Reaction, result […] Designation of pushbuttons, buttons or indications → Cross-reference Important note Non-compliance can result in malfunction or interference Information Supplementary note 2 Safety instructions These instructions are part of the device . They contain information and illustrations about the correct handling of the device and must be read before installation or use .
Object recognition sensor O2D22x 5 Installation 5.1 Mounting accessory The device is compatible with the mounting accessories of ifm's photoelectric sen- sors for the O2Ixxx (multicode reader), O2Mxxx (EthernetCamera) series etc . Example mounting with clamp and bracket ► Use the mounting accessory E2D101 . 1 .
Object recognition sensor O2D22x Description Art. no. Shaft, straight Ø 14 mm, length 130 mm, M12 E20939 Shaft, angled Ø 14 mm, length 200 mm, M12 E20941 You can find more information about the available accessories at: → Data sheet search → e.g. O2D220 → Accessories www .ifm .com or directly →...
Object recognition sensor O2D22x 6 Electrical connection NOTE The unit must be connected by a qualified electrician . ► Disconnect power before connecting the unit . NOTE The voltage on pins 2, 4, 5, 6, 7 and 8 must not exceed the supply voltage on pin 1 (U+) .
Object recognition sensor O2D22x ► For PNP units (e .g . O2D220) use trigger sensors, illumination units and control- lers with PNP inputs and outputs . ► For NPN units (e .g . O2D227) use trigger sensors, illumination units and con- trollers with NPN inputs and outputs .
Object recognition sensor O2D22x 6.5 Timing diagrams 6.5.1 Inputs/outputs Example: Triggering positive edge Trigger input Trigger signal 0: no action 1: triggering on positive edge READY output Ready signal 0: unit busy, OUT output not valid 1: unit ready for trigger signal, OUT output valid OUT output, Object evaluation 0: object evaluation not successful...
Page 11
Object recognition sensor O2D22x The evaluation time t depends on ● the size of the field of view selected ● the model size ● the smoothing degree ● the sensitivity ● the orientation ● the number of models Typical evaluation times are between 50 and 800 ms . The pulse length t can be set between 100 ms and 2000 ms via the PC user program .
Object recognition sensor O2D22x 6.5.2 Static selection of the application Up to 32 different inspection tasks can be stored in the sensor . With the corre- sponding unit configuration the first four applications can be selected via the two switching inputs . Input 2 Input 1 Application no.
Object recognition sensor O2D22x For the selection of the applications the monitoring time t and the trigger disable time t have to be taken into consideration . Monitoring time t : After a change in edges the external selection of the application does not start before the state of both switching inputs remains stable for 20 ms .
Object recognition sensor O2D22x 7 Operating and display elements MODE ENTER Active LED 3 x LED green Power (ready for operation display) Eth (Ethernet connection status) Con (connection status to the operating program (software)) Indication of the switching status; lights when the corresponding input or output is switched .
Object recognition sensor O2D22x 7.2.2 Connection via the operating program Display Description OnLI Connection with the operating program Parm Parameter setting via operating program Moni Monitor mode SerP Connection with the operating program, service report mode 7.2.3 Error messages Display Description FAIL Application not successful...
Object recognition sensor O2D22x 8 Set-up Set-up is carried out via a menu-guided PC operating program . The device stores up to 32 applications . 8.1 Parameter setting on the unit Set the parameter values via pushbuttons and display on the device . The sensor is programmed using the two buttons [Mode/Enter] and [Set] .
Object recognition sensor O2D22x 8.3 Adjustable parameters Memory location Select an application . The device can save up to 32 applications . By pressing the SET button the memory location number is incremented in the display . The current state of the memory location is visualised in the first digit of the display: F = memory location available I = memory location used by an inactive application...
Object recognition sensor O2D22x 9 Operation 9.1 Evaluation mode (normal operating mode) After power-on the device is in the evaluation mode . If an active application is saved on the device, it carries out its monitoring function and generates output si- gnals according to the set parameters .
Object recognition sensor O2D22x 11 Technical data 11.1 Operating distance L When selecting the operating distance it has to be taken into account that contour detection becomes less reliable with decreasing size of the objects . The objects to be detected should cover at least 5% of the field of view . For the operating di- stance L depending on the applications please see the following table .
Page 23
Object recognition sensor O2D22x Application settings Parameters Factory setting Models none Minimum match Contour tolerance width Number of models Orientation -10° . . . +10° (operating program) Device connection 4 Trigger output (with external illumination) Device connection 5 Switching output, function ready for trigger (Ready) Device connection 6 Switching output, function all models detected Device connection 7...
Object recognition sensor O2D22x 12 Process data protocol The process interface ensures communication between the process PC (e .g . PLC) and the device . A command from the process PC can for example activate trigger pulses, select applications or provide application results . 12.1 Configuring the process interface When the Ethernet interface is used, two protocols are available: TCP/IP and EtherNet/IP .
Object recognition sensor O2D22x 12.3 Protocol versions The device supports 4 different protocol versions with different message format . Version Format <contents>CR LF <ticket><contents>CR LF <ticket><length>CR LF<ticket><contents>CR LF <length>CR LF<contents>CR LF The replies by the device are preceded by length information; however, not the commands to the device .
Object recognition sensor O2D22x 12.5 Release trigger Command Type Action Reply Trigger was released, the device captures the image and evaluates it . ● Currently no application active . ● The device is busy with evaluation . ● The device is in an invalid state, e .g .
Object recognition sensor O2D22x 12.8 Activate/deactivate result output Command p <digit> Type Action Reply Successful execution ● No active application . ● <digit> contains incorrect value . ● The device is in an invalid state . Note <digit> is either 0 or 1 . 1 enables the result output .
Object recognition sensor O2D22x 12.10 Transmit the application data set to the device Command u <length><group><number><application data set> Type Action Reply Normal case Invalid length ● The device is in teach mode or in administrative mode . ● <application data set> is no valid application . ●...
Object recognition sensor O2D22x 12.12 Request the statistics from the device Command Type Request Reply <total><blank><good><blank><bad> Normal case No application active on the device . Note <total>: total number of evaluations . <good>: number of "good" evaluations . <bad>: number of "bad" evaluations . <blank>: individual blank .
Object recognition sensor O2D22x 12.15 Request the last result from the device Command Type Request Reply Message in result format Normal case → Chapter result message 12.20. ● Currently no application active . ● Application is being edited . ● No results availabe yet . Note none 12.16 Release trigger, evaluate captured image and result output via pro-...
Command Type Request Reply <manufacturer><t><article number><t><name><t><location><t><ip> <subnet mask><t><gateway><t><MAC><t><DHCP><t><port number> <manufacturer> IFM ELECTRONIC <article number> article designation and status, e .g . O2D220AC <name> sensor name as entered in the operating program <location> sensor location as entered in the operating program <ip>...
Object recognition sensor O2D22x 12.20 Result message The evaluation result can be provided in ASCII or binary format . The output format is set via the PC operating program . ASCI format In the ASCII mode the evaluation result is transmitted in the following format: <start><result><sc><match><sc><instances>[<sc><model info>][<sc><image info>]<stop>...
Page 33
Object recognition sensor O2D22x Binary format In the binary mode the evaluation result is transmitted in the following format: <start byte>< switching outputs><match><instances>[<model info>] Component Description <start byte> Start byte: 0x00 (1 byte) <switching outputs> Status of the switching outputs (SA) after the evaluation binary value (2 bytes, unsigned short) Format: Byte n = 0xXX...
Page 34
Object recognition sensor O2D22x Example binary output: ● Number of models: 2 ● Number of objects searched for per model: {2} ● Object detail output active: yes ● Number of objects found per model: {2} Output length: 27 bytes Output: 0x00 0x02 0x00 0xE0 0x03 0x02 0x00 0x01 0x00 0xF4 0x00 0x38 0x01 0x17 0x00 0xE0 0x03 0x01 0x00 0xF4 0x00 0x10 0x00 0x00 0x00 0xE7 0x03 Component...
Object recognition sensor O2D22x 12.21 Error codes from the device Definition SENSOR_NO_ERRORS Numeric value Description No errors Solution/Workaround – Definition SENSOR_NO_ACTIVE_CONFIG Numeric value 0100 Description No application is currently loaded in the sensor . Solution/Workaround Some commands need a current application . If this is not the case, an error occurs .
Page 36
Object recognition sensor O2D22x Definition SENSOR_OBJECT_IMAGE_INVALID Numeric value 1300 Description Internal fault during the image transmission from/to the sensor . Solution/Workaround Check which is the required image format and if all parameters for the results via TCP/IP are correct . In case of a problem during the transmission of information, check whether the information to be sent is correct .
Object recognition sensor O2D22x 13 Maintenance, repair and disposal ► Keep the lens window free from soiling . Soiling may considerably affect the reading result! ► To clean the lens window, do not use any detergents or solvents which might damage the front glass .