Download Print this page

Lakeshore DRC-93C User Manual page 72

Temperature controller

Advertisement

Section IV
Model DRc-93C
4-15
SAMPLE
PROGRAMMING
4 . 1 5 . 1
HP86B Keyboard
Interactive
Program
The following program for the HP86B is an interactive program with the
keyboard of the computer.
For example, when the user sees the prompt on
the screen and types in a valid DRC-93C command such as "WO", the program
will result in the display of the DRC-93C response on the screen.
10
REM Set IEEE Address to
12
20
REM Address Switch
1
OPEN(0) to get
(CR) (LF)
30
interactively from the computer keyboard
40
DIM A$[100]
!
Must be increased for curve information
50
INPUT B$
!
INPUT
KEYBOARD COMMAND
60 OUTPUT 712
;B$
!
SEND
COMMAND
TO
93C
70
ENTER
712
;
A$
!
RECEIVE ANSWER FROM 93C
80
DISP A$
!
DISPLAY ANSWER
90
GOTO
50
100
END
4 . 1 5 . 2
National Instruments
GWBASIC or
BASICA
IBM Example
The following is the same program written for the National Instruments
GPIP-PC2 IEEE-488 Card for IBM
PCs
and Compatibles using Quick Basic
3.0.
10
CLEAR
,60969
!
BASIC DECLARATIONS
20
IBINITl
=
60969 !
This number i s different for each computer
30
IBINIT2
=
IBINITl
+
3
4 0
BLOAD "bib. m"
,
IBINITl
50
CALL
IBINIT1(IBFIND,IBTRG,IBCLR,IBPCT,IBSIC,IBLOC, IBPPC, IBBNA, IBONL,
IBRSC,IBSRE,IBRSV,IPPAD,IBSAD,IBIST,IBDMA,IBEOS,IBTMO,IBEOT,IBRDF,IBWRTF)
60
CALL
IBINT2(IBGTS,IBCAC,IBWAIT,IBPOKE,IBWRT,IBWRTA,IBCMD, IBCMDA, IBRD-
,IBRDA,IBSTOP,IBRPP,IBRSP,IBDIAG,IBSTRC,IBRDI,IBWRTI,IRDIA,IBWRTIA,
IBSTA%,IBERR%,IBCNT%)
70
TEMp$="93C"
!
93C is IEEE address label set up when running IBCONF
80
CALL
IBFIND(TEMP$,TEMP%)
!
Required command to address 93C
90
A$=SPACE$(255)
! 255
largest data transfer allowed by IBM format
100 INPUT B$
!
Entered from keyboard while running
110
B$=B$+CHR$(l3)+CHR$(10)
!
Add
CR
and LF to command
120
CALL
IBWRT(TEMP%,B$)
!
Send command to 93C
130 CALL
IBRD(TEMP%,A$)
!
ENTER from 93C
(SEE
NOTE BELOW)
140
PRINT A$
!
Display received information on screen
150
A$=SPACE$ (255)
!
Clear A$
160 GOTO 110
170
END
180 REM
The
93C
will return data requested, but if the command input
does
190
REM
not request new information, the 93C will give the information
last requested.
REM
This program allows the user to communicate with the 93C,
4-30
COPYRIGHT
3 / 8 8
LSCI

Advertisement

loading