"To Workspace" won't log as fixed-point

1 回表示 (過去 30 日間)
Charles
Charles 2023 年 2 月 22 日
回答済み: Charles 2023 年 2 月 23 日
Hello,
I'm using the "To Workspace" block in my design and I want it to preserve the type of the signal its logging. I am in the process of converting the design to fixed-point in preparation for HDL Coder. I've checked the "Log fixed-point data as a fi object" box in the module's mask. However, "To Workspace" will only log as double.
I tried to duplicate the issue in a simple system, however it does not reappear. My design is large and proprietary so obviously I cannot share that.
I am logging multiple signals. Here are some example signal types: sfix20, sfix50_E2, sfix24_E1. Interestingly, there is a signal of type int16 which is logged correctly.
Thanks for any help.
Charles
  1 件のコメント
Charles
Charles 2023 年 2 月 23 日
Here is a screen shot showing the usage. The block lives inside an enabled subsystem. The datatype of the signal is clearly labeled as sfix24_E1 and the "Log fixed-point data as fi object" checkbox is selected.

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

回答 (1 件)

Charles
Charles 2023 年 2 月 23 日
Ok, I found a workaround - setting the save format to "Timeseries" causes the data to be saved in the signal's original fixed-point type. No idea if this works for the other types, or why it won't work with the "array" save format.

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by