12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The macro RtoT_0 ,used above, is one of several in the standard package that convertbetween degrees C and kilohms for common thermistors:# Temperature to kohmsdef TtoR_0 ’local _k # YSI 44011 (100kohm @ 25C) 20 to 120 C$1 = exp(-11.2942 +5.3483e3 /(_k = ($2) + 273.15)\-1.42016e5 /(_k*_k) -1.172e7 /(_k*_k*_k))’# Kohms to temperaturedef RtoT_0 ’local _l # YSI 44011 (100kohm @ 25C) 20 to 120 C$1 = (1/(+2.2764e-3 +2.20116e-4 *(_l = log($2))\+2.61027e-6 *_l*_l +9.02451e-8 *_l*_l*_l) - 273.15)’(The four parameters in each equation were obtained by fitting a table of values suppliedby the manufacturer of the thermistors. No guarantees are made about theaccuracy of the fitted parameters.)The following macro will gradually change (or ramp) a temperature controller to anew set point. If the ramp time is greater than 500 seconds, the temperature ischanged every 10 seconds, otherwise the temperature is changed every 2 seconds.# Read or set or ramp the temperaturedef teramp ’{if ($# == 1) {te $1} else if ($# == 2) {local _i _s1 _f1 _d1 _rtime _stime_f1 = $1_rtime = $2_stime = _rtime < 500? 2:10_s1 = TEMP_SP_d1 = (_f1 - _s1) / _rtime * _stimeqcomment "Ramp Temp Setpoint from %g to %g" "_s1,_f1"for (_i=0; _i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!