Sequential opening or closing of serial ports in single flow line