I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo zusammen,
ich habe das I2C Thermometer-MCP9808 v1.0 nachgebaut und am Programm ein zusätzliches Textelement (mit neuen Namen) und dazu eine Ausgabe an den TXT Touch-Display vorgenommen.
Nun habe ich eine besondere Erscheinung am TXT Touch-Display. Das Originalprogramm und das ergänzte Programm läuft ohne Probleme und es wird am PC-Bildschirm z.B. T= 21,50°C angezeigt. Wenn ich nun das ergänzte Programm über Download direkt auf dem TXT laufen lasse, erhalte ich auf dem TXT Touch-Display
T= -490,50 angezeigt.
Zum Test habe ich andere Programm laufen lassen und am TXT Touch-Display sind die erwarteten Anzeigen gekommen.
Kann sich das jemand erklären?
Danke im Voraus
Karsten
ich habe das I2C Thermometer-MCP9808 v1.0 nachgebaut und am Programm ein zusätzliches Textelement (mit neuen Namen) und dazu eine Ausgabe an den TXT Touch-Display vorgenommen.
Nun habe ich eine besondere Erscheinung am TXT Touch-Display. Das Originalprogramm und das ergänzte Programm läuft ohne Probleme und es wird am PC-Bildschirm z.B. T= 21,50°C angezeigt. Wenn ich nun das ergänzte Programm über Download direkt auf dem TXT laufen lasse, erhalte ich auf dem TXT Touch-Display
T= -490,50 angezeigt.
Zum Test habe ich andere Programm laufen lassen und am TXT Touch-Display sind die erwarteten Anzeigen gekommen.
Kann sich das jemand erklären?
Danke im Voraus
Karsten
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Check the type of integer you're using in RoboPro: signed integer or unsigned integer.
The -490.5 °C looks like an overflow or a complement to 21.5 °C.
RoboPro 4.2.3 has introduced signed integer and unsigned integer. If you're using the integer-to-float converter, check the input type.
The best solution would be to share your RoboPro project so we can review it.
The -490.5 °C looks like an overflow or a complement to 21.5 °C.
RoboPro 4.2.3 has introduced signed integer and unsigned integer. If you're using the integer-to-float converter, check the input type.
The best solution would be to share your RoboPro project so we can review it.
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hello Reil Vilo,
many thanks for your information. I use the program
https://www.ftcommunity.de/data/downloa ... 08v1.0.zip
which you find in ft:pedia 2015-4. Additional to this program I have completed the program with one text element ( \cT=####,###°C) with data input from Te (MCP_GetTemp) and the output of the text element goes to panel display (TXT).
Dirk Fox use for the date “floating point 48 bit” and the same I have used in the additional text element. So it is a very simple changing of the original program and when the date for the panel (PC) are correct, so it is not understanding, why the result with the same data line and the same format type is wrong.
Your information for signed integer and unsigned integer, I have not found in RoboPro 4.2.4
Best regards Karsten
many thanks for your information. I use the program
https://www.ftcommunity.de/data/downloa ... 08v1.0.zip
which you find in ft:pedia 2015-4. Additional to this program I have completed the program with one text element ( \cT=####,###°C) with data input from Te (MCP_GetTemp) and the output of the text element goes to panel display (TXT).
Dirk Fox use for the date “floating point 48 bit” and the same I have used in the additional text element. So it is a very simple changing of the original program and when the date for the panel (PC) are correct, so it is not understanding, why the result with the same data line and the same format type is wrong.
Your information for signed integer and unsigned integer, I have not found in RoboPro 4.2.4
Best regards Karsten
- Dirk Fox
- ft:pedia-Herausgeber
- Beiträge: 1833
- Registriert: 01 Nov 2010, 00:49
- Wohnort: Karlsruhe
- Kontaktdaten:
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo Karsten,
das Integer-Vorzeichen ist nicht das Problem - eine solche Hitze würde der Sensor nicht verkraften.
Bei mir hat die Anzeige auch einwandfrei funktioniert. Ich teste nochmal und melde mich.
Beste Grüße,
Dirk
das Integer-Vorzeichen ist nicht das Problem - eine solche Hitze würde der Sensor nicht verkraften.
Bei mir hat die Anzeige auch einwandfrei funktioniert. Ich teste nochmal und melde mich.
Beste Grüße,
Dirk
- Dirk Fox
- ft:pedia-Herausgeber
- Beiträge: 1833
- Registriert: 01 Nov 2010, 00:49
- Wohnort: Karlsruhe
- Kontaktdaten:
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo Karsten,
bei der Konvertierung des Temperaturwerts, den der Sensor zurückgibt, hatte ich beim Vorzeichentest ein paar führende Status-Bits nicht gelöscht... Je nach Rückgabestati fiel das nicht auf.
Und merkwürdigerweise hat der TX trotzdem die richtige Temperatur angezeigt. Die korrigierte Version 1.1 des Treibers findest Du im Downloadbereich der ft:c.
Beste Grüße,
Dirk Fox
bei der Konvertierung des Temperaturwerts, den der Sensor zurückgibt, hatte ich beim Vorzeichentest ein paar führende Status-Bits nicht gelöscht... Je nach Rückgabestati fiel das nicht auf.
Und merkwürdigerweise hat der TX trotzdem die richtige Temperatur angezeigt. Die korrigierte Version 1.1 des Treibers findest Du im Downloadbereich der ft:c.
Beste Grüße,
Dirk Fox
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo Dirk,
vielen Dank und frohe Ostern
Beste Grüße Karsten
vielen Dank und frohe Ostern
Beste Grüße Karsten
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hello Rei Vilo,
many thanks for yor information. I have tested your changing for this program and it is running.
For me was this part of program not exactly clear, so I could not handle your proposal.
I have only use the main program with my simple extension.
best regards Karsten
many thanks for yor information. I have tested your changing for this program and it is running.
For me was this part of program not exactly clear, so I could not handle your proposal.
I have only use the main program with my simple extension.
best regards Karsten
- Dirk Fox
- ft:pedia-Herausgeber
- Beiträge: 1833
- Registriert: 01 Nov 2010, 00:49
- Wohnort: Karlsruhe
- Kontaktdaten:
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo Karsten,
mit Reis Änderung funktioniert der Treiber nur bei positiven Temperaturen...
Du solltest besser meinen neuen Treiber verwenden.
Beste Grüße,
Dirk
mit Reis Änderung funktioniert der Treiber nur bei positiven Temperaturen...
Du solltest besser meinen neuen Treiber verwenden.
Beste Grüße,
Dirk
Re: I2C Thermometer-MCP9808 v1.0 (Dirk Fox)
Hallo Dirk,
Danke für den Hinweise, habe ich auch so gemacht.
Selbstverständlich mußte ich auch die Änderung von Rei Vilo testen.
Viele Grüße Karsten
Danke für den Hinweise, habe ich auch so gemacht.
Selbstverständlich mußte ich auch die Änderung von Rei Vilo testen.
Viele Grüße Karsten