English
Source / code snippets

Reading Temperaturfühler Usb

 
- Page 1 -



Web
Scanner
Nachtrag:
Web Scanner, Beitrag=56582, Zeitpunkt=28.03.2010
You can you this thermometer with Ebay order:

USB xp linux thermometer,RS232 protocol,TEMPer232
Ebay Artikelnummer:220564891464

Herstellerseite:
[...] 

The thing cost 18US$ + 6$ Fracht.
the Temper232 comes from China, lasts couple days.

Regards

Web


Web Scanner, Beitrag=56571, Zeitpunkt=28.03.2010
enclosed the View source. Can sure yet much better make, but it functions erstemal:
CompileMarkSeparation
Temperaturmessung Temper232 für PROFAN
über RS232 COMPORT 3
(C) Webbisoft 3/2010
Declare a$, f%, ende%,e%
Declare x$, y$, z%, bz&, xtemp!,xdtemp!, ll&, hh&, testtemp%

Proc GetComInput

    Parameters id%
    x$ = @ReadCom$(id%,10)
    y$ = @ComError(id%)
    bz& = @addr(x$)
    print "temp: ",bz&

    WhileNot x$ = ""

        testtemp% = 0
        x$=@ReadCom$(id%, 10)
        @ComError(id%)
        bz& = ord(mid$(x$,1,1))
        print "temp1: ",(bz&); " ";

        if bz& = 36

            testtemp% = 1

        else

            testtemp% = 0

        endif

        bz& = ord(mid$(x$,2,1))
        print (bz&); " ";

        if bz& = 254

            testtemp% = 1

        else

            testtemp% = 0

        endif

        bz& = ord(mid$(x$,3,1))
        print (bz&); " ";

        if bz& = 2

            testtemp% = 1

        else

            testtemp% = 0

        endif

        bz& = ord(mid$(x$,4,1))
        print (bz&); " ";
        bz& = ord(mid$(x$,5,1))
        print (bz&); " ";
        bz& = ord(mid$(x$,6,1))
        print (bz&); " "

        iF TESTTEMP% =1

            hh& = ord(mid$(x$,4,1))
            ll& = ord(mid$(x$,5,1))
            Print "ll& =", (ll&)
            Print "hh& =",(hh&)
            Xtemp! =256*hh&+ll&
            Print "xtemp!=", xtemp!

            If Xtemp! > 16384

                XDtemp! = -(16384-(Xtemp!)/4)*(0.03125) Korrekturwert 4000h ab 100°C

            Else

                XDtemp! = (Xtemp!/4)*(0.03125)

            EndIf

            XDtemp!= XDtemp!-3 Korrekturwert
            @Set("Decimals",2)
            print "Temperatur USB232= ",xdtemp!,"°C"

        endif

        sleep 800

    EndWhile

    print

EndProc

Window 0, 0 - 400, 400
f% = @OpenCom("COM3", 1024, 1024)
@SetCom("COM3:4800,N,8,1")
@WriteCom(f%, chr$($24)+ chr$($10)+chr$($05)+chr$($01)+chr$($01)+chr$($00)+chr$($32)+chr$($01)+chr$($55))
Thermometer initialisieren
y$ = @ComError(f%)
GetComInput f%                     Antwort abwarten und anzeigen
ende% = 0

WhileNot ende%

    a$ = @Inkey$()                   Tastatur abfragen

    If a$ = "§"                      Ende mit SHIFT-3

        ende%=1

    Else

        GetComInput f%                 empfangene Zeichen lesen

    Endif

EndWhile

@Clos
a>(f%) End


Hello Programmierfreunde,

to längerer Time have I again small Softwareprojekt.
it's about a Temperatursteuerung. moreover must I a USB
Temperaturstick evaluate. Something like here: Ebay Artikelnummer: 380167386533

now my question, has such a thing already someone made?
gives it there Special driver, dlls, or other Aids?
I must moreover say, the the Stick not yet by me weilt and
therefore is it yet something dürftig with the Datenlage

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
10/12/09  
 



 
- Page 4 -



GDL
Hi Detlef,

what about me suspect, the your dll nothing other power as with the Windowsschnittstelle to USB kommuniziert and that this standardized is.As I said supposition.
These functions the dll, if it so is, heard in XProfan installed.

As I said,I soar again on Input/output cards circa.plenty faster and leichter To manage.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
10/22/09  
 




Web
Scanner


I have now first whom Temperatursensor with USB To RS232 COM interface
order. Sooo valuable is the Fun Yes not.

The is loudly Website directly for Own Softwareprojekte vorgesehen.

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
10/22/09  
 




