EasyManua.ls Logo

Lakeshore 330 - Page 66

Lakeshore 330
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Lake Shore Model 330 Autotuning Temperature Controller User’s Manual
4-24 Remote Operation
'************************************************************************
'* CURVE LOADING PROGRAM *
'* This routine will load a curve. Get here by entering "CURVE" above. *
'* NOTE: SPACING OF THE DATA STRING IS VERY CRITICAL. *
'* For this example the string data must be on a single line *
'* of an ASCII file using the same format as the attached sample.*
'************************************************************************
LOAD: CURVE$ = SPACE$(2000) 'Preset variable lengths
DELAY = 2000 'Delay timer
PRINT
PRINT "DOWN LOAD A CURVE"
PRINT
INPUT "ENTER DRIVE AND FILE NAME: "; FILE$ 'Get file name from KB
OPEN FILE$ FOR INPUT AS #2 'Open ASCII disk file
LINE INPUT #2, CURVE$ 'Read disk file into string
CLOSE #2 'Close disk file
PRINT 'Get curve number from KB
INPUT "ENTER DESTINATION CURVE NUMBER (11 to 31): "; CURNUM$
IF MID$(CURVE$, 1, 1) = "X" THEN 'Test for DRC curve format
CURVE$ = MID$(CURVE$, 5) 'Strip off DRC file header
CURVE$ = "CURV" + CURNUM$ + CURVE$ 'Add 300 series file header
ELSE
CURVE$ = "CURV" + CURNUM$ + "," + CURVE$ 'Add file header
END IF
PRINT
PRINT "COMMANDS SENT TO 320" 'Screen prints to show what is sent
PRINT
CMD$ = LEFT$(CURVE$, 53) 'Pick out header and first two points
PRINT CMD$ 'Send first command string to screen
CMD$ = CMD$ + TERM$ 'Add terminators
PRINT #1, CMD$ 'Send curve create cmd to 321/320/330
FORZ=1TODELAY: NEXT Z 'Delay
CHRCOUNT = 54 'Character count for next curve point
POINTCOUNT = 3 'Curve data point counter
WHILE LEN(CURVE$) >= CHRCOUNT + 14 'Check for end of string
CMD$ = MID$(CURVE$, CHRCOUNT, 14) 'Take out next point
CHRCOUNT = CHRCOUNT + 14 'Advance count to next point
PRINT POINTCOUNT, SPACE$(11); CMD$ 'Send next point to screen
POINTCOUNT = POINTCOUNT + 1
CMD$ = "ECUR " + CURNUM$ + CMD$ + TERM$ 'Build next command
PRINT #1, CMD$ 'Send to instrument
FORI=1TODELAY: NEXT I 'Delay
WEND
PRINT
PRINT "ENTER CURV?" + CURNUM$+"TORETURN CURVE FROM INSTRUMENT"
PRINT
GOTO LOOP1 'Curve load complete

Table of Contents