A control system for trapped-ion experiments