The + operator only works on numeric arguments

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

The + operator only works on numeric arguments

1,912件の閲覧回数
Dina_ayoub
Contributor II

   I am using the input capture unit in the eTimer example (Simulink Model based) to output the frequency and duty cycle value of a FlexPWM signal, the model is successfully built and the outputs are correct, BUT when I try performing PIL I always get this error ("The + operator only works on numeric arguments") related to a .tlc file.
Does anyone know how to fix it?

5 返答(返信)

1,838件の閲覧回数
Gerhold
Contributor I

The & , ^ , | , << , >> and % operators only work on numbers. The arguments to the following operators both must be either Number or Real: < , <= , > , >= , - , * , / . This can also happen when using + as an unary operator. In addition, the FORMAT built-in function expects either a Number or Real argument.

 

jcp kiosk

0 件の賞賛
返信

1,849件の閲覧回数
Gerhold
Contributor I

The & , ^ , | , << , >> and % operators only work on numbers. The arguments to the following operators both must be either Number or Real: < , <= , > , >= , - , * , / . This can also happen when using + as an unary operator. In addition, the FORMAT built-in function expects either a Number or Real argument.

0 件の賞賛
返信

1,880件の閲覧回数
Dina_ayoub
Contributor II

@mariuslucianand  I tried your solution but when I went on running the PIL I got the attached  error. I am using Simulink 2018b.

0 件の賞賛
返信

1,896件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @Dina_ayoub 

Thanks to @paulvlase the fix is pretty simple.

You have to go to the capture subsystem, right click on it, select "Block Parameters" and under "Code generation" you have to select the Function packaging as  "Nonreusable function".

mariuslucianand_0-1612370517737.png

The measured values looks like this:

mariuslucianand_1-1612370548349.png

Hope this helps,

Marius

0 件の賞賛
返信

1,864件の閲覧回数
Dina_ayoub
Contributor II

  I tried your solution but when I went on running the PIL I got the attached  error. I am using Simulink 2018b, NXP_MBDToolbox_MPC57xx version 3.2.0

0 件の賞賛
返信