Analog Output block keeps timing out (glitches)
5 次查看(过去 30 天)
显示 更早的评论
Using the Analog Output block in Real-Time Windows Target run in Normal mode, I always get flat-waveform glitches that last ~50 ms. (Analog Output block details: Sample time 0.001, Maximum Missed Counts is 75). Clearly the OS is somehow unable to execute regularly inside of that timing tolerance, but CPU/RAM are far underutilized.
Any lower Maximum Missed Counts yields a simulation error: "Error reported by S-function 'rtwinao' in 'daqTest/Analog Output': Maximum missed ticks count exceeded"
What can I do to have Simulink output a waveform with any decent fidelity?
0 个评论
采纳的回答
Jan Houska
2014-8-15
To get reliable timing and smooth output waveform, the only real solution is to switch from Normal Mode to External Mode. This way, you will not be influenced by possible delays introduced by the operating system. External Mode timing is exact to several microseconds. So please switch to External Mode if possible, this should solve the problem.
That said, glitches of the order of 50 ms are way too long even for Normal Mode - certainly much longer than expected or observed on a typical computer. This in effect means that there is something that periodically prevents Simulink from running for as long as 50 ms. It would be worth to examine your computer and find out what that can be (some background process, e.g. a virus scanner?), because this not only makes your computer almost unusable for Normal Mode, but is also bad for performance in general.
2 个评论
Jan Houska
2014-8-18
I cannot speak for MathWorks, but to my best konwledge, delays about 50 ms are not usual in Normal Mode. Occasional 1 ms or maybe 2 ms yes, but not 50 ms. You may want to speak to technical support again and insist on more detailed investigation of the issue. More details, such as your model, will be needed for that.
What you are facing is essentially the fact that it sometimes takes 50 ms to Simulink to compute output data for the next step. The question is why - is your model really that complex? Is that particular time step difficult to compute (perhaps because of numerical issues)? Is some other process preventing Simulink from running? There may be multiple reasons for this behavior and the root cause needs to be found before any suggestion for improvement can be given.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!