**CIGAL Reference Manual, Chapter 6 (RealTime): r_pread** ===== r_pread -- Read byte data from an external input port ===== ** usage: r_pread opflg eflag ltime Databuf chan [ nchars flag]** Read byte data from an external serial or parallel port. CHAN value 100 is printer parallel port, lower values are serial ports (1=COM1, 2=COM2, etc.). 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: Serial input ports must be configured before being read. To configure the port you should load the configuration bitflag into the COM1 (or COM2) number variable (see COM1[4]). **See Also:**\\ [[jvs:cigal:manual:chapter6:r_pwrite|r_pwrite]], [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter6|RealTime List]], [[jvs:cigal:manual:help|Manual Help]]