Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Communication to COM1
#1
I am trying to interface a PC with a balance using QBasic but I cannot make that the PC can communicate with the balance. I use the following coding:

OPEN "com1:2400,e,7,1,cs,cd,ds,rs,lf" FOR RANDOM AS #1
crlf$ = CHR$(13) + CHR$(10)
in$ = "SI"
gpos = 0
DO UNTIL ((gpos > 0) OR (done = 1))
LOOP
PRINT #1, in$; crlf$
DO WHILE LOC(1) > 0
weight$ = INPUT$(LOC(1), #1)
gpos = INSTR(1, weight$, "g")
CALL DELAY(1, done)
LOOP
PRINT weight$
IF gpos > 0 THEN
PRINT ""
PRINT "Communications verified."
PRINT ""
ELSE PRINT "Communications have not been verified."
END IF
PRINT "Press <space> to start, or q to quit."
go$ = "g"
DO UNTIL ((go$ = " ") OR (go$ = "q"))
go$ = INKEY$
LOOP

Can any one help me on this?

Thank you!!!

Gonzale0
Reply
#2
You know, there is no need to show by using your fancy red font skills 8)
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#3
but you could use code tags. :wink:
sorry, no experience with com 1. Cry
Reply
#4
Speedlemon, Can I PLEASE look inside your giant lemon? PLEASE!?
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply
#5
Offense screen name could you please get the [offensive word] out this thread, you are not helping.
Also if you get this to work please tell me how because I've tried to do the same thing with lpt1. Also try asking at http://forum.basicnetwork.net or ww.qbasic.tk or eved www.qb45.com
atos-Software
http://www.datacentertalk.com - interested in how web hosting works? Here the place to go to find out.
[Image: 42-r]
Reply
#6
Um..Sorry

>_>
<_<
*Runs*
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)