PageRenderTime 89ms CodeModel.GetById 12ms app.highlight 70ms RepoModel.GetById 1ms app.codeStats 1ms

/matlab/varassign.m

http://github.com/Yniold/liftsrc
Objective C | 469 lines | 460 code | 9 blank | 0 comment | 51 complexity | 4262603cdbed5447c28341a97ee18346 MD5 | raw file
  1function [col,fcts2val]=varassign(Data);
  2% defines cell array with variable names and columns and creates structures
  3% col and fcts2val with fields named after the variables
  4
  5% cell array, 
  6% 1st column contains variable names;
  7% 2nd column reflects column assignments in ReadAvgData.c,
  8% 3rd column contains counts-to-value conversion funcions,
  9% 4th column contains value units. 
 10% edit 2nd column if assignments in ReadAvgData change 
 11% edit 3rd column if sensor calibrations change
 12
 13colTemp0L=742;
 14for i=0:39
 15  x=median(uint16(Data(:,colTemp0L+3*i+2))); 
 16  if (x~=0) %no problem with temperature card
 17    eval(['Tempid(',num2str(i+1),',:)=','dec2hex(x);']);
 18    if strcmp('6B92',Tempid(i+1,:)) colTempLaserPlate=colTemp0L+3*i;
 19    elseif strcmp('3F36',Tempid(i+1,:)) colTempDyelaser=colTemp0L+3*i;
 20    elseif strcmp('506D',Tempid(i+1,:)) colTempRefCell=colTemp0L+3*i;
 21    elseif strcmp('3C93',Tempid(i+1,:)) colTempDiodeEt=colTemp0L+3*i;
 22    elseif strcmp('656B',Tempid(i+1,:)) colTemp4L=colTemp0L+3*i;
 23    elseif strcmp('4227',Tempid(i+1,:)) colTempDiodeUV=colTemp0L+3*i;
 24    elseif strcmp('3D47',Tempid(i+1,:)) colTempSensCardLift=colTemp0L+3*i;
 25    elseif strcmp('403F',Tempid(i+1,:)) colTempCPULift=colTemp0L+3*i;
 26    elseif strcmp('614B',Tempid(i+1,:)) colTempDiodeGr=colTemp0L+3*i;
 27    else colTempLUnknown=colTemp0L+3*i;
 28    end
 29  else colTempLUnknown=colTemp0L+3*i;
 30  end
 31end
 32clear Tempid;
 33
 34colTemp0WP=991;
 35for i=0:39
 36  x=median(uint16(Data(:,colTemp0WP+3*i+2))); 
 37  if (x~=0) %no problem with temperature card
 38    eval(['Tempid(',num2str(i+1),',:)=','dec2hex(x);']);
 39    if strcmp('3E04',Tempid(i+1,:)) colTempKuvette=colTemp0WP+3*i;
 40    elseif strcmp('4DD7',Tempid(i+1,:)) colTempPenray=colTemp0WP+3*i;
 41    elseif strcmp('3E76',Tempid(i+1,:)) colTempAxisPlate=colTemp0WP+3*i;
 42    elseif strcmp('649F',Tempid(i+1,:)) colTempHV=colTemp0WP+3*i;
 43    elseif strcmp('4803',Tempid(i+1,:)) colTempInverter=colTemp0WP+3*i;
 44    elseif strcmp('5E92',Tempid(i+1,:)) colTempPumpOil=colTemp0WP+3*i;
 45    elseif strcmp('B2C4',Tempid(i+1,:)) colTempMCP1=colTemp0WP+3*i;
 46    elseif strcmp('3C81',Tempid(i+1,:)) colTempMCP2=colTemp0WP+3*i;
 47    elseif strcmp('60F8',Tempid(i+1,:)) colTempPreamp1=colTemp0WP+3*i;
 48    elseif strcmp('499C',Tempid(i+1,:)) colTempPrallpl=colTemp0WP+3*i;
 49    elseif strcmp('4AEB',Tempid(i+1,:)) colTempBlower=colTemp0WP+3*i;
 50    elseif strcmp('60A3',Tempid(i+1,:)) colTempArmBackWall=colTemp0WP+3*i;
 51    elseif strcmp('3E76',Tempid(i+1,:)) colTempAxis=colTemp0WP+3*i;
 52    elseif strcmp('473D',Tempid(i+1,:)) colTempLasersync=colTemp0WP+3*i;
 53    elseif strcmp('56CE',Tempid(i+1,:)) colTempArmPS=colTemp0WP+3*i;
 54    elseif strcmp('5970',Tempid(i+1,:)) colTempPump=colTemp0WP+3*i;
 55    elseif strcmp('602A',Tempid(i+1,:)) colTempWZ1out=colTemp0WP+3*i;
 56    elseif strcmp('57DA',Tempid(i+1,:)) colTempCalPlate=colTemp0WP+3*i;
 57    elseif strcmp('87F9',Tempid(i+1,:)) colTempWZ1in=colTemp0WP+3*i;
 58    elseif strcmp('5AC5',Tempid(i+1,:)) colTempWZ2in=colTemp0WP+3*i;
 59    elseif strcmp('A2EF',Tempid(i+1,:)) colTempSensCard=colTemp0WP+3*i; %A2E5?
 60    elseif strcmp('63EB',Tempid(i+1,:)) colTempWZ2out=colTemp0WP+3*i;
 61    elseif strcmp('157B',Tempid(i+1,:)) colTempScrollMotor=colTemp0WP+3*i;
 62    elseif strcmp('28CD',Tempid(i+1,:)) colTempScrollContr=colTemp0WP+3*i;
 63    elseif strcmp('A2E5',Tempid(i+1,:)) colTempArmTempCard=colTemp0WP+3*i;
 64    elseif strcmp('39AD',Tempid(i+1,:)) colTempDetFunnel=colTemp0WP+3*i;
 65    elseif strcmp('4B68',Tempid(i+1,:)) colTempPrallhz=colTemp0WP+3*i;
 66    elseif strcmp('7430',Tempid(i+1,:)) colTempFiberTube=colTemp0WP+3*i;
 67    else colTempWPUnknown=colTemp0WP+3*i;
 68    end
 69  else colTempWPUnknown=colTemp0WP+3*i;
 70  end
 71end
 72
 73if exist('colTempLaserPlate')==0 colTempLaserPlate=NaN; end
 74if exist('colTempDyelaser')==0 colTempDyelaser=NaN; end
 75if exist('colTempRefCell')==0 colTempRefCell=NaN; end
 76if exist('colTempDiodeEt')==0 colTempDiodeEt=NaN; end
 77if exist('colTemp4L')==0 colTemp4L=NaN; end
 78if exist('colTempDiodeUV')==0 colTempDiodeUV=NaN; end
 79if exist('colTempSensCardLift')==0 colTempSensCardLift=NaN; end
 80if exist('colTempCPULift')==0 colTempCPULift=NaN; end
 81if exist('colTempDiodeGr')==0 colTempDiodeGr=NaN; end
 82if exist('colTempLUnknown')==0 colTempLUnknown=NaN; end
 83
 84if exist('colTempKuvette')==0 colTempKuvette=NaN; end
 85if exist('colTempPenray')==0 colTempPenray=NaN; end
 86if exist('colTempAxisPlate')==0 colTempAxisPlate=NaN; end
 87if exist('colTempHV')==0 colTempHV=NaN; end
 88if exist('colTempInverter')==0 colTempInverter=NaN; end
 89if exist('colTempPumpOil')==0 colTempPumpOil=NaN; end
 90if exist('colTempMCP1')==0 colTempMCP1=NaN; end
 91if exist('colTempMCP2')==0 colTempMCP2=NaN; end
 92if exist('colTempPreamp1')==0 colTempPreamp1=NaN; end
 93if exist('colTempPrallpl')==0 colTempPrallpl=NaN; end
 94if exist('colTempBlower')==0 colTempBlower=NaN; end
 95if exist('colTempArmBackWall')==0 colTempArmBackWall=NaN; end
 96if exist('colTempAxis')==0 colTempAxis=NaN; end
 97if exist('colTempLasersync')==0 colTempLasersync=NaN; end
 98if exist('colTempArmPS')==0 colTempArmPS=NaN; end
 99if exist('colTempPump')==0 colTempPump=NaN; end
