displays as unsigned integer why?

6 件のコメント

Jan
Jan 2022 年 12 月 21 日
The question does not contain enough information to be answered.
bill buersch
bill buersch 2022 年 12 月 21 日
well the range for a 16 bit integer is
-32,768 to +32,767
however for an unsigned 16 bit integer it is
0 and 65,535 In the picture we see 65535 shown but in fact is -1 because that while the bits are the same, it is being wrongly interpreted by the chart program on the website.
A 16-bit integer can store 216 (or 65,536) distinct values. In an unsigned representation, these values are the integers between 0 and 65,535; using two's complement, possible values range from −32,768 to 32,767.
So i guess my question is there as setting to have 65,535 treated as a signed integer so the chart looks right?
Geoff Hayes
Geoff Hayes 2022 年 12 月 21 日
@bill buersch perhaps you need to show the code that generates this chart.
bill buersch
bill buersch 2022 年 12 月 21 日
i can't because it is thingspeak code that generates the chart. it's the chart you get when you log in. it interprets as unsigned when it should interpret as signed. but i see that there is no way it would know.
bill buersch
bill buersch 2022 年 12 月 21 日
移動済み: DGM 2022 年 12 月 21 日
notice that when the outside air temp rises above 0 it's fine.
bill buersch
bill buersch 2022 年 12 月 21 日
移動済み: DGM 2022 年 12 月 21 日
data as stored: 2022-12-21 12:36:13 UTC,1,65535,,,,,,,

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

質問済み:

2022 年 12 月 21 日

移動済み:

DGM
2022 年 12 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by