C++ Objects Persistent

조회 수: 1 (최근 30일)
Valerio
Valerio 2012년 4월 19일
Hi everyone, I'm using the "s-function builder" to create a driver for a sensor. I'd need to use persistent variables but i can't use the sim structure "S" because it denies the TLC file creation (with the builder). Commonly I use the construct:
ssSetNumPWork(S, 1);
but in this case I've to avoid using "S" .
Does exist any solution for this issue?
Thank you everybody,
VZ

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 4월 19일
I don't think the S-Function Builder can deal with PWork vectors. You might need to either introduce the PWork vector manually, or first register a DWork ("Number of discrete states" on the Initialization pane) and use xD[0] to refer to that discrete state. After the S-function is generated, replace the Dwork with a Pwork and modify the datatype accordingly.

카테고리

Help CenterFile Exchange에서 Author Blocks Using S-Function Builder에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by