OPEN "com1:19200,n,8,1,RS,DS0" FOR RANDOM AS #1 LEN = 5000 SCREEN 11 CLS REM Issue stop coordiates command, wait for it to take effect, and flush PRINT #1, "0" FOR i = 0 TO 3000: NEXT i IF LOC(1) <> 0 THEN j$ = INPUT$(LOC(1), #1) REM Issue max coordinate command PRINT #1, "6" REM Get max coordinate info a1 = ASC(INPUT$(1, #1)) a2 = ASC(INPUT$(1, #1)): a3 = ASC(INPUT$(1, #1)) a4 = ASC(INPUT$(1, #1)): a5 = ASC(INPUT$(1, #1)) a6 = ASC(INPUT$(1, #1)): a7 = ASC(INPUT$(1, #1)) ph = a6 * 2 + (a7 AND &H1) x0 = (a2 * 128 + a3) '/ 3 y0 = (a4 * 128 + a5) '/ 3 LOCATE 1, 1 PRINT "max. coordinate data of X = ", x0 PRINT "max. coordinate data of Y = ", y0 PRINT "max. value of pressure = ", ph REM Issue diagnostic command PRINT #1, "7" REM Read diagnostic results a1 = ASC(INPUT$(1, #1)) a2 = ASC(INPUT$(1, #1)): a3 = ASC(INPUT$(1, #1)) a4 = ASC(INPUT$(1, #1)): a5 = ASC(INPUT$(1, #1)) a6 = ASC(INPUT$(1, #1)): a7 = ASC(INPUT$(1, #1)) IF (a1 AND &H20) = 0 THEN PRINT "No error on Coils": GOTO fwid PRINT "Coil number(", a2 AND &H1F, ") has a problem" fwid: PRINT "Firmware ID = "; a3, a4 IF (a5 AND &H2) = 1 THEN PRINT "Ram error" IF (a5 AND &H1) = 1 THEN PRINT "Rom error"