Reading data continuously in MATLAB via ethernet from board

4 views (last 30 days)
Hi, we are working on project in which we have to read data in MATLAB application continuously from embedded board via tcpip, and also application should able to send data to board for modification. When I use MATLAB script I am writing message on tcpip port and sends it to board and for acknowledge purpose I am receiving data in MATLAB to verify, while reading data I am getting sometimes garbage values and warning message as
And also I am not able to read data continuously, when I read data single time then I am getting data, but when I try to read data in loop(while or for) I it is not working. Also I have check whether data is sent successfully from board to MATLAB is correct but I am getting BytesAvailable for port as 0.
I also try to set Terminator(LF or CR) and also tried to set Timeout but I am same facing same issue as above.
Also tried different functions for reading data in MATLAB fscanf(t,'%s'),fgetl(t),fread(t) but still warnings are there.
I have attached small MATLAB script performing this activity.
For cross checking it, I have tried this using python, I am getting proper data via tcpip.
Please anyone can tell me why I am getting these warning messages and how can I read data in continuous way?
Regards

Answers (0)

Categories

Find more on Application Deployment in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!