MATLAB Answers

how to successfully build model s12x_ccp.mdl of S12X Demo Kit (s12x_demo_CW.zip) in MATLAB2010a (and later versions) ?

1 view (last 30 days)
wang heng
wang heng on 1 Sep 2015
Answered: MATLAB_atian on 25 Dec 2017
Hi,
Recently I'm learning the S12X Demo Kit (s12x_demo_CW.zip).
There is a error when I try to build the model s12x_ccp.mdl of S12X Demo Kit (s12x_demo_CW.zip) in MATLAB2010a (and later versions).
Firstly, I have changed my directory to the source directory where unzipped s12x_demo_CW.zip and start the kit by typing run_demo at the MATLAB prompt.
And then the question is : I can successfully build the model s12x_ccp.mdl in MATLAB2009b, but not in MATLAB2010a.
In MATLAB2010a, when I click Start simulation button displayed in s12x_ccp.mdl model toolbar, Simulink will print the error, as follows:
Error in 's12x_ccp/CAN Calibration Protocol/DTO Processing/CCP/CAN Calibration Protocol': Initialization commands cannot be evaluated.
No appropriate method, property, or field Configuration for class canlib.Signal.
In CAN Calibration Protocol block,the Initialization commands is :
%%between all signal objects
if isnumeric(TOTAL_NUM_ODTS) && ~isempty(TOTAL_NUM_ODTS)
tempVar = canlib.Signal;
tempVar.Configuration.total_num_odts = TOTAL_NUM_ODTS;
end;
I find that there is no the class subfolder @Configuration in the directory of MATLAB\R2010a\toolbox\rtw\targets\common\can\blocks\@canlib, (but it exists in MATLAB2009b), so the initialization commands of CAN Calibration Protocol can't be evaluated in MATLAB2010a.
I try to delete these initialization commands, and then I can successfully simulate the model when i click Start simulation button. But when I click the Build button to generate code and create the target program, Simulink will prompt an error again, as follows:
Error: There were not enough Object Descriptor Tables (ODT's) available to allocate at least one per DAQ list.
To fix this error, you should increase the total number of ODT's that is specified in the mask of the CAN Calibration Protocol Block.
For this particular model, you will need at least 2 ODT's to avoid this error message. This is the number of DAQ lists that will be created for this model.
I have tried to contact mytarget@mathworks.com, but no response.
So, could you tell me how to resolve this problem ?
And what command can be used to replace the command (tempVar.Configuration.total_num_odts = TOTAL_NUM_ODTS) which appears in initialization commands of CAN Calibration Protocol ?
TKS.

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by