ADwin-Gold II
, Manual February 2013
165
RSxxx interface
RS_Init
ADwin
RS_Init
RS_Init
initializes one RSxxx interface.
The following parameters are set:
•
Transfer rate in Baud
•
Use of test bits
•
Data length
•
Amount of stop bits
•
Transfer protocol (handshake)
Syntax
#Include
ADwinGoldII.inc / GoldIITiCo.inc
RS_Init
(
interface
,
baud
,
parity
,
bits
,
stop
,
handshake
)
Parameters
Notes
RS_Init
is necessary before working first with the selected RSxxx in-
terface, in order to set the interface parameters. They must be identical
to the remote station, in order to verify a correct transfer.
The initialization is necessary after you have executed a hardware reset
with
RS_Reset
.
If transfer protocol RS485 is set, the transfer direction must be set, too
(with
RS485_Send
).
You find a list of standard baud rates on
See also
,
,
Valid for
Gold II-CAN
T11 TiCo
interface
Number of RSxxx interface (1, 2), which is to be
initialized.
LONG
baud
Transfer rate in Baud:
RS232: 35 … 115,200
RS485: 35 … 2,304,000
LONG
parity
Use of test bits:
0: without parity bit.
1: even parity.
2: odd parity.
LONG
bits
Amount of data bits (5, 6, 7 or 8).
LONG
stop
Amount of stop bits.
0: 1 stop bit.
1: 1½ stop bits at 5 data bits;
2 stop bits at 6, 7 or 8 data bits.
LONG
handshake
Transfer protocol:
0: RS232, No handshake.
1: RS232, Hardware handshake (RTS/CTS).
2: RS232, Software handshake (Xon/Xoff).
3: RS485 (default).
LONG