Enum datatype mismatch error

9 ビュー (過去 30 日間)
rahut patil
rahut patil 2019 年 5 月 13 日
移動済み: Sabin 2023 年 9 月 25 日
Hello all,
I have developed a model whose all inputs are enum type. I have created the harness for the model, I have given input as signal builder and output as scope to harness model. WHen I give the signal from the signal builder I am getting the data type miss match error as " can't covert double to enum val". I have inserted the converter from double to enum in "signal spec and signal routing" harness model. then also it is giving the error. For the error please see the attached file. Please suggest what need to do.
Best Regards,
Rawootray Patil.

回答 (1 件)

Guillaume
Guillaume 2019 年 5 月 13 日
移動済み: Sabin 2023 年 9 月 25 日
I don't know anything about simulink, but the error message you get seems clear enough. You're trying to convert the value 7 into your enum, but your enum does have an enumeration name associated with a value of 7.
So you'd have to add a enumeration name for a 7 value to your enum, or feed a valid value to the converter.
  1 件のコメント
rahut patil
rahut patil 2019 年 5 月 13 日
移動済み: Sabin 2023 年 9 月 25 日
Hello Guillaume,
Thank you for your response. Yes the signal builder was generating signal of -7 value. which suppose to generate zero. Thank your for the support.
Best Regards,
Rawootray Patil.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSwitches and Breakers についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by