Can an analog inductive proximity sensor be used to discriminate between different types of metal (aluminum and steel)?
Figure 1. IFS258 proximity switch wiring diagram.


  I am using an analog inductive proximity sensor (NPN) ...


NPN means that there is an NPN transistor on the output. The transistor will either be off (below sensing threshold) or on (above sensing threshold). There is no analog reading available from that switch. It is not suitable for your application.



Figure 2. Sensing range for various materials relative to a reference target.

If you have a look at the switch Info Card they give the sensing range for various materials versus a reference target. You can see that for Al it is about 35% relative to the reference (most likely steel - check for yourself).

This gives you some hope for your application if your robot can measure the distance at which the material is sensed by moving the sensor or target from full contact with the sensor back to where the sensor turns off.



These sensors are intended for industrial applications and generally used to detect that a tool or mechanism is "in-position" or not. The sensing range in these applications gives a measure of the clearance required between the sensor face and the part being detected. A typical sensor might have a 4 mm range on steel but from Figure 2 we can see that we would need to move to 4 x 0.35 = 1.4 mm to sense an aluminium target. 

Be aware that some sensors require a metal-free zone around the head while others can work when flush with a metal surface. The datasheet should have all this information.