VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

model running slightly differently in Veristand and in Simulink

Solved!
Go to solution

Hello,

 

I have a model containing a c-code s-function.

 

The model runs fine in Simulink, where the s-function is also compiled to a mexw32. 

 

Then a dll is generated for Veristand 2011, using RTW and the veristand.tlc.

 

In Veristand, the results are the same as in Simulink. But at some point in time, I have a numerical error in the s-function due to a non-convergence of the solver. (the s-function has its own fixed-step solver inside). This error does not shows up in Simulink with the mexw32 s-function.

 

I tried to run this dll both on Windows deployment mode and in pharlap deployment on a PXI. I have the same results about the numerical non-convergence, so the problem seems to be in the way the dll is compiled.

 

 

What could be the reason for a different behavior in Simulink and in Veristand ?

 

Any suggestions ?

 

thanks.

 

 

0 Kudos
Message 1 of 3
(6,971 Views)
Hi.

In fact, sometimes function are not full functionnal when the model is compiled.

You could avoid use s function
0 Kudos
Message 2 of 3
(6,661 Views)
Solution
Accepted by topic author Lbgc

I see that the original post is pretty old, and that it may have already been solved, but my team has been working through similar problems for a few months.  First thing to check would be version compatibility.  Keep in mind that even up to NIVS 2012, only RTW 2008 is officially supported. 

 

GSinMN

0 Kudos
Message 3 of 3
(6,570 Views)