Forum | | | | Herbert N. | Hello
Have the trouble that I The serial 8-case Relay Card of Conrad not address can in Qbasic klakerts
I use Prf 5.0 / Winme / P700 ( net laugh the is well enough for such things grins )
here little Program to that study I wrong make: CompileMarkSeparationDeclare h%,e%,a$,b$,c$,d$,e$,f$,g$
Declare Init$,Kanal1$,id%,Pause&
@CloseCom(COM1)
proc Pause
let Pause& = &GetTickCount
Let Pause& = @ADD(Pause&,100)
while @GT(Pause&,&GetTickCount)
wend
endproc
Font 1
let id% = COM1
LET h% = @OpenCom(id%,1024,1024)
@SetCom(id%:19200,N,8,1)
@SetComExt(id%,10,0,0,$0001,0,0)
LET f$ = @ReadCom$(id%,4)
Pause
LET g$ = @ComError(id%)
Pause
let Init$=CHR$(1),CHR$(5)CHR$(2),CHR$(6)
let Kanal1$=CHR$(3),CHR$(5),CHR$(8),CHR$(14)
print Fehler : ;@ComError(COM1)
@WriteCom(h%,Init$)
pause
@ReadCom$(id%,4)
Pause
@WriteCom(h%,Kanal1$)
Pause
print Init$
Print id%
LET f$ = @ReadCom$(id%,4)
Pause
print Fehler : ;@ComError(id%)
print Gelesen : ;f$
Pause
print Gelesen : ;@ReadCom$(id%,4)
Pause
@CloseCom2>(id%)
thanks beforehand |
| | | | |
| | | i'm me sure the Georg here help can... |
| | | | |
| | Pedro Santos | Hello
write everywhere instead of id% rather id$ means a string variable
greeting
Pedro |
| | | | |
| | Herbert N. | Hello the with the string is net the trouble ,or think You the it others Problems causes ? Have at the beginning well always COM1 registered ,the with id% Have from the Help ( Beispielprogramm ) if I time whom Anschluss Change wants ( be rotten and schreib net gladly ......)
but nevertheless thanks |
| | | | |
| | Herbert N. | and who is Georg??
or how can I with it Contact take in diesbezüglich?
greeting Herbert |
| | | | |
| | Jac de Lad | 1. here laughs nobody, I Have self forever Profan² 5.0 using.
2. you have in your View source some I really vertauscht: - id$ in lieu of the Handles the interface indicated (see ReadCom, WriteCom, Comerror) - id$ often in Gänsefüßchen staid (power one I really never!) - id$ watts as Integer declariert (must but one String his)
here time the korrigierte View source (whether it functions can I unfortunately not say, I yet never with com worked have and no com-cards have): CompileMarkSeparationDeclare H%,E%,A$,B$,C$,D$,E$,F$,G$
Declare Init$,Kanal1$,id$,Pause&
@Closecom(h%)
Proc Pause Unnötig, da besser durch Sleep!
Let Pause& = &Gettickcount
Let Pause& = @Add(Pause&,100)
While @Gt(Pause&,&Gettickcount)
Wend
Endproc
Font 1
Let id$ = COM1
Let H% = @Opencom(id$,1024,1024)
@Setcom(Add$(id$,:19200,N,8,1))
@Setcomext(id$,10,0,0,$0001,0,0)
Let F$ = @Readcom$(id$,4)
Pause
Sleep 100
Let G$ = @Comerror(id$)
Pause
Sleep 100
Let Init$=Chr$(1),Chr$(5),Chr$(2),Chr$(6)
Let Kanal1$=Chr$(3),Chr$(5),Chr$(8),Chr$(14)
Print Fehler : ;@Comerror(h%)
@Writecom(H%,Init$)
Sleep 100
@Readcom$(h%,4)
Sleep 100
@Writecom(H%,Kanal1$)
Sleep 100
Print Init$
Print id$
Let F$ = @Readcom$(h%,4)
Sleep 100
Print Fehler : ;@Comerror(h%)
Print Gelesen : ;F$
Sleep 100
Print Gelesen : ;@Readcom$(h%,4)
Sleep 100
@Closecoms=s2>(h%)
I hope, the helps you moreover!
Jac |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02/26/06 ▲ |
| |
| | GDL | Hi,
here my Testprogramm CompileMarkSeparationcls
declare comm3%,fehler%,anzahl%,daten$
proc raus
comm3%=@OpenCom(COM1,2048,2048)
fehler%= @SetCom(COM1:9600,N,8,1)
daten$=@AnsiToOem$(5)
anzahl%=@WriteCom(comm3%,daten$)
fehler%=@ComError(comm3%)
daten$=ReadCom$(comm3%,1)
case daten$ <> :Print daten$
sleep 100
fehler%=@ComError(comm3%)
daten$=@OemToAnsi$(daten$)
case daten$=:daten$=nichts
drawtext 10,100,Schnittstellenfehler senden : +str$(fehler%)
drawtext 10,120,Gesendete Datenpakete : +str$(anzahl%)
drawtext 10,140,Empfangene Datenpackete : +daten$
drawtext 10,160,Schnittstellenfehler empfangen : +str$(fehler%)
@CloseCom(COMM3%)
endproc
===========================================================================
whilenot 0
raus
wend
|
| | | | |
| | GDL | Hello here time short ausgebessert CompileMarkSeparationDeclare H%,E%,A$,B$,C$,D$,E$,F$,G$
Declare Init$,Kanal1$,Id%,Pause&
@Closecom(COM1)
Proc Pause
Let Pause& = &Gettickcount
Let Pause& = @Add(Pause&,100)
While @Gt(Pause&,&Gettickcount)
Wend
Endproc
Font 1
Let Id% = COM1
Let H% = @Opencom(COM1,1024,1024)
@Setcom(COM1:19200,N,8,1)
@Setcomext(COM1,10,0,0,$0001,0,0)
Let F$ = @Readcom$(H%,4)
Pause
Let G$ = @Comerror(h%)
Pause
Let Init$=Chr$(1),Chr$(5)Chr$(2),Chr$(6)
Let Kanal1$=Chr$(3),Chr$(5),Chr$(8),Chr$(14)
Print Fehler : ;@Comerror(h%)
@Writecom(H%,Init$)
Pause
@Readcom$(h%,4)
Pause
@Writecom(H%,Kanal1$)
Pause
Print Init$
Print h%
Let F$ = @Readcom$(h%,4)
Pause
Print Fehler : ;@Comerror(h%)
Print Gelesen : ;F$
Pause
Print Gelesen : ;@Readcom$(h%,4)
Pause
@Closecom(h%)
waitinput
|
| | | | |
| | GDL | Nochmal I
lass you Please not through COM3 annoy, have there my Versuchsboard hang.
have there whom Compiler so tuned, that the To conceived byte circa one increased and is then zurückgeschickt becomes.your data go of course gesendet, but not recognized.first The data in the Whilenot schleife go recognized. CompileMarkSeparationDeclare H%,E%,A$,B$,C$,D$,E$,F$,G$
Declare Init$,Kanal1$,Id%,Pause&,anzahl%
@Closecom(COM1)
Proc Pause
Let Pause& = &Gettickcount
Let Pause& = @Add(Pause&,100)
While @Gt(Pause&,&Gettickcount)
Wend
Endproc
Font 1
Let Id% = COM1
Let H% = @Opencom(COM3,1024,1024)
@Setcom(COM3:19200,N,8,1)
@Setcomext(COM1,10,0,0,$0001,0,0)
Let F$ = @Readcom$(H%,4)
Pause
Let G$ = @Comerror(h%)
Pause
Let Init$=Chr$(1),Chr$(5)Chr$(2),Chr$(6)
Let Kanal1$=Chr$(3),Chr$(5),Chr$(8),Chr$(14)
Print Fehler : ;@Comerror(h%)
@Writecom(H%,Init$)
Pause
@Readcom$(h%,4)
Pause
@Writecom(H%,Kanal1$)
Pause
Print Init$
Print Kanal1$
Let F$ = @Readcom$(h%,4)
Pause
Print Fehler : ;@Comerror(h%)
Print Gelesen : ;F$
Pause
Print Gelesen : ;@Readcom$(h%,4)
Pause
=================================================================================
whilenot 0
settimer 100
waitinput
killtimer
init$=001 Hier die Anzahl der Sendebytes
anzahl%=@Writecom(H%,Init$)
Let G$ = @Comerror(h%)
pause
Let F$ = @Readcom$(h%,4)
Let G$ = @Comerror(h%)
drawtext 10,150,Eingang : +f$
drawtext 10,170,Gesendet : +str$(anzahl%)
wend
@ | 02/26/06 ▲ | |
| |
| | Peter Max Müller | Perhaps time there look: [...]
Ciao |
| | | | |
| | Jac de Lad | i'm curious become: i'd gladly a ticket with LCD on the seriellen interface address. has someone ne Idea, where I a kostengünstige herbekomme, The with XProfan programmierbar is?
Jac |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 03/02/06 ▲ |
| |
| | RGH | Hi, straight, what The serial interface angeht, so has it in the running the Time some integral Detailverbesserungen given! for actually speedy computer is the expansion ausa XProfan 9 important: The TimeOuts can extra tuned go. usually is the but not necessary. In previous versions get The TimeOuts in Profan voreingestellt. unfortunately führet these Default-Settings with faster calculate in eingen Make moreover, that the link not correctly zustande comes. ex Version 9.1 is too the Send and receive one individual zero-Bytes no trouble More.
Greeting Roland |
| | | Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 03/03/06 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 10 subscriber: |