필터 지우기
필터 지우기

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에서 Choose and Parameterize Blocks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by