The SERIAL_CONF
structure contains configuration information about the serial line port. It contains these variables:
Variable |
Type |
Description |
---|---|---|
|
|
baud rate |
|
|
minimum time (in ms) between 2 frames in Modbus (RTU, ASCII) |
|
|
In the ASCII protocol, |
|
|
In the ASCII protocol, |
|
|
0: Modbus RTU or Machine Expert (see |
1: Modbus ASCII |
||
2: ASCII |
||
|
|
Modbus address 0 to 255 (0 for Master) |
|
|
0: none |
1: odd |
||
2: even |
||
|
|
0: RS232 |
1: RS485 |
||
|
|
0: no |
1: yes |
||
|
|
7 bits or 8 bits |
|
|
1: 1 stop bit |
2: 2 stop bits |
||
|
|
In the ASCII protocol, 0 means there is no start character in the frame. Otherwise, the corresponding ASCII character is used to detect the beginning of a frame in receiving mode. In sending mode, this character is added at the beginning of the user frame. |
|
|
In the ASCII protocol, 0 means there is no end character in the frame. Otherwise, the corresponding ASCII character is used to detect the end of a frame in receiving mode. In sending mode, this character is added at the end of the user frame. |
|
|
In the ASCII protocol, 0 means there is no second end character in the frame. Otherwise, the corresponding ASCII character is used (along with |
|
|
0: Modbus RTU |
1: Machine Expert (when |
||
|
|
not used |