Is there a way to decrease the time of fopen, or is there an alternative command for opening com ports?

1 次查看(过去 30 天)
Hello,
I read data from different devices connected via usb to the computer running matlab. I use the serial command for defining the different connections with their respected com ports. Then I need in the ideal case before and after each time I use fscanf(serial) to get the data to open and close the come ports. Currently I am using fopen(serial) and fclose(serial). My problem is though that for one of the devices fopen can take up to 2 sec with no consistency. Is there a way that I could decrese the time it requires? Or is there alternatively some other command I could use to open and close the different com ports?
I should also mention that all the external instruments we connect to usually connect to some kind to terminal program and just continuously outputs data. So it is necessary that we open and close the com ports between readings.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by