●For data transmission to be effective it is necessary to match the communication format between the product and the RS232C device, such as Baud rate and parity.
Communication format D8120 (bit mapping)
Bit | Description | 0(OFF) |
| 1(ON) | ||
b 0 | Data length | 7bit |
| 8bit | ||
b 1 |
| (00) | : None | |||
Parity | (01) | : Odd | ||||
b 2 |
| |||||
|
| (11) | : Even | |||
|
|
| ||||
b 3 |
| Stop | 1bit |
| 2bit | |
|
|
| (0011) | : | 300 | |
b 4 |
| (0100) | : | 600 | ||
b 5 | Baud rate | (0101) | : | 1,200 | ||
b 6 | (0110) | : | 2,400 | |||
(bps) | ||||||
(0111) | : | 4,800 | ||||
b 7 |
| |||||
| (1000) | : | 9,600 | |||
|
|
| ||||
|
|
| (1001) | : 19,200 |
Bit | Description | 0(OFF) | 1(ON) | |
b 8 | Header | None | D8124 *1 | |
b 9 | Terminator | None | D8125 *2 | |
b10 | Control line | None | H/W | |
b11 | Mode | Ordinary | Single line | |
(Control line) | mode | mode | ||
| ||||
b12 |
|
|
| |
b13 | Not used | - - - | - - - | |
b14 | ||||
|
|
| ||
b15 |
|
|
|
*1 The default value is STX (02H: changeable).
*2 The default value is ETX (03H: changeable).
●The communication format is set by special data register D8120.
Setting the communication format using D8120 is effective only at the time the RS instruction is driven, and therefore any change after driving is not actually accepted.
●An example of setting D8120 is shown below.
M8002 [MOV H138F D8120]
Setting input
b15 | b0 |
H138F= 0001 0011 1000 1111(binary) The settings for the above program are as right.
Data length | 8 bit |
Parity | Even |
Stop | 2 bit |
Baud rate | 9,600 |
Header | Used |
Terminator | Used |
Control line | H/W |
Mode | Ordinary mode |
●The control line is set by b10.
b10 = 0 :No hardware handshaking.Send and receive are controlled by software protocol.
b10 = 1 :Hardware handshaking.Signal lines ER(DTR)and DR(DSR)are used to control send and receive of data.
|
| When sending |
b 10 | 1 | Pin No. |
b 11 | 0 | SD(TXD) |
|
|
H/W.
Ordinary ER(DTR) mode
DR(DSR)
b 10 | 1 | Pin No. |
b 11 | 1 | SD(TXD) |
|
|
H/W.
Single line RD(RXD) mode
ER(DTR)
|
| When receiving |
|
|
|
| Pin No. |
|
|
Send | Data | RD(RXD) | Receive | Data |
|
|
ER(DTR)
DR(DSR)
Send
Data
Receive
Data