Come again graphically? A Schematic!
TV6 can generally interface with the Octagon and alter the values for the set temperature (S% in the temperature control program) or receive the measured temperature (T%). It does this through a program called smartlink, which is also used for downloading the initial BASIC program to the Octagon and communicating to the Octagon in real-time. While the temperature control program is running, the Octagon logs back the critical parameters of the temperature control program to the main computer, which can be observed (and presumably recorded) in smartlink.
On the PM beam-line the Octagon is also responsible for controlling the shutters. Again simply by sending out a signal on one of its output ports, which is converted into the sudden current release from some large capacitors to a solenoid powering the shutters.
The Octagons are placed into individual boxes, which include a power-supply and a little LCD screen used mostly for displaying the current temperature or, while manually setting, the set temperature.
Octagon connections to the outside world are:
Pin 2: | 5 V output |
Pin 10: | Direction |
Pin 13: | Manual Tset enable |
Pin 15: | Tset down |
Pin 16: | Tset up |
AD0: | Voltage Vtemp from TC box corresponding to Temperature reading |
AD1: | Relative ground for AD0 from TC box |
DA0: | Output voltage Vprog controlling current in the TC box. |
DA1: | Output voltage switching the shutter going to shutter box (PM only) |
Octagon manuals are located both in the computer room and in the equipment filing cabinets under "O".
Can also down-load:
Control+"D" gets you into down-loading mode. Type in name of file to
download... watch it get there...
Commonly used pins are:
28: | +24V |
29: | -24V |
33: | 117V AC (H) |
34: | Power Return Ground |
41: | 117 V AC (N) |
42: | High Quality Ground |
B: | - sense |
K: | -Vs |
L: | +Vs |
N: | Ground |
V: | Output |
W: | - Input |
Z: | + Input |
4: | Iexc out |
See "Designing the temperature control electronics" for more details of the TC-Box interior.
Peltier life ends when the connections corrode, which is largely a function of operating hours not under vacuum. Catch the drift?
When maintenance is being done on the beam-line and the sample-cell is thus not under vacuum for prolonged periods, it is probably a good idea to shut off any heating or cooling current (switch of the appropriate power supply), and to avoid water bath temperatures running through the Peltier backplates that cause condensation.
Start the program by escaping the control program and typing (in smartlink) " GOSUB 4000" or "GOSUB .. calibrate temperature conversions". Can also push the two set-buttons on the TC-box simultaneously, or something like that. Have the three resistors (133.00 Ohms, 114.69 Ohms, 93. Ohms) ready. They come mounted in one box with a convenient connector to plug in at the sample chamber and are located in the " T-calibration" box in the " X-ray 1" metal cabinet in the old Rigaku room. Further information about high precision resistors can be found in the Vishay catalogue or in the Precision Resistors section of the temperature control ring binder.
Follow instructions, i.e. connect a new resistor every time the display
tells you to and then press and hold the Tset up switch. The required constants
finally appear on the PC screen in smartlink. Edit them in the file in
the smartlk directory and download the corrected program. Save
the program into non-volatile memory.
In+1 = I n + c1 (Tr-Ts) + c2 dT/dt
where Tr is the temperature reading and Ts is the set temperature.
By choosing the constants conservatively enough, this works fine throughout the temperature range (even when dT/dI is not perfectly constant), can deal with changes in the reference temperature quite readily (i.e. changing the temperature of the Peltier water bath does not affect things) and is not even particularly sensitive to sample stage geometry (within reason), so that the same values for c1 and c2 can in fact be used on all beam-lines.
Fine-tuning c1 and c2 to get fastest ramping (making them too large induces oscillations) is adventurous, not only because of current/temperature non-linearity, but also because the T-reading and particularly the routine computing dT/dt have a lot of noise on it (quite comparable to our long-term precision goal), that can throw off long-term stability.
Effectively, we have ramp-times not much worse than 5 minutes
for any T-distance now, and I guess we can live with that. If a better
performance is required , let me humbly suggest a paper by Duesing et al.
(Rev. Sci. Inst. due out 12.96) which talks about a nifty routine which
however requires tedious T-I calibrations and generally a lot more thinking.
Only flaw I could find is that upon turning on it might overshoot
on the first T-setting, as it will remember the last current value put
out - which might be very large - and take it from there. As it doesn't
only accelerate very slowly, but also brakes very slowly, this might send
it too far by a full 5 K. Can remedy this real easy by adding a line C%
= 0 somewhere for start-up, but that would then imply a big temperature
deviation if the power only goes out momentarily. Personally, I think that
would be worse.
10 CONFIG COM$ 0,0,1,0,0,0
20 CONFIG AIN 0,0,1 That's the T-reading channel
30 CONFIG 4,64:CONFIG 5,0,1,0,1,1: ..Sets up A&C as input, B as
output
40 ON BIT 0,66,0 GOSUB 3500:.. manual set If the Manual-set switch
is toggled-
45 ON BIT 1,66,2 GOSUB 3700:..RESET CURRENT If both buttons are
pressed-
50 START BIT 0
55 START BIT 1
60 DIM T(8):DIM LU(14): FOR I=1 TO 8:T(I)=0:NEXT I
70 C3=100:CZ=C%:C2=1.2:C1=C2/100:C7=1000:C8=-5000:C9=25000
Set a few constants. C1 and C2 are identical to above text. C8 is
minimum T. C7 is (disabled) distance between read and desired temperature
which instantaneously induces max. heating or cooling. C9 is maximum allowed
temperature.
90 B=-1
100 ON COM$ 0 GOSUB 3000
110 FOR I=1 TO 14:READ LU(I):NEXT I
120 GOSUB ..CALCHECK
130 GOSUB ..SETV
140 IF ABS(S%)> 11000 THEN S%=2000 Make sure T-set is not above
110 C
150 IF ABS(C%)>4095 THEN C%=0 Make sure output current is not above
max.
1000 .. Main Temperature control loop
1010 GOSUB ..RTD:.. get current temperature
1020 CZ = C%
1030 IF T% < C8 THEN PRINT#2:PRINT#2,"RTD Disconnected";:AOT 0,0:GOTO
1000
If the T-reading is lower then the minimum expected Temperature,
then that would indicate that the measurement is flawed, thus give a warning
and set out zero current (AOT 0,0)
1040 C5=C2
1045 IF S%<0 THEN C5=C2*2
Different C% (C2 in text) settings for positive and negative currents.
Not sure if that's good.
1050 .. IF (S% - T%) > C7 THEN GOSUB 1400: .. heat at max
Disabled attempt to give instantaneous max. current output for T-ramps.
Not a good idea for this set-up, as braking is VERY slow (i.e. would require
very large C7)
1051 .. IF (T% - S%) > C7 THEN GOSUB 1500: .. cool at max
Ditto
1060 C% = CZ+ C1*(S%-T%)- C5 * V% : .. set current
Actual kernel of the entire routine
1070 IF C% < 0 THEN OUT 65,0 ELSE OUT 65,1
Set direction
1080 IF C% > 4095 THEN C%=4095
1090 IF C% < -4095 THEN C%=-4095
Make sure maxima aren't exceeded
1095 IF T% > C9 THEN AOT 0,0:GOTO 1120
Make sure Temperature is not above maximum defined as C9
1100 AOT 0,ABS(C%)
Send out the current
1110 PRINT TICK(0);T%;S%;V%;C%
Log Temperature, set temperature, dT/dt and current on monitor
1115 IF C%*CZ<0 THEN FOR I=0 TO 1000:NEXT I
Avoid rapid toggling of current direction relay
1120 GOTO 1000
1300 .. get steady current from lut
1310 I1 = INT((S%+4000)/1000)
1320 T1 = (I1-4)*1000: M= (LU(I1+1)-LU(I1))/1000:B=LU(I1)-M*T1
1330 CS = M*S% + B
1340 RETURN
Disabled max. heating routine
1400 .. heat at max until within c7 of setpoint
1410 GOSUB ..RTD
1420 IF T% < C8 THEN GOTO 1000
1422 IF T% > C9 THEN AOT 0,0:GOTO 1430
1425 OUT 65,1:AOT 0,4095
1430 PRINT TICK(0)/100;T%/100;S%;V%,4095
1440 IF S% - T% < C7 THEN CZ = CS:V%=0: RETURN
1450 GOTO 1400
1500 REM
1510 GOSUB ..RTD
1520 IF T% < C8 GOTO 1000
1522 IF T% > C9 THEN AOT 0,0:GOTO 1530
1525 OUT 65,0:AOT 0,4095
1530 PRINT TICK(0)/100;T%/100;S%;V%;-4095
1540 IF T% - S% < C7 THEN CZ = CS: RETURN
1550 GOTO 1500
This part actually reads the temperature and computes dT/dt
(V%)
2000 ..RTD
2001 .. read RTD, convert to Temp.
2010 TS = 0:VS = 0
2040 S = 0
2050 FOR K=1 TO C3
2060 S = S + AIN(0)
2070 NEXT K: S = S/C3
2080 T% = X% + Y%*S + Z%*S*S
2100 FOR K=7 TO 1 STEP -1
2105 T(K+1)=T(K)
2110 NEXT K
2120 T(1) = T%
2130 V% = T(1)+T(2)+T(3)+T(4)-T(5)-T(6)-T(7)-T(8):V%=V%/8
2140 IF (B<0) THENPRINT#2:PRINT#2,"Temp ";:PRINT#2,!"###.##";INT(T%)/100;
2145 IF B>=0 THEN PRINT#2:PRINT#2,"Temp ";:PRINT#2,!"###.##";INT(T%)/100;:PRINT#2,"
C";
2150 RETURN
2500 ..CALCHECK
2510 ..CHECK HOW FAR OFF CALIBRATION IS
2520 READ X,Y,Z
2530 IF ABS(X%-X) > 5000 THEN X%=X
2540 IF ABS(Y%-Y) > 10 THEN Y%=Y
2550 IF ABS(Z%-Z) > 1 THEN Z%=Z
2555 X%=X: Y%=Y: Z%=Z
2560 RETURN
2600 ..SETV
2610 FOR I=1 TO 9
2620 GOSUB ..RTD
2630 NEXT I
2640 RETURN
3000 .. serial communications
3005 X$=COM$(0)
3010 ON COM$ 0 GOSUB
3011 CLEAR COM$ 0
3012 CONFIG COM$ 0,0,1,0,0,0
3015 PRINT X$
3020 IF X$="G" THEN PRINT!"g #####";T%:GOTO 3090
3030 IF X$="S" THEN 3040
3031 IF X$="C" THEN 5000
3032 IF X$="X" THEN 5400
3035 GOTO 3090
3040 INPUT S%
3045 PRINT#2:PRINT#2,"Set:";S%/100;
3050 IF S% < C8 THEN S%=C8
3060 IF S% > C9 THEN S%=C9
3070 ON TICK 100 GOSUB:B=-1
3090 ON COM$ 0 GOSUB 3000
3100 RETURN
3500 .. manual_set
3505 Q=0:QQ=2
3510 PRINT #2
3515 STOP BIT 1
3520 PRINT #2,"Set:";
3530 PRINT #2,!"###.##";INT(S%)/100;
3540 OUT &E8,0
3545 IF Q > 50 THEN QQ = 100
3550 IF S%>C9 THEN S%=C9
3560 IF S%<C8 THEN S%=C8
3570 IF BIT(66,0) = 1 THEN RETURN
3575 IF BIT(66,1) = 1 AND BIT(66,2)=1 THEN QQ = 2:Q=0
3580 IF BIT(66,1) = 0 AND BIT(66,2) =0 THEN GOSUB 4000
3590 IF BIT(66,1) = 0 THEN S%=S%-QQ: Q=Q+1:GOTO 3510
3600 IF BIT(66,2) = 0 THEN S%=S%+QQ: Q=Q+1:GOTO 3510
3610 GOTO 3540
3620 ON BIT 1,66,2 GOSUB 3700:START BIT 1
3700 CZ=0:C%=0: RETURN
This is the routine that works out the constants to convert
an imput voltage into a T-reading, asking you to put in calibration resistors.
4000 .. calibrate temperature conversions
4010 WA=0:WB=0:WC=0:C6=500
4020 PRINT#2:PRINT#2,"calibration";:FOR I=1 TO 5000:NEXT I
4030 PRINT#2:PRINT#2,"contr. cancel";:FOR I=1 TO 5000:NEXT I
4040 .. IF INP(66) AND 1 THEN RETURN
4050 PRINT#2:PRINT#2,"#1 133.00 Ohms";:TA=8730
4060 IF INP(66) AND 4 THEN 4060
4070 FOR I=1 TO 25000:NEXT
4080 FOR I = 1 TO C6: WA = WA + AIN(0): NEXT I : WA = WA/C6
4090 PRINT#2:PRINT#2,"#2: 114.68 Ohms";:TB = 3777
4100 IF INP(66) AND 4 THEN 4100
4110 FOR I=1 TO 25000:NEXT
4120 FOR I = 1 TO C6: WB = WB + AIN(0): NEXT I : WB = WB/C6
4130 PRINT#2:PRINT#2,"#3: 93.01 Ohms";:TC = -1785
4140 IF INP(66) AND 4 THEN 4140
4150 FOR I=1 TO 25000:NEXT
4160 FOR I = 1 TO C6: WC = WC + AIN(0): NEXT I : WC = WC/C6
4170 Z% = (TC-TB)/(WC-WB) - (TA-TB)/(WA-WB):Z% = Z%/(WC-WA)
4180 Y% = (TA-TB)/(WA-WB) - Z%*(WA+WB)
4190 X% = TA - Y%*WA - Z%*WA*WA
4200 PRINT "x% = ";X%
4210 PRINT "y% = ";Y%
4220 PRINT "z% = ";Z%
4230 RETURN
5000 ..CYCLE : rem cycle temperature between two setpoints
5010 INPUT "Enter T1,T2,Interval";S1,S2,WT:WT=WT/100
5011 IF WT=0 THEN WT=1
5015 S%=S1
5020 B = 0
5030 ON TICK 100 GOSUB 5300
5035 ON COM$ 0 GOSUB 3000
5040 RETURN
5300 B=B+1
5310 IF (B MOD WT) = 0 THEN S%=S2
5320 IF (B MOD (2 *WT)) = 0 THEN S%=S1
5330 RETURN
5400 ON TICK 100 GOSUB
5410 ON COM$ 0 GOSUB 3000
5420 B=-1
5430 RETURN
The last of these contains the T-conversion constants currently
in use
10000 DATA -2038,-1112,-532,-113,87,330,571
10010 DATA 789,981,1157,1319,1456,1583,1718
10100 DATA -7455.9,6.06511,9.8959e-5
Christine | TWITCHTM.BAS |
SIT | SITNOW.BAS |
PM | WORK.BAS |
While theoretical maximum heating/cooling rates are large
(>1K/s), current software requires up to five minutes between
two set temperatures (only slightly dependent on the difference between
them).