Ametek 7280 Instruction Manual page 186

Wide bandwidth dsp lock-in amplifier
Table of Contents

Advertisement

Appendix C, DEMONSTRATION PROGRAMS
270 CALL IBCLR(DEV%)
280 '....set timeout to 1 second......................
290 V% = 11: CALL IBTMO(DEV%, V%)
300 '....set status print flag........................
310 INPUT "Display status byte y/n "; R$
320 IF R$ = "Y" OR R$ = "y" THEN DS% = 1 ELSE DS% = 0
330 '....main loop....................................
340 WHILE 1
350
INPUT "command (00 to exit) "; A$
360
IF A$ = "00" THEN END
370
A$ = A$ ' CHR$(13)
380
GOSUB 480
390
S% = 0
400
WHILE (S% AND 1) = 0
410
420
430
440
WEND
445
IF (S% AND 4) THEN PRINT "parameter error"
450
IF (S% AND 2) THEN PRINT "invalid command"
460 WEND
470 '....end of main loop.............................
480 '....write string to bus..........................
490 CALL IBWRT(DEV%, A$): RETURN
500 '....read string from bus.........................
510 B$ = SPACE$(32)
520 CALL IBRD(DEV%, B$): RETURN
530 '......serial poll................................
540 CALL IBRSP(DEV%, S%): RETURN
C-4
GOSUB 530
IF DS% THEN PRINT "S%= "; S%
IF (S% AND 128) THEN GOSUB 500: PRINT B$ ' read bus into B$ and print
' infinite loop
' terminator is <CR>
' write A$ to bus
' initialize S%
' while command not complete
' serial poll, returns S%
' B$ is buffer

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents