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

2 ビュー (過去 30 日間)
Sandro G
Sandro G 2024 年 4 月 12 日
回答済み: Sandro G 2024 年 4 月 18 日
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 Center および File ExchangeChoose and Parameterize Blocks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by