How to prevent implicit promotion from single to double when using CAN Pack block?

4 ビュー (過去 30 日間)
Alex
Alex 約11時間 前
編集済み: Alex 約11時間 前
I am using the CAN pack block for my embedded system, and am trying to figure out how to prevent an implicit conversion from a single to a double in the code generation. When trying to evaluate the conditional statement (outValue > 2147483647.0), the packed variable gets implicitely promoted to a double.
I had a similar issue with the CAN unpack block assuming all variables would be doubles, and I was able to overcome this by using the signal specificaion block as shown here: https://www.mathworks.com/help/vnt/ug/control-can-unpack-block-output-type.html However, using the signal specifications for CAN packing does not achieve similar results

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by