MGR10 A/B/C - Revision : I (for 7.0 software revision)
102
2010 mes$ = "sens:fres:mode fast ": GOSUB 300
2012 mes$ = "sour:curr 90,+I ": GOSUB 300
2015 t0 = TIMER
2020 start = 0
2022
2030 PRINT "Measurement no:"; i
2050 mes$ = "read?": GOSUB 300: GOSUB 320
2060 PRINT " result="; val$
2069 PRINT
2072 IF fin = 0 THEN 2092
2080 i = i + 1: GOTO 2030
2092 t2 = TIMER - t0: PRINT "Total test time :"; t2
2094 PRINT "Average time per test :"; t2 / (i - 1)
2095 PRINT "Please press on enter to go on ..."; : INPUT a
2990 fin = 1: CLS : GOSUB 120: RETURN
'
' hipot cycles
'
3000 fin = 1: CLS : RETURN
'
'
' learn function
'
4000 CLS
4132 mes$ = "*lrn?": GOSUB 300: GOSUB 320
4134 PRINT "Parameters:"; val$
4220 RETURN
'
' IDN function
'
5000 CLS
5010 mes$ = "*idn?": GOSUB 300: GOSUB 320
5020 PRINT val$: idn$ = val$
5030 IF (LEN(val$) = 37) THEN num$ = MID$(val$, 19, 2) ELSE num$ = MID$(val$, 19, 3)
5130 RETURN
'
' test function
'
5500 CLS
5510 mes$ = "*tst?": GOSUB 300: GOSUB 320
5520 IF (MID$(val$, 3, 1)) = "0" THEN PRINT "Test ok!"
5600 RETURN
'
'
6000 LOCATE 9
6010 PRINT " ----------------------------------------------------"
6020 PRINT " ! !"
6030 PRINT " ! PROGRAM FOR MGR10 WITH National Instrument !"
6040 PRINT " ! o--------------------------o !"
6050 PRINT " ! Select the menus with the function keys !"
6060 PRINT " ! F1 to F10..... !"
6070 PRINT " ! IEEE488 address = "; a$; " V1.01 !"
6080 PRINT " !--------------------------------------------------!"
6090 RETURN
'
'
' STB status byte decoding for SRQ
'
9400
9410 IF (stp% AND 1) THEN interlock = 0 ELSE interlock = 1
9420 IF (stp% AND 2) THEN erreur = 1 ELSE erreur = 0
9430 IF (stp% AND 4) THEN start = 1 ELSE endtest = 1
9440 IF (stp% AND 8) THEN resul = 1 ELSE resul = 0
9450 RETURN
'
' Error treatement
'