Struggling to receive the correct data from a IR Sensor. Help please...

It looks like pin 6 is just a shield - an extra case ground.
From the datasheet, it looks like the detection distance is fixed.