Implemented range selection properly for multi-range DC power supplies