Analog Output block keeps timing out (glitches)
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Jan Houska
le 15 Août 2014
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 commentaires
Jan Houska
le 18 Août 2014
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Target Computer Setup dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!