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 Exchange에서 Simulink 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