Skip to main content
Skip table of contents

serial_state(ser)

Featuers

This function returns the status of a serial communication port.

Parameters

Parameter Name
Data Type
Default Value
Description

ser

serial.Serial

-

Serial instance

Return

Value
Description

1

Serial port opened

0

Serial port closed

Exception

Exception
Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

Example

PY
ser = serial_open(port="COM", baudrate=115200, bytesize=DR_EIGHTBITS, 
        parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)
 
state = serial_state(ser)
 
serial_close(ser)
JavaScript errors detected

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

If this problem persists, please contact our support.