필터 지우기
필터 지우기

Create a global variable in C from an S-function in Simulink

조회 수: 4 (최근 30일)
Benjamin Couillard
Benjamin Couillard 2017년 1월 3일
편집: Benjamin Couillard 2017년 1월 3일
I'd like to know if it is possible to create and initialize global variables in C from an S-function in Simulink. For example I would like to create and assign these global variables from an S-function
const char modelName[] = "sldemo_fuelsys_dd";
const char generationDate[] = "Tue Jan 03 09:03:41 2017";
At the moment, I'm able to assign these values to the variables, but only at runtime, using the strcpy function C during the Initialize function. I would prefer it to be done at compile-time (during the C compilation), is there a way to do it?
Regards

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by