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



Web
Scanner
DLL Doku isn't thereby..unfortunately.
so siehts installs from:


 
Xprofan X3.1
Win7 auf AMDX6
10/20/09  
 



well The 169KBer sees still Schonmal well from, look still time mere - under stand often same Exportnamen and chiding time in your Explorereinstellungen [X] known Extensionen Hide ex - sees one Yes otherwise nüscht. ^^
 
10/20/09  
 




Web
Scanner
in the 169it standing under the drin:

E:xiaosongRDingHidHidFTDllDebugHidFTDll.pdb

helps the

now Have so did i yet the found: [...] 

with RS232 spending..... would well plainer, what


 
Xprofan X3.1
Win7 auf AMDX6
10/20/09  
 




uses the communicating protocol and supports the RS232 4800bps standard, and this supplies convenience to the users who want to write programs themselves.

well very, the driver becomes NEN (virtual) COM-Port provide, means OpenCom .
 
10/20/09  
 




Web
Scanner
Gibts only one keines trouble, I Have NOT whom RS232 Types here lying

Spassenshalber have I the software for RS232 Stick runtergeladen,
but so runs my Stick naturally not.

gives it with USB evident different Anbindungen:

1 x over the Comport = RS232
1 x USB somehow differently

will be means rather try the RS232 Dingens To get?
or we find yet ne others Solution.
I see Yes not time on welchem Comport I search ought to?
give there ev. ne Auswertesoftware, or something like?
 
Xprofan X3.1
Win7 auf AMDX6
10/20/09  
 



Gerätemanager. ^^
 
10/21/09  
 




GDL
very the my I with channel detect.
the ought to too with XProfan weg and not only over the Gerätemanager.

I wisely neither as mitgelieferten software The Kanäle detect on which COM number now your unit lying.On any Cases finds The mitgelieferte software your unit without the the users Settings make must,alike which channel straight give away watts.somehow there a Windowsinterne Übergabe.

- Gerätetreiber becomes at infect on USB loaded
- windows recognize hardware and divides next disengaged USB channel To. means 4 if already 3 USB occupied are or 2 if only 1 USB occupied is
- Gerätetreiber depends of these channel virtual Port one
- windows position Anwenderprogrammen whom virtual Port einschliesslich channel and Kennung To available.

How greife I now with XProfan on any virtual Port with names(supply driver) and Kanalnummer(supply Window) To and Search my Port out.without that the users first its Portnummer on the Program Start somewhere search must ?
 
Windows7 Xprofan 8,9,10 [...]  [...] 
10/21/09  
 



Comports lists, no idea - should one vlt. ergoogeln. ^^ here stand already a couple command: [...] 

Internally the code provides 9 different ways (yes you read that right: Nine) of enumerating serial ports: Using CreateFile, QueryDosDevice, GetDefaultCommConfig, two ways using the Setup API, EnumPorts, WMI, com Database & enumerating the values under the registry key HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPSERIALCOMM.


and here: [...] 
 
10/21/09  
 




GDL
Hi,

now are we on the point, where I me already moreover supra direct USB Support wish.

whom virtual names know I Yes of driver since.

would be me something like present : channel%=find$(Portname$)

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



understand I do not. -.-
 
10/21/09  
 




Detlef
Tussing
I have under XProfan too with USB experimentiert.

have however a DLL get circa 8 from and 2 Eingangskanäle To steer.

I suspect with your software is a versteckte DLL

look time How I The ticket anspreche

declare a%,b%,c%,d%,e%
a%=0 Kartenadresse
b%=2Digitalkanaleingang
c%=1Analogkanaleingang
d%=3Digitalkanalausgang
e%=2Analogkanalausgang
def opendevice(1) !"k8055d.dll","OpenDevice"
def closedevice(0) !"k8055d.dll","CloseDevice"
def readdigi(1) !"k8055d.dll","ReadDigitalChannel"
def readanalog(1) !"k8055d.dll","ReadAnalogChannel"
def ClearAllDigital(0) !"K8055d.dll","ClearAllDigital"
def setdigi(1) !"K8055d.dll","SetDigitalChannel"
def analogout(1) !"K8055d.dll","SetAnalogChannel"
def clearallanalog(0) !"K8055d.dll","ClearAllAnalog"
declare dllh&
dllh&=usedll("k8055d.dll")

ifnot dllh&

messagebox "dll not loaded error","",0
end

endif

declare kartenadresse&,readdigi&,schreibdigi&,readanalog&,schreibanalog&
kartenadresse&=opendevice(a%)Initialisierung the ticket

while readanalog&<125

readanalog&=readanalog(c%)
locate 10,10
print "Analogkanaleingang",c%," = ",readanalog&
readdigi&=readdigi(b%)
locate 14,10
print "Digitalkanaleinganggang",b%," = ",readdigi&
schreibdigi&=setdigi(d%)
locate 18,10
print "Digitalkanalausgang",d%," = ",schreibdigi&
locate 22,10
print "Kartenadresse:",kartenadresse&
waitinput
schreibanalog&=analogout(e%)

endwhile

waitinput
clearalldigital()
clearallanalog()
closedevice()
freedll dllh&
end

these only one Testprogramm for USB-ticket.
sure would it beautiful a direct grabbed of XProfan on USB to have.
 
Gruß Detlef Tussing
Windows XP, XProfan 10
10/21/09  
 




Frank
Abbing
look time here: [...] 
 
10/21/09  
 




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

54.570 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