localtime not defined error when generating C++ code in Simulink using TE1400

2 次查看(过去 30 天)
I am using TwinCAT Target for Simulink TE1400 to generate C++ code from a simple Simscape model. When generating Code I get a few error messages and warnings (see attached log file). What I was able to find out is that the root of the problem is the following:
In this external file ex_0bded19e the function "localtime" is called, without being defined:
This then results in error messages in row 3909:
My question is, why is localtime not defined? Is there a additional file that Matlab needs but is missing? Do I have to set a specific path in the Matlab environment?

采纳的回答

Sandro G
Sandro G 2024-4-18
Same as in my other question, the solution had nothing to do with the errors that I posted above. The problem was actually the certificate for tmx signing, ordered from beckhoff. In the windows environment variables, there was an old certificate that no longer worked. Even though I put the new certificate in the TC build setting in Simulink, the certificate from the environment variables caused the code generation to crash.
So to solve this, add the latest activated certificate to the windows environment variables and restart Matlab.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by