SerialOpen()
All internal buffers in the SDM‑SIO2R will be flushed when this instruction is called, resulting in the loss of any data that might have been in them at that point in time.
-
COMPort
The
COMPort
numbers are defined in SDM address settings. COM port numbers in the range of 32 to 47 are reserved for use with the SDM‑SIO2R. -
BaudRate
This parameter is used to set up the SDM‑SIO2R baud rate as you would with any RS‑232 interface. However, the SDM‑SIO2R does not support automatic baud rate recognition. Instead, setting the rate to a negative number sets the automatic flow control system (RTS/CTS). This system is discussed in greater detail in Using RTS/CTS and automatic handshaking.
For RS-485 Full Duplex Mode, if a negative baud rate is specified, the client device continuously drives the transmit line. In contrast, with a positive baud rate, the client lets the transmit line float between transmissions to conserve power.
-
SerialOpenFormat
This parameter sets the data format. It also determines whether the SDM‑SIO2R works in normal RS‑232, listen-only RS‑232, full-duplex RS‑485, or half-duplex RS‑485 mode as defined in the following tables.
Communications port parameters RS-232 |
|||
---|---|---|---|
SerialOpenFormat |
Parity |
No. stop bits |
No. data bits |
0 |
None |
1 |
8 |
1 |
Odd |
1 |
8 |
2 |
Even |
1 |
8 |
3 |
None |
1 |
8 |
4 |
Not used |
||
5 |
Odd |
2 |
8 |
6 |
Even |
2 |
8 |
7 |
None |
2 |
8 |
8 |
Not used |
||
9 |
Odd |
1 |
7 |
10 |
Even |
1 |
7 |
111 |
None |
1 |
7 |
12 |
Not used |
||
13 |
Odd |
2 |
7 |
14 |
Even |
2 |
7 |
15 |
None |
2 |
7 |
Communications port parameters RS-485 full duplex |
|||
---|---|---|---|
SerialOpenFormat |
Parity |
No. stop bits |
No. data bits |
16 |
None |
1 |
8 |
17 |
Odd |
1 |
8 |
18 |
Even |
1 |
8 |
19 |
None |
1 |
8 |
20 |
Not used |
||
21 |
Odd |
2 |
8 |
22 |
Even |
2 |
8 |
23 |
None |
2 |
8 |
24 |
Not used |
||
25 |
Odd |
1 |
7 |
26 |
Even |
1 |
7 |
271 |
None |
1 |
7 |
28 |
Not used |
||
29 |
Odd |
2 |
7 |
30 |
Even |
2 |
7 |
31 |
None |
2 |
7 |
Communications port parameters RS-485 half duplex |
|||
---|---|---|---|
SerialOpenFormat |
Parity |
No. stop bits |
No. data bits |
48 |
None |
1 |
8 |
49 |
Odd |
1 |
8 |
50 |
Even |
1 |
8 |
51 |
None |
1 |
8 |
52 |
Not used |
||
53 |
Odd |
2 |
8 |
54 |
Even |
2 |
8 |
55 |
None |
2 |
8 |
56 |
Not used |
||
57 |
Odd |
1 |
7 |
58 |
Even |
1 |
7 |
591 |
None |
1 |
7 |
60 |
Not used |
||
61 |
Odd |
2 |
7 |
62 |
Even |
2 |
7 |
63 |
None |
2 |
7 |
Communications port parameters RS-232 receive-only mode |
|||
---|---|---|---|
SerialOpenFormat |
Parity |
No. stop bits |
No. data bits |
64 |
None |
1 |
8 |
65 |
Odd |
1 |
8 |
66 |
Even |
1 |
8 |
67 |
None |
1 |
8 |
68 |
Not used |
||
69 |
Odd |
2 |
8 |
70 |
Even |
2 |
8 |
71 |
None |
2 |
8 |
72 |
Not used |
||
73 |
Odd |
1 |
7 |
74 |
Even |
1 |
7 |
751 |
None |
1 |
7 |
76 |
Not used |
||
77 |
Odd |
2 |
7 |
78 |
Even |
2 |
7 |
79 |
None |
2 |
7 |