
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
'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
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
FOR Z = 1 TO DELAY: NEXT Z
'Delay
CHRCOUNT = 54
'Character count for next curve point
POINTCOUNT = 3
'Curve data point counter
WHILE LEN(CURVE$) >= CH 14
'Check for end of string
CMD$ = MID$(CURVE$, CHRCOUNT, 14)
'Take out next point
CHRCOUNT = CH 14
'Advance count to next point
PRINT POINTCOUNT, SPACE$(11); CMD$ 'Send next point to screen
POINTCOUNT = POIN 1
CMD$ = "ECUR " + CURNUM$ + CMD$ + TERM$ 'Build next command
PRINT #1, CMD$
'Send to instrument
FOR I = 1 TO DELAY: NEXT I
'Delay
WEND
PRINT
PRINT "ENTER CURV?" + CURNUM$ + " TO RETURN CURVE FROM INSTRUMENT"
PRINT
GOTO LOOP1
'Curve load complete