Zero division when generating Simscape Code using Beckhoff TE1400
Ältere Kommentare anzeigen
I am using the TwinCAT Target for Simulink TE1400 to generate Code from a Simscape model. I have all the necessary licenses and certificates. Generating Code and running it in TwinCat/Visual Studio works only sometimes. For example I tried to generate code of a simple RC-Circuit as shown in the picture. Then I get error messages like "undefined localtime", "conflict between signed and unsigned" and "possible division by 0" (see attached log file). With another model the code generation worked once and when trying to run it in VS I got another division by zero error.
So I guess there is some zero division in the model that I am not aware of. I found out that the error doesn't pop up when I get rid of the capacitor-block. Naturally I then made sure that there are no zero values in the capacitor-block and tried to set initial values as well, but all to no avail.
Does anybody know what causes the error?

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Real-Time Deployment and Code Generation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!