Qbasicnews.com
April 05, 2020, 01:21:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Communication to COM1  (Read 1502 times)
gonzale0
New Member

Posts: 1


« on: June 14, 2004, 05:57:27 PM »

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
Logged
moochthemonkey
I hold this place together
*****
Posts: 801



« Reply #1 on: June 15, 2004, 05:08:54 PM »

You know, there is no need to show by using your fancy red font skills  Cool
Logged

quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
speedlemon
I hold this place together
*****
Posts: 874



« Reply #2 on: June 15, 2004, 05:54:06 PM »

but you could use code tags. :wink:
sorry, no experience with com 1. :cry:
Logged
moochthemonkey
I hold this place together
*****
Posts: 801



« Reply #3 on: June 15, 2004, 05:56:26 PM »

Speedlemon, Can I PLEASE look inside your giant lemon? PLEASE!?
Logged

quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
jatos
Ancient QBer
****
Posts: 464



« Reply #4 on: June 16, 2004, 04:06:53 AM »

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
Logged

atos-Software
http://www.datacentertalk.com - interested in how web hosting works? Here the place to go to find out.
moochthemonkey
I hold this place together
*****
Posts: 801



« Reply #5 on: June 16, 2004, 04:52:37 PM »

Um..Sorry

>_>
<_<
*Runs*
Logged

quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!