Lake Shore Model 625 Superconducting MPS User’s Manual
5-22
Computer Interface Operation
Table 5-6. Quick Basic IEEE-488 Interface Program
'
IEEEEXAM.BAS EXAMPLE PROGRAM FOR IEEE-488 INTERFACE
'
'
This program works with QuickBasic 4.0/4.5 on an IBM PC or compatible.
'
'
The example requires a properly configured National Instruments GPIB-PC2 card. The REM
'
$INCLUDE statement is necessary along with a correct path to the file QBDECL.BAS.
'
CONFIG.SYS must call GPIB.COM created by IBCONF.EXE prior to running Basic. There must
'
be QBIB.QBL library in the QuickBasic Directory and QuickBasic must start with a link
'
to it. All instrument settings are assumed to be defaults: Address 12, Terminators
'
<CR> <LF> and EOI active.
'
'
To use, type an instrument command or query at the prompt. The computer transmits to
'
the instrument and displays any response. If no query is sent, the instrument responds
'
to the last query received. Type "EXIT" to exit the program.
'
REM $INCLUDE: 'c:\gpib-pc\qbasic\qbdecl.bas'
'Link to IEEE calls
CLS
'Clear screen
PRINT "IEEE-488 COMMUNICATION PROGRAM"
CALL IBFIND("dev12", DEV12%)
'Open communication at address 12
TERM$ = CHR$(13) + CHR$(10)
'Terminators are <CR><LF>
LOOP2: IN$ = SPACE$(2000)
'Clear for return string
LINE INPUT "ENTER COMMAND (or EXIT):"; CMD$
'Get command from keyboard
CMD$ = UCASE$(CMD$)
'Change input to upper case
IF CMD$ = "EXIT" THEN END
'Get out on Exit
CMD$ = CMD$ + TERM$
CALL IBWRT(DEV12%, CMD$)
'Send command to instrument
CALL IBRD(DEV12%, IN$)
'Get data back each time
ENDTEST = INSTR(IN$, CHR$(13))
'Test for returned string
IF ENDTEST > 0 THEN
'String is present if <CR> is seen
IN$ = MID$(IN$, 1, ENDTEST – 1)
'Strip off terminators
PRINT "RESPONSE:", IN$
'Print return string
ELSE
PRINT "NO RESPONSE"
'No string present if timeout
END IF
GOTO LOOP2
'Get next command
Содержание 625
Страница 2: ...Lake Shore Model 625 Superconducting MPS User s Manual A ...
Страница 5: ...Lake Shore Model 625 Superconducting MPS User s Manual D ...
Страница 6: ...Lake Shore Model 625 Superconducting MPS User s Manual C ...
Страница 8: ...Lake Shore Model 625 Superconducting MPS User s Manual E ...
Страница 20: ...Lake Shore Model 625 Superconducting MPS User s Manual 1 8 Introduction This Page Intentionally Left Blank ...
Страница 36: ...Lake Shore Model 625 Superconducting MPS User s Manual 3 10 Installation This Page Intentionally Left Blank ...
Страница 100: ...Lake Shore Model 625 Superconducting MPS User s Manual 6 2 Options and Accessories ...
Страница 101: ...Lake Shore Model 625 Superconducting MPS User s Manual Options and Accessories 6 3 This Page Intentionally Left Blank ...
Страница 102: ......