Example model "Finite State Machine Design" issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Example model "Finite State Machine Design" issue

845 次查看
nofake_drstrang
Contributor III

Hello,

I tried to adapt the example model Model Based Design Approach to Motor Control with S32K144 - part No.1 from pachamatej to use with S12Z-evaluation board without success.

pastedImage_2.png

The environment:

matlab/Simulink 2015a

Motor Control Development Toolbox for MagniV S1... Version 1.3 (R2013a-R2015b)

Could you please take a look into the adapted model?

Many Thanks!

标签 (1)
0 项奖励
2 回复数

733 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello nofake.drstrange‌,

Well, the error is very strange, since in the Model Explorer the y variable is set to be uint32 but the output is double.

The workaround that I've found for this issue (I have only the R2015b installed so this is the version in which I've tested) is to convert in the state machines the y=0 to y=uint32(0);

This has to be performed also for the filter and offFilter variables for the others stateFlow.

pastedImage_1.png

Hope this helps,

Marius

733 次查看
nofake_drstrang
Contributor III

Hello mariuslucianandrei,

many thanks for your reply! It works well.

Somehow the variable SpeedCommand is declared as "float".

pastedImage_1.png

I want to change to "uint16" but then build error without any useful informations from Diagnostic Viewer. 

pastedImage_2.png

Could you please try it by yourself ?

Many Thanks!

Alex

0 项奖励