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 5 -


position the driver yet others/ further Comports ready? (sometimes 3-4...)

How lauten because really these Comport-Apis?

for that Moonbuggy I will a "Comport-Monitor" in a own Process or Thread turn off, Topic schad nüscht.
 
03/14/10  
 




Web
Scanner
where very find I The Comport APIs?
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



already leg input of Comport [...]  become with .net zugemüllt. ^^
 
03/14/10  
 



Ah [...]  [...] 

CreateFile - Öffnet a seriellen Port and supply a lever
SetupComm - setting The Parameter for Konfiguration
WaitCommEvent - helps at Implementieren of/ one Ereignisbehandlung
Writefile - writes on The interface
ReadFile - reads from the interface

[offtopic]These whole APIs need one with XPSE not at all self deklarieren, only write:
CompileMarkSeparation
SetupComm(0,0,0)
>
its How, as would tappt im dunkeln to that Sprachschatz belong.[/offtopic]
 
03/14/10  
 




Web
Scanner
hmmm

Why must the, I make wants - always so tricky his
The command Gibts Yes so not XProfan?
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



very, could You by Header-Files (*.ph) integrate or by External Call or by DEF define or take xpse and then are you of House from How normal functions simply existent and schreibbar.
 
03/14/10  
 




Web
Scanner
Schade, so far wealthy my Kenntnisse erstemal (yet) not.

Why are The XProfanbefehle not moreover useable?
The functions well only on direct physical available
Comports and not detoured USB Ports?
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 




Web
Scanner
the Have I yet found, but sooner everything for VB.
shining everything directly for Temper232 To his.

[...] 

here becomes The interface beackert. interestingly...

[...] 
 
Xprofan X3.1
Win7 auf AMDX6
03/14/10  
 



physical come we since NT (in the UserMode-Level) eh not ran, goes imho eh only around the of Treibern begot virtual Comports. These APIs there attend me not at all soo tricky, with opportunity once look at. I wanted to only know, which APIs there in question come, to see, which Options vlt. yet available stand, The the XProfan of House from Perhaps not bid. Codes in VB are still mostly useable.
 
03/15/10  
 




Web
Scanner
is here the drin what You seek?
still a DLL.

[...] 

32 kB
Hochgeladen:03/15/10
Downloadcounter118
Download
 
Xprofan X3.1
Win7 auf AMDX6
03/15/10  
 



Nene this is already ok, that are hold The Treiberdateien the Treibers the The Comports herstellt. the here [...]  (I but not today More, plenty To late schonwieder) time try with CreateFile on "COM12", or. first at all CreateFile feedback look at. but I know now neither, what XProfan there differently make ought to - vlt. can Roland the trouble discern.
 
03/15/10  
 




Web
Scanner
Hmm, means I Have already all sorts of things turned, but the biestige
USB Temperaturstick sacht not message.
has yet someone a zündende USB idea before I the into eternal
Jagdgründe entsorge?

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
03/20/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.494 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