Automated potentiometric analysis with selective electrodes