Purchase an industrial ultrasonic sensor (uses sound waves) with a range long enough to bounce from the top of the bin down to the lowest possible level of the material, or at least the lowest level that you care to measure. Be sure to select an ultrasonic sensor with an analog output. Be aware that all ultrasonic sensors have a "blind zone" beginning at the face of the sensor and extending to various distances away. For this reason, the material to be measured should never be allowed to enter this "blind zone" because accurate measurement cannot take place in this range. Also note that ultrasonic sensors are affected by drastic changes in temperature and may need to be re-calibrated occasionally.
Install the ultrasonic sensor in the top of the bin pointing downward so that it faces the material in the bin. The analog output from the sensor will need to interface with the PLC or computer so that the reading may be interpreted and any necessary functions may take place when the level reaches certain points.
Empty the bin and take note of the output from the sensor. Then, fill the bin to the maximum desired level and take another reading from the sensor. Now you have your high and low margins. You can program certain things to happen when the material hits a certain level, for instance, when the level of water in a bin reaches the top, the pump that supplies the water shuts off until the water is lowered again to another predetermined level.
Related products and information
Ultrasonic sensors for level control