CMEX S-function vs. Model blocks: delay in execution?
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I am running a Simulink model and an S-Function of that model in parallel. The S-function was generated for real-time using RTW embedded coder. The outputs are almost identical except for a one simulation step delay. My hunch is that Simulink can't use zero-crossing detection in the S-function. Hence, it's causing a 1-step delay. Am I on the right track? Any other ideas? Thanks a lot!
1 Kommentar
  Kaustubha Govind
    
      
 am 4 Okt. 2011
				Does your model have any algebraic loops? You can detect these by setting the Algebraic Loop Diagnostic to warning/error: http://www.mathworks.com/help/toolbox/simulink/ug/f7-8243.html#bsn439w
I'm not sure, but if the S-function somehow tries to solve the algebraic loops, it is possible that a delay is introduced.
Antworten (0)
Siehe auch
Kategorien
				Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!