Section 8
OM6530-C1-00
19 November, 2019
8-8
320
IF IBSTA% < 0 THEN GOSUB 3000
330 REM
330 REM Tell the 6530 Teraohm Bridge-Meter to measure resistance
340 REM
350
WRT$ = "MEAS ON"
360
CALL IBWRT (DEV%,WRT$)
370
IF IBSTA% < 0 THEN GOSUB 3000
380 REM
390 REM Loop on reading the status byte until
400 REM the 6530 says that the reading is complete
410 REM Check that the 6530 is still measuring.
420 REM If not measuring then an error has occurred
430
WRT$ = "MEAS?"
440
CALL IBWRT (DEV%,WRT$)
450
IF IBSTA% < 0 THEN GOSUB 3000
460
RD$ = SPACE$(48)
470
CALL IBRD (DEV%,RD$)
480
IF IBSTA% < 0 THEN GOSUB 3000
490
IF RD$ <> "On" THEN GOTO 4000
500 REM Prevent timeout on Voltage Source
510
WRT$ = "CONF:TEST:VOLT CONT"
520
CALL IBWRT (DEV%,WRT$)
530
IF IBSTA% < 0 THEN GOSUB 3000
540 REM
550 REM Now test the status byte (STB).
560 REM If STB has bit 2 set then the 6530 Teraohm Bridge-Meter
570 REM has finished its reading otherwise
580 REM loop around
590 REM
600
WRT$="*STB?" : CALL IBWRT (DEV%,WRT$)
610
IF IBSTA% < 0 THEN GOSUB 3000
620
RD$ = SPACE$(48) : CALL IBRD (DEV%,RD$)
630
IF IBSTA% < 0 THEN GOSUB 3000
640
IF VAL(RD$) AND &H02 THEN GOTO 700
650
GOTO 430
660 REM
670 REM Ask the 6530 Teraohm Bridge-Meter to give us the next
680 REM measurement
690 REM
660
WRT$ = "READ:RES?" : CALL IBWRT (DEV%,WRT$)
700
IF IBSTA% < 0 THEN GOSUB 3000
710
RD$ = SPACE$(48) : CALL IBRD (DEV%,RD$)
720
IF IBSTA% < 0 THEN GOSUB 3000
730 REM
740 REM Print out the reading and loop around to catch
750 REM the next reading
760 REM
770
PRINT RD$
780
GOTO 430
2000 REM A routine at this location would notify
2010 REM you that the IBFIND call failed, and
2020 REM refer you to the handler software
2030 REM configuration procedures.
2040 PRINT "IBFIND ERROR" : RETURN
3000 REM An error checking routine at this