Example model "Finite State Machine Design" issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example model "Finite State Machine Design" issue

823 Views
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!

Labels (1)
0 Kudos
2 Replies

711 Views
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

711 Views
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 Kudos