**CIGAL Reference Manual, Chapter 3 (Functions): comread** ===== Comread -- Read from serial communication port ===== **usage: vdst = comread(chan,nchars,flag)** Read byte data from a serial input port. CHAN must be 1 or 2. NCHARS is the maximum number of bytes to read; if NCHARS is 0, all the bytes currently in the buffer are read. FLAG can be used to specify reading options (its default value is 0). FLAG options: 1 - wait until NCHARS characters have been read otherwise reads current available data up to NCHARS bytes 2 - return current byte count only (don't read data) NOTE: The serial input port must be configured before it is read. To configure the port you load the configuration bit-flag into the COM1 (or COM2) number variable (see [[jvs:cigal:manual:chapter4:com1|COM1(4)]]). **See Also:**\\ [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter3|Functions List]], [[jvs:cigal:manual:help|Manual Help]]