Mediates the exchange of external hexose 6-phosphate and internal inorganic phosphate. External glucose-6-phosphate induces the expression of the UHP-region. Belongs to the major facilitator superfamily. Organophosphate:Pi antiporter (OPA) (TC 2.A.1.4) family.