# Identifying Different Metals Using an IO-Link Inductive Proximity Sensor

**URL:** <https://forum.digikey.com/t/identifying-different-metals-using-an-io-link-inductive-proximity-sensor/73217>\
**Category:** Sensors Transducers\
**Tags:** field-guides, sick-inc, proximity-sensors\
**Created:** [November 3, 2026, 10:26pm UTC](https://forum.digikey.com/t/identifying-different-metals-using-an-io-link-inductive-proximity-sensor/73217 "2026-11-03T22:26:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![APDahlen](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/apdahlen/32/40191_2.png) [@APDahlen](https://forum.digikey.com/u/APDahlen)\
**Post date:** [November 3, 2026, 10:26pm UTC](https://forum.digikey.com/t/identifying-different-metals-using-an-io-link-inductive-proximity-sensor/73217/1 "2026-11-03T22:26:16Z")

</div>

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](https://forum.digikey.com/t/introduction-to-the-inductive-proximity-sensor/42679) contains a representative chart.

Please refer to the [prerequisite article](https://forum.digikey.com/t/you-don-t-always-need-to-import-the-iodd-file-for-io-link/73034) 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](https://www.digikey.com/en/products/detail/sick-inc/1079295/21760090) 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](https://forum.digikey.com/t/field-guide-for-industrial-automation-and-control/65993)

**Location** : [Understand It](https://forum.digikey.com/t/field-guide-to-industrial-automation-and-control/65993#p-125826-understand-it-4) → Sensors  
**Difficulty** : ⚙ Engineer — [difficulty levels explained](https://forum.digikey.com/t/difficulty-levels-used-industrial-control-field-guide/66209)  
**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.](https://global.discourse-cdn.com/digikey/original/3X/8/e/8eceb94ad55979353a3b7137f6cb7192a3232750.jpeg)

**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](https://forum.digikey.com/t/you-don-t-always-need-to-import-the-iodd-file-for-io-link/73034), 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.](https://global.discourse-cdn.com/digikey/original/3X/b/5/b54256b6ee16b0f1267c84eda5707029a58b657f.png)

**Figure 2** : TIA Portal block in debug mode showing the presence of brass.

```auto
// 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. The `ABS` function then returns the magnitude. You will notice that it uses type `int` as opposed to type `uint`. With type `uint` the code will fail as there an be no negative number passed to the `ABS` function. Specifically, `(#uintInput - #uintCopper)` is not promoted to type `int` in TIA Portal. Instead, we use `(#intInput - #intCopper)` so that the `ABS` function operates as expected. Note the use of Hungarian notation prefixes `int` and `uint` to 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](https://www.digikey.com/en/products/category/industrial-automation-and-controls/34)

### 🔰 Related Foundational Articles

- 🔧 [Getting Started with the Siemens ET 200SP Distributed I/O](https://forum.digikey.com/t/getting-started-with-the-siemens-et-200sp-distributed-i-o/60316/1)
- 🏛 [Distributed Intelligence in an IO-Link System](https://forum.digikey.com/t/distributed-intelligence-in-an-io-link-system/67427)
- ⚙ [Understanding the IO-Link I/O Device Description (IODD) File](https://forum.digikey.com/t/understanding-the-io-link-io-device-description-iodd-file/41983/1)

## 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.](https://forum.digikey.com/t/from-radios-to-microcontrollers-my-digikey-journey/57654)
