The featured SICK IO-Link inductive proximity sensor provides an analog value that changes in response to the distance and the metals used in the target. This engineering brief demonstrates that the sensor may be used to differentiate between the metal blocks shown in Figure 1 including copper, aluminum, brass, steel, and iron.
This demonstration brings life to the distance vs material charts found in many proximity sensor data sheets. This introduction to prox sensors contains a representative chart.
Please refer to the prerequisite article that describes how to retrieve the analog value from the SICK proximity sensor. There you will find the equipment setup for the SICK 1079295 proximity sensor with an emphasis on the Siemens S7-1200 PLC and an ET 200SP distributed I/O. We pick up where the proximity sensor’s analog value is processed by the Decode_Prox_Sensor block.
This article is part of the DigiKey Field Guide for Industrial Automation
Location: Understand It → Sensors
Difficulty:
Engineer — difficulty levels explained
Author: Aaron Dahlen | MSEE | Senior Applications Engineer, DigiKey
Last update: 03 Nov 2026
Figure 1: Image of the SICK proximity sensor with a variety of metal cubes.
Tech Tip: SICK is careful not to associate the analog value with distance. After all, the featured proximity sensor is not a precision distance sensor. As demonstrated by the metal cubes, any measurement with an inductive proximity sensor depends on distance as well as the type of metal used in the target.
Yet, we are free to use the sensor outside of what SICK presents in the data sheets.
Empirically Selected Values
Using the method described in the prerequisite article, the raw analog value was recorded for each cube. Each measurement was taken by directly placing the proximity sensor on the center of a cube face.
| Metal | Empirically determined analog value |
|---|---|
| Copper | 835 |
| Aluminum | 590 |
| Brass | 366 |
| Steel | 86 |
| Iron | 22 |
Note that a no target condition (air) measures approximately 8500.
Limitations
Variations were observed in the readings. This was especially true of the copper. Its reading changed over time, it was sensitive to probe placement, and the reading changed in response to the cube face presented to the sensor. This last effect could simply be related to the smoothness of the cube’s face. For example, the difference between a smooth manufactured face and a sawn face.
A tolerance of +/- 20 was chosen for the simple structured text code as shown in Listing 1. This was acceptable for the metals with the lower readings (brass, steel, and iron) but problematic for the copper and aluminum. Going forward, I would open the window for copper and aluminum to +/- 75 while leaving the tolerance value at +/- 20 for brass, steel, and iron. Obviously, Listing 1 would need additional attention.
Metal Detection Function Block
The function block to differentiate between the five metal cubes is shown in Figure 2. In this case, I have chosen to pass the empirical values as well as the delta (tolerance) to the input of the block. The structured text included in Listing 1 is a straightforward ELSIF structure.
Figure 2: TIA Portal block in debug mode showing the presence of brass.
// Default assignment
#xMaterialRecognized := FALSE;
#strmaterialType := 'Unrecognized';
IF ABS(#intInput - #intCopper) <= #intDelta THEN
#xMaterialRecognized := TRUE;
#strmaterialType := 'Copper';
ELSIF ABS(#intInput - #intAluminium) <= #intDelta THEN
#xMaterialRecognized := TRUE;
#strmaterialType := 'Aluminium';
ELSIF ABS(#intInput - #intBrass) <= #intDelta THEN
#xMaterialRecognized := TRUE;
#strmaterialType := 'Brass';
ELSIF ABS(#intInput - #intSteel) <= #intDelta THEN
#xMaterialRecognized := TRUE;
#strmaterialType := 'Steel';
ELSIF ABS(#intInput - #intIron) <= #intDelta THEN
#xMaterialRecognized := TRUE;
#strmaterialType := 'Iron';
END_IF;
Listing 1: Structured text code used to determine the cube type.
Tech Tip: Data types matter.
For example, consider the subtraction in
ABS(#intInput - #intCopper)which can produce a negative number. TheABSfunction then returns the magnitude. You will notice that it uses typeintas opposed to typeuint. With typeuintthe code will fail as there an be no negative number passed to theABSfunction. Specifically,(#uintInput - #uintCopper)is not promoted to typeintin TIA Portal. Instead, we use(#intInput - #intCopper)so that theABSfunction operates as expected. Note the use of Hungarian notation prefixesintanduintto clarify the data types.
Continue Exploring Industrial Control Systems
If this discussion was helpful, you may also want to explore:
DigiKey Navigation
- Full Catalog: Industrial Control & Automation
Related Foundational Articles
Getting Started with the Siemens ET 200SP Distributed I/O
Distributed Intelligence in an IO-Link System
Understanding the IO-Link I/O Device Description (IODD) File
About This Author
Aaron Dahlen, LCDR USCG (Ret.), is a Senior Applications Engineer at DigiKey in Thief River Falls. His background in electronics and industrial automation was shaped by a 27-year military career as both technician and engineer, followed by over a decade of teaching.
Dahlen holds an MSEE from Minnesota State University, Mankato. He has taught in an ABET-accredited electrical engineering program, served as coordinator of an electronic engineering technology program, and instructed military technicians in component-level repair.
Today, he has returned to his home in northern Minnesota, completing a decades-long journey that began with a search for capacitors. Read his story here.

