Model Based Design Toolbox S32K344 Error with the toolbox

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Model Based Design Toolbox S32K344 Error with the toolbox

1,150件の閲覧回数
REM
Contributor II

Hello,

I'm trying to use the "GFLIB_Integrator_FLT" block for a project but I keep getting this error :

"For S-function 'GFLIB_IntegratorTR_SF_FLT', the number of defined parameters, 1, does not match the number of parameters on the dialog of 'Proto_2/NXP/Speed Control Loop/PI//IP/GFLIB_IntegratorTR_FLT/GFLIB_IntegratorTR_SF', 4. These two values must be identical."

I made sure I have the latest version of the toolbox and made sure I have the correct Matlab path.

How can I fix this issue?

タグ(1)
0 件の賞賛
返信
6 返答(返信)

1,110件の閲覧回数
dragostoma
NXP Employee
NXP Employee

Hi, @REM,

Thank you for your interest into Model-Based Design Toolbox for S32K3.

To help us comprehend and resolve the problem, it will also be helpful if you could tell us how you are utilizing the GFLIB_IntegratorTR_FLT in your Simulink model, including the input signals, output signals, and reset condition.

Furthermore, inside the toolbox you can find s32k3xx_ammclib_gflib_miscellaneous which is a Simulink model example that makes use of this block; you can use it as a usage guide.

Let us know about the progress.

 

Best regards,

Dragos

 

 

0 件の賞賛
返信

1,097件の閲覧回数
REM
Contributor II

Hello @dragostoma ,

Thank you for your answer. I already checked the s32k3xx_ammclib_gflib_miscellaneous example and I've connected the block in the same manner.

I'm using it in a hybrid parallel PI in an FOC application, it's a different architecture then the parallel PI in the AMCLIB library.

I'm using it as a replacement for the Simulink discrete integrator, 

My input is connected to the calculated error, reset and preset are connected to a constant 0 block and output is connected to a simulink sum block

Best regards,

Richard

 

0 件の賞賛
返信

1,042件の閲覧回数
petrz_
NXP Employee
NXP Employee

Hi,

it appears that Matlab is mixing up an older version of AMMCLib with a newer one. Check if your Matlab path contains the correct folder with the file GFLIB_IntegratorTR_SF_FLT.c.

Here are the four parameters that you should see in the file GFLIB_IntegratorTR_SF_FLT.c:

static void mdlCheckParameters(SimStruct *S)
{
/* Check the parameter 1 */
if (EDIT_OK(S, 0)) {
int_T dimsArray[2] = {1, 1};

/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 0, "P1", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */

/* Check the parameter 2 */
if (EDIT_OK(S, 1)) {
int_T dimsArray[2] = {1, 1};

/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 1, "P2", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */

/* Check the parameter 3 */
if (EDIT_OK(S, 2)) {
int_T dimsArray[2] = {1, 1};

/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 2, "P3", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */

/* Check the parameter 4 */
if (EDIT_OK(S, 3)) {
int_T dimsArray[2] = {1, 1};

/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 3, "P4", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */

}

 

1,025件の閲覧回数
REM
Contributor II

Hello @petrz_ ,

I went to Matlab set path and I did a reset to default and made sure I don't have another version of S32 AMMCLIB library but I have the MPC 577xx AMMCLIB mbdt (that I'm using on different projects). 
I went to the S function under the mask and I looked at the GFLIB_IntegratorTR_SF_FLT.c file that it was refering to and that's the code that I have : 

#if defined(MDL_CHECK_PARAMETERS) && defined(MATLAB_MEX_FILE)
/* Function: mdlCheckParameters ===========================================
* Abstract:
* mdlCheckParameters verifies new parameter settings whenever parameter
* change or are re-evaluated during a simulation. When a simulation is
* running, changes to S-function parameters can occur at any time during
* the simulation loop.
*/
static void mdlCheckParameters(SimStruct *S)
{
/* Check the parameter 1 */
if (EDIT_OK(S, 0)) {
int_T dimsArray[2] = {1, 1};
 
/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 0, "P1", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */
 
/* Check the parameter 2 */
if (EDIT_OK(S, 1)) {
int_T dimsArray[2] = {1, 1};
 
/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 1, "P2", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */
 
/* Check the parameter 3 */
if (EDIT_OK(S, 2)) {
int_T dimsArray[2] = {1, 1};
 
/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 2, "P3", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */
 
/* Check the parameter 4 */
if (EDIT_OK(S, 3)) {
int_T dimsArray[2] = {1, 1};
 
/* Check the parameter attributes */
ssCheckSFcnParamValueAttribs(S, 3, "P4", DYNAMICALLY_TYPED, 2, dimsArray, 0);
} /* if */
 
}
#endif
 
How can I fix the error?
 
Best regards,
 
Richard
 
0 件の賞賛
返信

954件の閲覧回数
petrz_
NXP Employee
NXP Employee

If the MPC577xx AMMCLib is an older version, then you will need to either upgrade it to the same version as the S32K344 AMMCLib or remove it from the Matlab path.

0 件の賞賛
返信

892件の閲覧回数
REM
Contributor II

Hello @petrz_ 

I deleted the MPC577xx AMMCLib library and it worked.
I tried installing it again, removed it from the path and I got the same error again.
Can you please guide and tell me the proper way to remove it from the path please?

Thank you 

Richard

0 件の賞賛
返信