Increase sampling frequency in master-slave system?
1 次查看(过去 30 天)
显示 更早的评论
I have a master-slave system. The master is communicating with the PC via UDP protocol, the slave is communicating through a serial port (rs232). My aim is to read the data from the master and send it to the slave, so I am using the MATLAB functions fread and fwrite in the appropriate objects (one is udp, one is serial). My problem is that I can't seem to get the sampling frequency better than 10 Hz, which gives a bandwidth of 5 Hz (due to Nyquist theorem), and I think this is very low. I would like to increase the sampling frequency, but in the profiler it says that the most time is spent in the fread functions I call in the code (and that's inevitable!), so I don't know how to solve this issue. Any suggestions?
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!