Equivalent time sampling in Matlab
古いコメントを表示
I am sending data from fpga (nios ii processor) to serial port and Matlab access the serial port and plot real time graph. The Nios II is 50MHz, so it has no issue to receive the data from fpga which is 50Hz
If the serial port receive rate is just 8Hz, but the data sent to serial port is 50Hz, what approach is Matlab using to plot the graph? Does it have anything to do with equivalent time sampling (ETS)? I could not find any links between Matlab and ETS, correct me if I am wrong.
Appreciate any inputs.. thank you
7 件のコメント
Walter Roberson
2015 年 7 月 24 日
What size is your sample? Depending on the operating system and hardware, MATLAB can be configured up past 256000 baud, 25600 bytes per second. An 8 Hz limitation would imply 3200 bytes per sample.
Data transfer rates beyond 9600 baud (960 bytes per second, 120 bytes per sample at 8 Hz) may require higher quality serial lines and hardware flow control.
want2know
2015 年 7 月 27 日
Walter Roberson
2015 年 7 月 27 日
MATLAB does not use equivalent time sampling by default. I do not know if any of the Mathworks supplied routines support ETS.
120 bytes per sample at 8 Hz is a matter of serial port rate. If your serial port rate is set to 46080 or higher, such as the standard rate 57600, then you would be able to read all 576 bytes at 8 Hz.
I do not find any uart() call in any of the MATLAB products.
want2know
2015 年 7 月 27 日
Walter Roberson
2015 年 7 月 27 日
Hz is not used to measure serial port receive rates: bits per second, or baud (symbols per second), are used to measure receive rates.
When RS232 signalling is used, each character transmitted requires a start bit and a stop bit. When the characters are 8 bits, that would require a total of 10 transmitted bits. If your receiver was operating at 8 Hz you would only be getting through 8/10 of a character per second, and would require about 12 minutes to transfer 576 characters.
The slowest traditional receive rate is 50 baud, 5 characters per second. You would have to use a flexible chip to configure a rate as low as 8 baud.
I suggest that you recheck, as it seems more likely that your equipment is operating at 8 MHz rather than 8 Hz.
Walter Roberson
2015 年 7 月 28 日
115200 baud would be 11520 characters per second. That should be enough to get 20 groups of 576 characters if the serial configuration is set right. Please show the MATLAB code for your serial setup.
You have not mentioned anything about how you are doing the plotting. I doubt that any Equivalent Time Sampling is involved, but you have not described the plotting calls. Are you using a Simulink Scope block? If so then how do you have it configured?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Acquisition Toolbox Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!