How to avoid C2802x COMP simulink module output as single(float) format?

2 ビュー (過去 30 日間)
Ashish Kumar Gupta
Ashish Kumar Gupta 2016 年 1 月 4 日
I used simulink module C2802x COMP(arator) module with settings as: Computer Module = Comparator 1, Second input = Internal DAC, Internal DAC Value = 100, Syncronozation = synchronous, Qualification Period = Passed through
I have observed that simulink is generating the code as below, which is effectively converting it to float and so consuming almost 140 cycles for no reason. So, can you please tell me how to avoid this float conversion?
TEST_PROJ_DW.COMP = Comp1Regs.COMPSTS.bit.COMPSTS;
rtb_LogicalOperator = (TEST_PROJ_DW.COMP != 0.0F);
  1 件のコメント
Ashish Kumar Gupta
Ashish Kumar Gupta 2016 年 1 月 7 日
Ashish, Please find attached screen shot (COMP.jpg). Thanks.

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

回答 (1 件)

ashish ahir
ashish ahir 2016 年 1 月 6 日
can you upload screenshot of this setting parameters?

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by