Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Sandro G
Sandro G le 18 Avr 2024
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.

Plus de réponses (0)


En savoir plus sur General Applications dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by