Web
Scanner
Juhu,
the Temper232 Temperaturfühler is today arrived
now must I it only "noch" read can.
on the Website finds one following lean Info:

The communication protocol of TEMPer232 instruction:

a) When plug the TEMPer232 device into the computer, please distinguish the corresponding serial port number in your computer;

b) Baud rate is 4800;
c) There is 8 digit and no need to verify of odd or even number, the stop bit is 1bit;
d) After open the serial port, do as below:
Sending command: 24, 10, 05, 01, 01, 00, 32, 01, 55.
Then you wants sea :24, FE, 02, HH, LL, 88
The temperature Xtemp=256*HH+LL
If Xtemp > &H4000 Then
XDtemp = -(&H4000 - (Xtemp / 4)) * 0.03125
Else
XDtemp = (Xtemp / 4) * 0.03125
End If

the zugehörige Program the Herstellers gives at least already time by me whom Comport 12 from...but How GEHTS now moreover

i'll something zusammenfummeln.

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
11/06/09  
 




Web
Scanner
Hello Friends

having quite what around the ears, now goes it finally moreover.
unfortunately says me the thermometer nothing over The interface.
whom Programmschnipsel Have I in the Help found and bissel
adjusted.
what could I there try?
About the beigelegte Program I see the it over COMPORT 12 to find is...

Regards

Web
CompileMarkSeparation
Temperaturmessung
über RS232 COMPORT 12
Declare a$, f%, ende%

Proc GetComInput

    Parameters id%
    Declare x$, y$
    x$ = @ReadCom$(id%,1)
    y$ = @ComError(id%)
    Print x$;

    WhileNot x$ = ""

        x$=@ReadCom$(id%, 1)
        @ComError(id%)
        Print x$;

    EndWhile

EndProc

Window 0, 0 - 400, 400
f% = @OpenCom("COM12", 1024, 1024)
@SetCom("COM12:4800,N,8,1")
@WriteCom(f%, "24,10,05,01,01,00,32,01,55")             Thermometer initialisieren
@ComError(f%)
GetComInput f%                     Antwort abwarten und anzeigen
ende% = 0

WhileNot ende%

    a$ = @Inkey$()                   Tastatur abfragen

    If a$ = "§"                      Ende mit SHIFT-3

        ende%=1

    Else

        IfNot a$ = ""                  Zeichen ans Modem

            @WriteCom(f%,a$)

        Endif

        GetComInput f%                 empfangene Zeichen lesen

    Endif

EndWhile

@CloseCom(f%)
../../Function-References/XProfan/end/'>End
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



The Comportnummer can imho always another his, can the User imho too determine. what GEHTS you really? ^^
 
03/14/10  
 




Web
Scanner
Ahsoo...

Tja I Have Yes now the besagte USB thermometer with the RS232 Emulation.
in the Posting above standing what take on ought to,
around the data read to.
unfortunately Have I the well wrong geproggt..
by me comes in the Program nothing on. No data simply gornix. **seufz**

y$ = @ComError(id%) gives the value -1 from.
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



Ah, could You even manually herausbekommen, on welchem Port the driver the Termo staid has?

Perhaps. helps too: [...]  though above unfortunately only The available Ports, but not The Portnamen abrufbar are. Perhaps. could one too any available Ports phone and question, whether these The right are. ^^ Perhaps. helps too: [...] 

What is



really for a unit? Plotter?
 
03/14/10  
 



see strain yet...:

Initialize with... 24, 10, 05, 01, 01, 00, 32, 01, 55

You but: WriteCom(f%, "24,10,05,01,01,00,32,01,55")

Richtiger would imho WriteCom(f%,chr$($24)+chr$($10)... You send by "24, Yes 50, 52, 44 ...
 
03/14/10  
 




Web
Scanner
Okay, correctly., this is drin.
The Thermo wants not yet.
in the Thermo is ne small LED, The should with the inquire concern,
The wants neither. certainly depends the on the Comportadresse....
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 




Web
Scanner
this is a selbstgebaute PC-gesteuerte CNC-Fräsmaschine.
so can wood, Kunststoffe and aluminum Edit.
somewhere I had here time a Fred, there have I with a Program moreover started.
From hand went the then still already the take action the Achsen.
unfortunately from Zeitgründen first too Halde...
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



an selbstgebaute PC-gesteuerte CNC-Fräsmaschine, nice. ^^

can You whom Comport übern Gerätemanager find out?
 
03/14/10  
 




Web
Scanner


the isser

54 kB
Hochgeladen:03/14/10
Downloadcounter107
Download
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

56.499 Views

Untitledvor 0 min.
H.Brill05/09/23
Erasmus.Herold04/30/19
E.T.02/25/18
Tango09/03/17
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie