flange_serial_open(baudrate=115200, bytesize=DR_EIGHTBITS, parity=DR_PARITY_NONE, stopbits = DR_STOPBITS_ONE)
Features
A command used for opening the Pseudo Flange Serial communication port.
The characteristics of pseudo flange serial communication are different from normal serial communication. Therefore, handshaking communication is recommended. (e.g., modbus RTU) Due to the internal buffer size limit (255bytes) and internal delay, overflow may occur when used in sensors, etc.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
baudrate | int | 115200 | Baud rate 2400, 4800, 9600, 19200, 38400, 57600, 115200 etc |
bytesize | int | 8 | Number of data bits
|
parity | str | "N" | Parity checking
|
stopbits | int | 1 | Number of stop bits
|
Return
Value | Description |
---|---|
0 | Successful connection |
Negative value | Fail to connection |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |