- You can set the File scope to be signal triggered, and only activate the trigger signal when you want it to actually trigger. This will then capture data for a short burst (= Number of Samples in the file scope) following each trigger. Note that the triggering only "takes" after the Number of samples have been captured
- Put the scope block into an enabled subsystem and feed the enable port with something that controls your logging. The scope will log for exactly those samples that the enable input is true. You should keep the scope's triggering as "Freerun" for this case.
How can I programmatically start/stop data logging or enable/disable File Scope block.
5 次查看(过去 30 天)
显示 更早的评论
I have a Simulink program running on an xPC Target computer that logs signals to disk with a File Scope block. However, this program runs for a long time and I only want to log data for short segments intermittently. How can I trigger the File Scope to start and stop logging data? I've looked through this thread but when a signal is not being passed to the scope, the scope still logs data. Just all zeros. I only want the File Scope to log when I choose.
Thank you.
0 个评论
回答(1 个)
Rajiv Ghosh-Roy
2013-3-26
There are two possible solutions:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multicore Processor Targets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!