omron — Serial Line I/O

Serial Line I/O Input Processing Input data is received by eV+ according to the byte format specified by the I/O configuration program. The size of the buffer can be set with the ACE software Controller Configuration Tools. Data errors such as parity or framing errors are also buffered and are returned in the proper order. The possible data errors from the serial input lines are: -522 *Data error on device* A data byte was received with incorrect parity, or the byte generated a framing error. -524 *Communications overrun* Data bytes were received after the input buffer was full, or faster than eV+ could process them.

-526 *No data received* If data is expected, continue polling the serial line. -504 *Unexpected end of file* A BREAK was received from the remote device. Serial line input data is normally read using the GETC function, since it allows the most flexible response to communications errors. The READ instruction also can be used provided that input data is terminated by a Line-Feed character (10 decimal). eV+ does not support input echoing or input line editing for the serial lines. Output Processing All serial line output is performed using the WRITE instruction. All binary data (including NULL characters) is output without conversion.

If the serial line is configured to support parity, a parity bit is automatically appended to each data byte. By default, the WRITE instruction appends a Return character (13 decimal) and a Line-Feed character (10 decimal) to each data record unless the /S format control is specified in the instruction parameter list. If output flow control is enabled and output has been suspended by a Ctrl+S character from the remote device, a WRITE request may wait indefinitely before completing. Serial I/O Examples The first example attaches to a serial line and performs simple WRITEs and READs on the line: eV+Language User's Guide, v2.x, 18318-000 Rev A Page 153