Example model "Finite State Machine Design" issue

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

Example model "Finite State Machine Design" issue

1,012件の閲覧回数
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 返答(返信)

900件の閲覧回数
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

900件の閲覧回数
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 件の賞賛
返信