Hardware interface between headstages and a computer