100if exist('colTempWZ1out')==0 colTempWZ1out=NaN; end
101if exist('colTempCalPlate')==0 colTempCalPlate=NaN; end
102if exist('colTempWZ1in')==0 colTempWZ1in=NaN; end
103if exist('colTempWZ2in')==0 colTempWZ2in=NaN; end
104if exist('colTempSensCard')==0 colTempSensCard=NaN; end
105if exist('colTempWZ2out')==0 colTempWZ2out=NaN; end
106if exist('colTempScrollMotor')==0 colTempScrollMotor=NaN; end
107if exist('colTempScrollContr')==0 colTempScrollContr=NaN; end
108if exist('colTempArmTempCard')==0 colTempArmTempCard=NaN; end
109if exist('colTempDetFunnel')==0 colTempDetFunnel=NaN; end
110if exist('colTempPrallhz')==0 colTempPrallhz=NaN; end
111if exist('colTempFiberTube')==0 colTempFiberTube=NaN; end
112if exist('colTempWPUnknown')==0 colTempLUnknown=NaN; end
113
114statusDataCols=...
115{'PMTThresh',7,'5*(bitand(x,4095))/4096','V';
116'LaserTrigThresh',8,'5*(bitand(x,4095))/4096','V';
117'MCP1Thresh',18,'5*(bitand(x,4095))/4096','V';
118'MCP2Thresh',19,'5*(bitand(x,4095))/4096','V';
119'V5VLift',11,'3*2.5*(bitand(x,4095))/4096','V';
120'V28VLift',12,'16*2.5*(bitand(x,4095))/4096','V';
121'V3_3VLift',13,'5*(bitand(x,4095))/4096','V';
122'V1_5VLift',14,'2.5*(bitand(x,4095))/4096','V';
123'V5VarmAxis',20,'3*2.5*(bitand(x,4095))/4096','V';
124'V28VarmAxis',21,'16*2.5*(bitand(x,4095))/4096','V';
125'V3_3VarmAxis',22,'5*(bitand(x,4095))/4096','V';
126'V1_5VarmAxis',23,'2.5*(bitand(x,4095))/4096','V';
127'ccMasterDelayLift',15,'12+x*4','ns';
128'ccMasterDelayarmAxis',24,'12+x*4','ns';
129'ccShiftDelay0',25,'12+x*4','ns';
130'ccGateDelay0',26,'x*NaN','';
131'ccGateWidth0',27,'x*NaN','';
132'ccData0',28,'x*5','cps';
133'ccMask0',220,'x*NaN','';
134'ccCounts0',232,'x*5','cps';
135'ccPulses0',233,'x*5','cps';
136'ccShiftDelay1',234,'12+x*4','ns';
137'ccGateDelay1',235,'16+x*4','ns';
138'ccGateWidth1',236,'12+x*4','ns';
139'ccData1',237,'x*5','cps';
140'ccMask1',429,'x*NaN','';
141'ccCounts1',441,'x*5','cps';
142'ccPulses1',442,'x*5','cps';
143'ccShiftDelay2',443,'12+x*4','ns';
144'ccGateDelay2',444,'16+x*4','ns';
145'ccGateWidth2',445,'12+x*4','ns';
146'ccData2',446,'x*5','cps';
147'ccMask2',638,'x*NaN','';
148'ccCounts2',650,'x*5','cps';
149'ccPulses2',651,'x*5','cps';
150'etaSetPosLow',652,'x*NaN','';
151'etaSetPosHigh',653,'x*NaN','';
152'etaCurPosLow',654,'x*NaN','';
153'etaCurPosHigh',655,'x*NaN','';
154'etaEncoderPosLow',656,'x*NaN','';
155'etaEncoderPosHigh',657,'x*NaN','';
156'etaIndexPosLow',658,'x*NaN','';
157'etaIndexPosHigh',659,'x*NaN','';
158'etaSetSpd',660,'x','';
159'etaSetAcclSpd',661,'x','';
160'etaCurSpd',662,'x','';
161'etaStatus',663,'x*NaN','';
162'NumSamplesLiftADC1',664,'x*5','s';
163'PDyelaser',665,'(x-9070)/(11463-9070)*991.3','mbar';
164'PDyelaserSumDat',666,'(x-9070)/(11463-9070)*991.3','mbar';
165'PDyelaserSumSqr',667,'(x-9070)/(11463-9070)*991.3','mbar';
166'PDyelaserSupplyV',668,'x*NaN','V';
167'PDyelaserSupplyVSumDat',669,'x*NaN','V';
168'PDyelaserSupplyVSumSqr',670,'x*NaN','V';
169'DiodeUV',671,'0.00743605*(x-10001)','mW'; %calibrated by Korbinian, 10th June 2010
170'DiodeUVSumDat',672,'0.00743605*(x-10001)','mW';
171'DiodeUVSumSqr',673,'0.00743605*(x-10001)','mW';
172'PRef',674,'(x-10320)/(12720-10320)*998.7','mbar';
173'PRefSumDat',675,'x*NaN','mbar';
174'PRefSumSqr',676,'x*NaN','mbar';
175'DiodeEtalon',677,'x*NaN','W';
176'DiodeEtalonSumDat',678,'x*NaN','W';
177'DiodeEtalonSumSqr',679,'x*NaN','W';
178'DiodeGr',680,'(x-10000)/(11690-10000)*2.7','W';
179'DiodeGrSumDat',681,'(x-10000)/(11690-10000)*2.7','W';
180'DiodeGrSumSqr',682,'(x-10000)/(11690-10000)*2.7','W';
181'PVent',683,'(x-9050)/(10497-9050)*998.7','mbar';
182'PVentSumDat',684,'(x-9050)/(10497-9050)*998.7','mbar';
183'PVentSumSqr',685,'(x-9050)/(10497-9050)*998.7','mbar';
184'PVentSupplyV',686,'x*NaN','V';
185'PVentSupplyVSumDat',687,'x*NaN','V';
186'PVentSupplyVSumSqr',688,'x*NaN','V';
187'PDyelaserConfig',689,'x*NaN','';
188'PDyelaserSupplyVConfig',690,'x*NaN','';
189'DiodeUVConfig',691,'x*NaN','';
190'PRefConfig',692,'x*NaN','';
191'DiodeEtalonConfig',693,'x*NaN','';
192'DiodeGrConfig',694,'x*NaN','';
193'PVentConfig',695,'x*NaN','';
194'PVentSupplyVConfig',696,'x*NaN','';
195'NumSamplesarmAxisADC2',917,'x*5','s';
196'P1000',918,'0.44588*(x-9996.6)','mbar';
197'P1000SumDat',919,'0.44588*(x-9996.6)','mbar';
198'P1000SumSqr',920,'0.44588*(x-9996.6)','mbar';
199'P20',921,'0.013345*(x-10012)','mbar';
200'P20SumDat',922,'0.013345*(x-10012)','mbar';
201'P20SumSqr',923,'0.013345*(x-10012)','mbar';
202'PNO',924,'(x-10130)/(10600-10130)*998.7','mbar';
203'PNOSumDat',925,'(x-10130)/(10600-10130)*998.7','mbar';
204'PNOSumSqr',926,'(x-10130)/(10600-10130)*998.7','mbar';
205'VHV',927,'(x-10000)*13.28205/3030','V';
206'VHVSumDat',928,'x*NaN','V';
207'VHVSumSqr',929,'x*NaN','V';
208%Gabriel, HOOVER1 TDet -50-0 �C
209%'TDet',930,'1./(3.3538646E-3+2.565409E-4.*log(680./3000.*(5.*1750./(x-10000)-1))+1.9243889E-6.*(log(680./3000.*(5.*1750./(x-10000)-1))).^2+1.0969244E-7.*(log(680./3000.*(5.*1750./(x-10000)-1))).^3)-273.15','C';
210%TDet -50-0 �C
211%'TDet',930,'1./(3.3538646E-3+2.565409E-4.*log(220000./3000./(4.094.*1550./(x-9999)-1))+1.9243889E-6.*(log(220000./3000./(4.094.*1550./(x-9999)-1))).^2+1.0969244E-7.*(log(220000./3000./(4.094.*1550./(x-9999)-1))).^3)-273.15','C';
212%TDet 0-50 �C:
213%'TDet',930,'1./(3.3540154E-3+2.5627725E-4.*log(220000./3000./(4.094.*1550./(x-9999)-1))+2.082921E-6.*(log(220000./3000./(4.094.*1550./(x-9999)-1))).^2+7.30003206E-8.*(log(220000./3000./(4.094.*1550./(x-9999)-1))).^3)-273.15','C';
214'TDet',930,'1./(3.3540154E-3+2.5627725E-4.*log(22000./3000./(4.094.*1550./(x-9999)-1))+2.082921E-6.*(log(22000./3000./(4.094.*1550./(x-9999)-1))).^2+7.30003206E-8.*(log(22000./3000./(4.094.*1550./(x-9999)-1))).^3)-273.15','C';
215'TDetSumDat',931,'x*NaN','C';
216'TDetSumSqr',932,'x*NaN','C';
217'DiodeWZ1out',933,'0.02686*(x-9999)','mW'; %calibrated by Korbinian, 10th June 2010
218'DiodeWZ1outSumDat',934,'x*NaN','mW';
219'DiodeWZ1outSumSqr',935,'x*NaN','mW';
220'DiodeWZ2out',936,'0.00632*(x-10000)','mW'; %calibrated by Korbinian, 10th June 2010
221'DiodeWZ2outSumDat',937,'x*NaN','mW';
222'DiodeWZ2outSumSqr',938,'x*NaN','mW';
223'DiodeWZ1in',939,'0.00795*(x-10000)','mW'; %calibrated by Korbinian, 10th June 2010
224'DiodeWZ1inSumDat',940,'x*NaN','mW';
225'DiodeWZ1inSumSqr',941,'x*NaN','mW';
226'DiodeWZ2in',891,'0.00955*(x-9999)','mW'; %calibrated by Korbinian, 10th June 2010
227'DiodeWZ2inSumDat',892,'x*NaN','mW';
228'DiodeWZ2inSumSqr',893,'x*NaN','mW';
229'PitotAbs',897,'(x-10000-3030/5).*1500./3030-15.8','mbar';
230'PitotAbsSumDat',898,'(x-10000-3030/5).*1500./3030','mbar';
231'PitotAbsSumSqr',899,'(x-10000-3030/5).*1500./3030','mbar';
232'PitotDiff',900,'(x-10000)*5/3030','mbar';
233'PitotDiffSumDat',901,'(x-10000)*5/3030','mbar';
234'PitotDiffSumSqr',902,'(x-10000)*5/3030','mbar';
235'IFilament',716,'x*NaN','A';
236'IFilamentSumDat',717,'x*NaN','A';
237'IFilamentSumSqr',718,'x*NaN','A';
238'Ophir',719,'x','W';
239'OphirSumDat',720,'x','W';
240'OphirSumSqr',721,'x','W';
241'P1000Config',942,'x*NaN','';
242'P20Config',943,'x*NaN','';
243'PNOConfig',944,'x*NaN','';
244'VHVConfig',945,'x*NaN','';
245'TDetSupplyVConfig',946,'x*NaN','';
246'DiodeWZ1outConfig',947,'x*NaN','';
247'DiodeWZ2outConfig',948,'x*NaN','';
248'DiodeWZ1inConfig',949,'x*NaN','';
249'DiodeWZ2inConfig',911,'x*NaN','';
250'PitotAbsConfig',913,'x*NaN','';
251'PitotDiffConfig',914,'x*NaN','';
252'IFilamentConfig',728,'x*NaN','';
253'OphirConfig',729,'x*NaN','';
254'MFCSetFlow',730,'34.18*x/255','sccm';
255'MFCFlow',731,'34.18*(x-10010)/(11461-10010)','sccm';
256'MFCPropSetFlow',1123,'200*x/255','sccm';
257'MFCPropFlow',1124,'200*(x-10010)/(11461-10010)','sccm';
258'MFCC3F6SetFlow',1125,'500*x/255','sccm';
259'MFCC3F6Flow',1126,'500*(x-10010)/(11461-10010)','sccm';
260'MFCShowerSetFlow',1127,'20000*x/255','sccm';
261'MFCShowerFlow',1128,'20000*(x-10010)/(11461-10010)','sccm';
262'ValveVoltLift',732,'x/140','V';
263'ValveLift',733,'x*NaN','';
264'Valve1VoltarmAxis',983,'x/140','V';
265'Valve1armAxis',984,'x*NaN','';
266'Valve2VoltarmAxis',985,'x/140','V';
267'Valve2armAxis',986,'x*NaN','';
268'DCDC4ch0SwitchV',734,'x/140','V';
269'DCDC4ch1SwitchV',735,'x/140','V';
270'DCDC4ch2SwitchV',736,'x/140','V';
271'DCDC4ch3SwitchV',737,'x/140','V';
272'TempMissedLift',738,'x','';
273'TempNumberLift',739,'x','';
274'TempErrCRCLift',740,'x','';
275'TempNoResponseLift',741,'x','';
276'TempLaserPlate',colTempLaserPlate,'x/100-273.15','C';
277'TempLaserPlateStatus',colTempLaserPlate+1,'x*NaN','';
278'TempLaserPlateid',colTempLaserPlate+2,'dec2hex(x)','';
279'TempDyelaser',colTempDyelaser,'x/100-273.15','C';
280'TempDyelaserStatus',colTempDyelaser+1,'x*NaN','';
281'TempDyelaserid',colTempDyelaser+2,'dec2hex(x)','';
282'TempRefCell',colTempRefCell,'x/100-273.15','C';
283'TempRefCellStatus',colTempRefCell+1,'x*NaN','';
284'TempRefCellid',colTempRefCell+2,'dec2hex(x)','';
285'TempDiodeEt',colTempDiodeEt,'x/100-273.15','C';
286'TempDiodeEtStatus',colTempDiodeEt+1,'x*NaN','';
287'TempDiodeEtid',colTempDiodeEt+2,'dec2hex(x)','';
288'Temp4L',colTemp4L,'x/100-273.15','C';
289'Temp4LStatus',colTemp4L+1,'x*NaN','';
290'Temp4Lid',colTemp4L+2,'dec2hex(x)','';
291'TempDiodeUV',colTempDiodeUV,'x/100-273.15','C';
292'TempDiodeUVStatus',colTempDiodeUV+1,'x*NaN','';
293'TempDiodeUVid',colTempDiodeUV+2,'dec2hex(x)','';
294'TempSensCardLift',colTempSensCardLift,'x/100-273.15','C';
295'TempSensCardLiftStatus',colTempSensCardLift+1,'x*NaN','';
296'TempSensCardLiftid',colTempSensCardLift+2,'dec2hex(x)','';
297'TempCPULift',colTempCPULift,'x/100-273.15','C';
298'TempCPULiftStatus',colTempCPULift+1,'x*NaN','';
299'TempCPULiftid',colTempCPULift+2,'dec2hex(x)','';
300'TempDiodeGr',colTempDiodeGr,'x/100-273.15','C';
301'TempDiodeGrStatus',colTempDiodeGr+1,'x*NaN','';
302'TempDiodeGrid',colTempDiodeGr+2,'dec2hex(x)','';
303'TempLUnknown',colTempLUnknown,'x/100-273.15','C';
304'TempLUnknownStatus',colTempLUnknown+1,'x*NaN','';
305'TempLUnknownid',colTempLUnknown+2,'dec2hex(x)','';
306'TempMissedarmAxis',987,'x*NaN','';
307'TempNumberarmAxis',988,'dec2hex(x)','';
308'TempErrCRCarmAxis',989,'x*NaN','';
309'TempNoResponsearmAxis',990,'dec2hex(x)','';
310'TempPump',colTempPump,'x/100-273.15','C';
311'TempPumpStatus',colTempPump+1,'x*NaN','';
312'TempPumpid',colTempPump+2,'dec2hex(x)','';
313'TempPumpOil',colTempPumpOil,'x/100-273.15','C';
314'TempPumpOilStatus',colTempPumpOil+1,'x*NaN','';
315'TempPumpOilid',colTempPumpOil+2,'dec2hex(x)','';
316'TempDiodeWZ1out',colTempWZ1out,'x/100-273.15','C';
317'TempDiodeWZ1outStatus',colTempWZ1out+1,'x*NaN','';
318'TempDiodeWZ1outid',colTempWZ1out+2,'dec2hex(x)','';
319'TempAxisPlate',colTempAxisPlate,'x/100-273.15','C';
320'TempAxisPlateStatus',colTempAxisPlate+1,'x*NaN','';
321'TempAxisPlateid',colTempAxisPlate+2,'dec2hex(x)','';
322'TempArmPS',colTempArmPS,'x/100-273.15','C';
323'TempArmPSStatus',colTempArmPS+1,'x*NaN','';
324'TempArmPSid',colTempArmPS+2,'dec2hex(x)','';
325'TempDiodeWZ1in',colTempWZ1in,'x/100-273.15','C';
326'TempDiodeWZ1inStatus',colTempWZ1in+1,'x*NaN','';
327'TempDiodeWZ1inid',colTempWZ1in+2,'dec2hex(x)','';
328'TempDiodeWZ2in',colTempWZ2in,'x/100-273.15','C';
329'TempDiodeWZ2inStatus',colTempWZ2in+1,'x*NaN','';
330'TempDiodeWZ2inid',colTempWZ2in+2,'dec2hex(x)','';
331'TempTMPSensCard',colTempSensCard,'x/100-273.15','C';
332'TempTMPSensCardStatus',colTempSensCard+1,'x*NaN','';
333'TempTMPSensCardid',colTempSensCard+2,'dec2hex(x)','';
334'TempLaserSync',colTempLasersync,'x/100-273.15','C';
335'TempLaserSyncStatus',colTempLasersync+1,'x*NaN','';
336'TempLaserSyncid',colTempLasersync+2,'dec2hex(x)','';
337'TempInverter',colTempInverter,'x/100-273.15','C';
338'TempInverterStatus',colTempInverter+1,'x*NaN','';
339'TempInverterid',colTempInverter+2,'dec2hex(x)','';
340'TempArmBackWall',colTempArmBackWall,'x/100-273.15','C';
341'TempArmBackWallStatus',colTempArmBackWall+1,'x*NaN','';
342'TempArmBackWallid',colTempArmBackWall+2,'dec2hex(x)','';
343'TempBlower',colTempBlower,'x/100-273.15','C';
344'TempBlowerStatus',colTempBlower+1,'x*NaN','';
345'TempBlowerid',colTempBlower+2,'dec2hex(x)','';
346'TempDiodeWZ2out',colTempWZ2out,'x/100-273.15','C';
347'TempDiodeWZ2outStatus',colTempWZ2out+1,'x*NaN','';
348'TempDiodeWZ2outid',colTempWZ2out+2,'dec2hex(x)','';
349'TempCalPlate',colTempCalPlate,'x/100-273.15','C';
350'TempCalPlateStatus',colTempCalPlate+1,'x*NaN','';
351'TempCalPlateid',colTempCalPlate+2,'dec2hex(x)','';
352'TempHV',colTempHV,'x/100-273.15','C';
353'TempHVStatus',colTempHV+1,'x*NaN','';
354'TempHVid',colTempHV+2,'dec2hex(x)','';
355'TempKuvette',colTempKuvette,'x/100-273.15','C';
356'TempKuvetteStatus',colTempKuvette+1,'x*NaN','';
357'TempKuvetteid',colTempKuvette+2,'dec2hex(x)','';
358'TempPenray',colTempPenray,'x/100-273.15','C';
359'TempPenrayStatus',colTempPenray+1,'x*NaN','';
360'TempPenrayid',colTempPenray+2,'dec2hex(x)','';
361'TempMCP1',colTempMCP1,'x/100-273.15','C';
362'TempMCP1Status',colTempMCP1+1,'x*NaN','';
363'TempMCP1id',colTempMCP1+2,'dec2hex(x)','';
364'TempMCP2',colTempMCP2,'x/100-273.15','C';
365'TempMCP2Status',colTempMCP2+1,'x*NaN','';
366'TempMCP2id',colTempMCP2+2,'dec2hex(x)','';
367'TempPreamp1',colTempPreamp1,'x/100-273.15','C';
368'TempPreamp1Status',colTempPreamp1+1,'x*NaN','';
369'TempPreamp1id',colTempPreamp1+2,'dec2hex(x)','';
370'TempPrallpl',colTempPrallpl,'x/100-273.15','C';
371'TempPrallplStatus',colTempPrallpl+1,'x*NaN','';
372'TempPrallplid',colTempPrallpl+2,'dec2hex(x)','';
373'TempAxis',colTempAxis,'x/100-273.15','C';
374'TempAxisStatus',colTempAxis+1,'x*NaN','';
375'TempAxisid',colTempAxis+2,'dec2hex(x)','';
376'TempScrollMotor',colTempScrollMotor,'x/100-273.15','C';
377'TempScrollMotorStatus',colTempScrollMotor+1,'x*NaN','';
378'TempScrollMotorid',colTempScrollMotor+2,'dec2hex(x)','';
379'TempScrollContr',colTempScrollContr,'x/100-273.15','C';
380'TempScrollContrStatus',colTempScrollContr+1,'x*NaN','';
381'TempScrollContrid',colTempScrollContr+2,'dec2hex(x)','';
382'TempArmTempCard',colTempArmTempCard,'x/100-273.15','C';
383'TempArmTempCardStatus',colTempArmTempCard+1,'x*NaN','';
384'TempArmTempCardid',colTempArmTempCard+2,'dec2hex(x)','';
385'TempDetFunnel',colTempDetFunnel,'x/100-273.15','C';
386'TempDetFunnelStatus',colTempDetFunnel+1,'x*NaN','';
387'TempDetFunnelid',colTempDetFunnel+2,'dec2hex(x)','';
388'TempPrallhz',colTempPrallhz,'x/100-273.15','C';
389'TempPrallhzStatus',colTempPrallhz+1,'x*NaN','';
390'TempPrallhzid',colTempPrallhz+2,'dec2hex(x)','';
391'TempFiberTube',colTempFiberTube,'x/100-273.15','C';
392'TempFiberTubeStatus',colTempFiberTube+1,'x*NaN','';
393'TempFiberTubeid',colTempFiberTube+2,'dec2hex(x)','';
394'TempWPUnknown',colTempWPUnknown,'x/100-273.15','C';
395'TempWPUnknownStatus',colTempWPUnknown+1,'x*NaN','';
396'TempWPUnknownid',colTempWPUnknown+2,'dec2hex(x)','';
397'EtalonAction',862,'x*NaN','';
398'etaOnlinePosLow',863,'x*NaN','';
399'etaOnlinePosHigh',864,'x*NaN','';
400'RAvgOnOffFlag',865,'x*NaN','';
401'InstrumentAction',866,'x*NaN','';
402'GPSMsecondsUTC',867,'x','s';
403'GPSMLongitude',868,'x/60-180','deg';
404'GPSMLongitudeDecimals',869,'x/10000','min';
405'GPSMLatitude',870,'x/60-90','deg';
406'GPSMLatitudeDecimals',871,'x/10000','min';
407'GPSMAltitude',872,'x','m';
408'GPSMHDOP',873,'x','';
409'GPSMnumSat',874,'x','';
410'GPSMLastValidData',875,'x*5','s';
411'GPSMGroundSpeed',876,'x/100','m/s';
412'GPSMHeading',877,'x/10','deg';
413'GPSSsecondsUTC',1111,'x','s';
414'GPSSLongitude',1112,'x/60-180','deg';
415'GPSSLongitudeDecimals',1113,'x/10000','min';
416'GPSSLatitude',1114,'x/60-90','deg';
417'GPSSLatitudeDecimals',1115,'x/10000','min';
418'GPSSAltitude',1116,'x','m';
419'GPSSHDOP',1117,'x','';
420'GPSSnumSat',1118,'x','';
421'GPSSLastValidData',1119,'x*5','s';
422'GPSSGroundSpeed',1120,'x/100','m/s';
423'GPSSHeading',1121,'x/10','deg';
424'ValidSlaveDataFlag',1122,'x','';
425'PhototubeLamp1',951,'x*NaN','';
426'PhototubeLamp2',954,'x*NaN','';
427'PCuvette',957,'(x-10485).*5.12264e-4+1','bar';
428'PCuvetteSupply',960,'x*NaN','';
429'ButterflyPositionValid',1129,'x','';
430'ButterflyCurrentPosition',1130,'x','';
431'MirrorGr1XAxisLo',1135,'x','';
432'MirrorGr1XAxisHi',1136,'x','';
433'MirrorGr1YAxisLo',1137,'x','';
434'MirrorGr1YAxisHi',1138,'x','';
435'MirrorGr2XAxisLo',1139,'x','';
436'MirrorGr2XAxisHi',1140,'x','';
437'MirrorGr2YAxisLo',1141,'x','';
438'MirrorGr2YAxisHi',1142,'x','';
439'MirrorUV1XAxisLo',1143,'x','';
440'MirrorUV1XAxisHi',1144,'x','';
441'MirrorUV1YAxisLo',1145,'x','';
442'MirrorUV1YAxisHi',1146,'x','';
443'MirrorUV2XAxisLo',1147,'x','';
444'MirrorUV2XAxisHi',1148,'x','';
445'MirrorUV2YAxisLo',1149,'x','';
446'MirrorUV2YAxisHi',1150,'x','';
447'MirrorRealigning',1151,'x','';
448'MirrorMovingFlags',1152,'x','';
449'MirrorMinUVDiffCts',1153,'x','';
450'MirrorRealignMinutes',1154,'x',''
451'I28V',972,'(x-10000)./3030.*80','A';
452'CalFlow0Set',NaN,'(x-2.107).*4.7306e-3','';
453'CalFlow0',NaN,'(x-9985.01).*36.034','sccm';
454'CalFlow1Set',NaN,'(x+3.378).*4.8982e-3','';
455'CalFlow1',NaN,'(x-10014.68).*34.874','sccm';
456'CalFlow2Set',NaN,'(x-1.281).*4.8307e-2','';
457'CalFlow2',NaN,'(x-9992.05).*3.5217','sccm';
458'CalFlow3Set',NaN,'(x+1.0291).*4.8305e-2','';
459'CalFlow3',NaN,'(x-10000.85).*3.5215','sccm';
460};
461
462% create structure 'col' with field names taken from 1st column of
463% statusDataCols and values from 2nd column
464col=cell2struct(statusDataCols(:,2),statusDataCols(:,1),1);
465
466% create structure 'fcts2val' with field names taken from 1st column of
467% statusDataCols and values from 3rd column
468fcts2val=cell2struct(statusDataCols(:,3),statusDataCols(:,1),1);
469