Skip to main content
Skip table of contents

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 NameData TypeDefault ValueDescription

baudrate

int

115200

Baud rate

2400, 4800, 9600, 19200, 38400, 57600, 115200 etc

bytesize

int

8

Number of data bits

  • DR_FIVEBITS : 5
  • DR_SIXBITS : 6
  • DR_SEVENBITS : 7
  • DR_EIGHTBITS : 8

parity

str

"N"

Parity checking

  • DR_PARITY_NONE: "N"
  • DR_PARITY_EVEN: "E"
  • DR_PARITY_ODD: "O"

stopbits

int

1

Number of stop bits

  • DR_STOPBITS_ONE =1
  • DR_STOPBITS_TWO = 2

Return

ValueDescription

0

Successful connection

Negative value

Fail to connection

Exception

ExceptionDescription

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.