Dragondark
MIS
I'm trying to establish communication through com port 1 on a motherboard based port. The address for the port has been changed in BIOS to 2f8 because there is only one available serial out on this machine, thank you e-machine I am running ms-dos 5.0 on this machine and am using QB ver. 4.5. Here is the code.
CLS
' define com 2 segment
com2 = PEEK(&H402) + 256 * PEEK(&H403)
POKE &H402, com2 AND 255
POKE &H403, com2 \ 256
INPUT "what is the cut length in inches (ex. 62.25)"; length
INPUT "how many cuts on this piece of stock"; quantity
tsteps = length * 2048
skurf = 7000
CLS
PRINT "length:"; length; "x 2048 steps/inch ="; tsteps
FOR DELAY = 1 TO 50000
NEXT DELAY
CLS
PRINT "opening com port for transfer..."
OPEN "com2:9600,n,8,1" FOR RANDOM AS #1
PRINT #1, "XE1"
PRINT #1, "XD1"
(removed filler material)
CLOSE #1
CLS
The problem is that any time I run the program I recieve a "device time out" on the "open com" statement. Does anyone have a sure-fire way to access this port. Thanks in advance!
CLS
' define com 2 segment
com2 = PEEK(&H402) + 256 * PEEK(&H403)
POKE &H402, com2 AND 255
POKE &H403, com2 \ 256
INPUT "what is the cut length in inches (ex. 62.25)"; length
INPUT "how many cuts on this piece of stock"; quantity
tsteps = length * 2048
skurf = 7000
CLS
PRINT "length:"; length; "x 2048 steps/inch ="; tsteps
FOR DELAY = 1 TO 50000
NEXT DELAY
CLS
PRINT "opening com port for transfer..."
OPEN "com2:9600,n,8,1" FOR RANDOM AS #1
PRINT #1, "XE1"
PRINT #1, "XD1"
(removed filler material)
CLOSE #1
CLS
The problem is that any time I run the program I recieve a "device time out" on the "open com" statement. Does anyone have a sure-fire way to access this port. Thanks in advance!