Logging Data in External Mode
6 次查看(过去 30 天)
显示 更早的评论
Is there a way to collect more then one frame of data in External Mode?
I'm trying to read in the signal from the STM32F4 Discovery Mic In Block (Sample Rate 8000, Frame Size 1600) by connnecting the block to the Scope Block (Log Data to Workspace without any limitations). By doing this I only get one frame consisting of 1600 samples even though the simulation is running for 10 seconds.
0 个评论
回答(1 个)
Siddharth Mohan
2016-9-13
Hi Alexander,
You can save the complete simulation data in External Mode using the 'External Mode Control Panel'. You can do this in two different ways.
1) Increase the External mode trigger duration.
You can change the External mode trigger duration to log more data. From your model, go to Code->External Mode Control Panel-> Signal & triggering -> Duration. Set this to a number that might be enough for you to capture the complete simulation data. Please note that some targets might limit you to have a specific trigger duration.
2) Saving simulation data to MAT files
You can also save simulation data to MAT file(s). The number of MAT files generated will depend on the 'External mode trigger duration'. For example: If the trigger duration is set to 100 and the complete simulation generates 200 data points, you will get two MAT files. The first will have data stored in a variable from T1 -> T100 and the second will have data from T101 -> T200. You can follow the steps below to try this out.
a) Code -> External Mode Control Panel -> Data Archiving
b) Check the 'Enable archiving' box.
c) In the 'Directory' edit box, specify a directory where you'd like to save the MAT file(s)
d) In the 'File' edit box, enter a name for your MAT file.
Let me know if you have other questions!
Thanks,
Siddharth
2 个评论
Siddharth Mohan
2016-9-16
Hi Alex,
I can't say for sure what might be going on here. This will need some more investigation. Could you please contact Mathworks technical support? We'll take it forward from there. Here is the link to contact support:
Thanks, Siddharth
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!