
Chapter 12 Device Logic (Pawn)
12.3.6.3 Functions
native RS232_Init(rs232, baudrate, mode, funcidx);
Initialises the RS232 interface
Parameter
Explanation
rs232
Number of the RS232 interface; is always 0 for the myDatalogEASY IoTmini
Note:
You can also use the predefined constant "RS232_ITF1" for this
parameter.
baudrate
Baud rate to be used. Observe the valid limits for the device being used (see
"Technical details about the RS232 interface" on page 57).
mode
Bit 0...1
1 = 1 stop bit
2 = 2 stop bits
Bit 2...3
0 = no parity
1 = uneven parity
2 = even parity
Bit 4...5
0 = 7 data bits
1 = 8 data bits
Bit 6...7
0 = no flow control
1 = RTS/CTS handshake
Bit 8
0 = full duplex mode
1 = half duplex mode
Note:
You can also use the predefined constants for this parameter (see
"Configuration of the RS232 interface" in the chapter "Constants" on page 105).
The constants can also be combined using the "or" conjunction.
funcidx
Index of the public function for the RS232 character receipt
Type of function: public func(const data{}, len);
Explanation
Return value
l
OK, if successful
l
ERROR_FEATURE_LOCKED, if the specified interface on the device is
not released
l
< OK, if another error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 84).
Rev. 01
107