T
tyzytyz_cn
Unregistered / Unconfirmed
GUEST, unregistred user!
Dim weight
Open "com2:300,o,7,1,rs,cs0,ds0,cd0" For Random As 1 Len = 72
b:
Input #1, weight$
Print weight$
GoTo b
If Mid$(weight$, 2, 2) = ")0" then
weightr$ = Mid$(weight$, 6, 5)
weight = Val(weightr$)
else
GoTo b
End If
Close #1
Open "w.dat" For Output As #1
Print #1, weight
Close #1
程序的目的是接收COM2口通讯数据,主要是前五句,结果什么也没有PRINT出来,可是用超级终端
发现通讯正常,请有识之士指点一下毛病
Open "com2:300,o,7,1,rs,cs0,ds0,cd0" For Random As 1 Len = 72
b:
Input #1, weight$
Print weight$
GoTo b
If Mid$(weight$, 2, 2) = ")0" then
weightr$ = Mid$(weight$, 6, 5)
weight = Val(weightr$)
else
GoTo b
End If
Close #1
Open "w.dat" For Output As #1
Print #1, weight
Close #1
程序的目的是接收COM2口通讯数据,主要是前五句,结果什么也没有PRINT出来,可是用超级终端
发现通讯正常,请有识之士指点一下毛病