GEM80-500 Series Controller
4. Serial Communications
(08/04)
GEM80-500 Technical Manual (T2025En)
Page 4-3
4.4
Operation as a Printer/Keyboard Port
Table 4-2 shows the P-table data used to configure each GEM
80-500 Controller Serial
Port as a Printer/Keyboard Port.
Table 4-2
Configuring a Printer Port: P-table data
Port 1
Port 2
Port 3
Port 4
Contents
P10
P30
P110
P130
Baud rate (110 to 19,200)
P11 P31 P111 P131 0
P12
P32
P112
P132
0 = Printer Mode
1 = Terminal Mode
2 = Free Format Mode
P13
P33
P113
P133
Number of characters per line (1 to 132)
P14
P34
P114
P134
Number of padding characters (1 to 131)
P15 P35 P115 P135 Parity
Enable
0 = 8 data bits no parity bit
1 = 7 data bits plus 1 parity bit
2 = 8 data bits plus 1 parity bit
P16 P36 P116 P136 Parity
Select
0 = Even parity
1 = Odd parity
P17 P37 P117 P137 Not
used
The Printer/Keyboard Port can operate in either 'Direct Mode', 'Terminal Mode' or in
'Free Format Mode'.
Note...
This port will operate in all controller operating states, i.e. halted, running,
normal input and test inputs.
4.4.1 Direct
Mode
This mode is intended for use with a printer and a separate serial input device, such as
a matrix keyboard. The port has two cyclic buffers, one for input and one for output.
Data can only be written to the output buffer, and read from the input buffer, by means
of GEM
80 Special Functions. You cannot otherwise access these buffers from your
ladder diagram program. All characters received from the keyboard are directly
transferred to the input cyclic buffer as they arrive. The only exception is that, if parity is
enabled, any character with a parity error is replaced by @FF. Output data is taken
from the output cyclic buffer after the previous output has finished. However,
transmission does not commence until an ETX (@03) character or an end-of-line
marker is found. An end-of-line marker is transmitted as carriage-return (@0D),
line-feed (@0A), plus any user defined quantity of NUL (@00) characters. An ETX
character is not itself transmitted, but simply initiates output from the cyclic buffer,
allowing partial lines to be output.
Note...
Many printers do not print any characters until a carriage-return or line-feed is
received.