Borrar filtros
Borrar filtros

How to disconnect serial port with the port name

6 visualizaciones (últimos 30 días)
광춘
광춘 el 2 de Ag. de 2023
Respondida: Dhruv el 31 de Ag. de 2023
Hi
I'm using MATLAB to connect with serial port.
I wanted to disconnect serial port when my code ends with error, and i tried many ways but those didn't work at all.
There are some problems.
  1. MATLAB memory holds connection with serial port when code ends unsuccesfully.
  2. When I try to connect with the port, I fail to connect with seiral port because MATLAB still holds serial port.
  3. The object which I used to connect with port dosen't exist when code ends.
  4. Moreover, I'm using additional '.dll' file so fclose() command dosen't work.
So I'm asking if there is any way to disconnect the serial port?
I know the name of the port, so I want to disconnect the serial port by using its name.
Thanks

Respuestas (1)

Dhruv
Dhruv el 31 de Ag. de 2023
I understand that you're facing issues with disconnecting a serial port in MATLAB, especially when your code ends with an error. You may want to refer to the link where I’ve provided a similar approach for the issue:

Categorías

Más información sobre Clocks and Timers en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by