function sout=open_com(comport) % % Function used to prepare a COMport for communication with the TDS220 scope % Input: % comport is a string containing the name (either 'COM1' or 'COM2') to be used. % Output: % returns the serial port object associated with the open port. % % Copyright 2002, LJB Development, Inc. % written by Larry Busse, http://www.ljbdev.com % Software is provided without warranty. Use at your own risk. if nargin <1, comport='COM1';end sout = serial(comport, 'BaudRate', 9600,... 'FlowControl','hardware',... 'Terminator','LF',... 'Parity','none'); set(sout,'InputBufferSize',5100); %Enough for 2500*sizeof(int16) + extras fopen(sout);