omron — Serial Line I/O

Serial Line I/O Serial Line I/O The eV+ controller has several serial lines that are available for general use. This section describes how these lines are used for simple serial communications. I/O Configuration In addition to selecting the protocol to be used, the controller configuration program allows the baud rate and byte format for each serial line to be defined. Once the serial line configuration is defined on the eV+ system boot disk, the serial lines are set up automatically when the eV+ system is loaded and initialized. The following byte formats are available:

l Byte data length of 7 or 8 bits, not including parity l One or two stop bits l Parity disabled or enabled l Odd or even parity (adds 1 bit to byte length) The following baud rates are available: 110, 300, 600, 1200, 2400, 4800, 7200, 9600, 19200, 38400 In addition, eV+ provides automatic buffering with optional flow control for each serial line. The I/O configuration program can be used to enable output flow control with which eV+ recognizes Ctrl+S (19 decimal) and Ctrl+Q (17 decimal) and uses them to suspend and resume, respectively, serial line output.

The configuration program can also enable input flow control, with which eV+ generates Ctrl+S and Ctrl+Q to suspend and resume, respectively, input from an external source. With Ctrl+S and Ctrl+Q flow control disabled, all input and output is totally transparent, and all 8-bit data bytes can be sent and received. Serial lines may also be configured to use hardware modem control lines for flow control. (The RTS/CTS lines must be installed in the modem cable-standard modem cables often leave these lines out.) For pin assignments, see the documentation on serial I/O connectors in the SmartController EX User's Guide.

Attaching/Detaching Serial I/O Lines Serial lines must be attached before any I/O operations can take place. Note that only one control program task can be attached to a single serial line at any one time. All other attachment requests will queue or fail, depending on the setting of the mode parameter in the ATTACH program instructions. Attaching or detaching a serial line automatically stops any output in progress and clears all input buffers. Serial lines are not automatically detached from a program unless it completes with success, so it is possible to single-step through a program or proceed from a PAUSE instruction without loss of data.

eV+Language User's Guide, v2.x, 18318-000 Rev A Page 152