Clear Filters
Clear Filters

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

1 view (last 30 days)
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.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!