Simulink how to change the input of a variable from constant to sine wave using vehicle network toolbox?

5 ビュー (過去 30 日間)
Liam
Liam 2022 年 12 月 13 日
回答済み: Sai 2022 年 12 月 29 日
Hi, Im trying to figure out how i can change a constant input of a variable from constant to sine wave in vehicle network toolbox. I have no past experience using this add-on so dont fully understand the error im getting and how to fix it.Ive attached a snip of the error, if anyone can help it would be greatly appreciated.

回答 (1 件)

Sai
Sai 2022 年 12 月 29 日
From the error, I understand that the “CAN pack” block is expecting data of type “UINT8”. To overcome the error, a “data type conversion” block can be used in which output data type can be set to “UINT8” by double clicking on it and selecting output data type to “UINT8” from drop down. The resultant Simulink model looks like below. (Considered only required portion of the model to solve the query).
Remaining parameters of the “Data Type Conversion” block can be set as per your requirements. Refer to the below documentation link for more information on “Data Type Conversion” block

カテゴリ

Help Center および File ExchangeVehicle Network Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by