PageRenderTime 25ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/matlab/varassign.m~

http://github.com/Yniold/liftsrc
Unknown | 462 lines | 453 code | 9 blank | 0 comment | 0 complexity | b6c7898dfbb279e3aa0b85b7516b76ee 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('60A6',Tempid(i+1,:)) colTempPhotoOpp=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('colTempPhotoOpp')==0 colTempPhotoOpp=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.0973*(x-9999)','mW';
170'DiodeUVSumDat',672,'16.4/(11390-10000)*(x-10000)','mW';
171'DiodeUVSumSqr',673,'16.4/(11390-10000)*(x-10000)','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'TDetSumDat',931,'x*NaN','C';
215'TDetSumSqr',932,'x*NaN','C';
216'DiodeWZ1out',933,'(x-10000)/30.764','mW'; %calibrated by Mark, 5th November 2008
217'DiodeWZ1outSumDat',934,'x*NaN','mW';
218'DiodeWZ1outSumSqr',935,'x*NaN','mW';
219'DiodeWZ2out',936,'(x-10000)/169.97','mW'; %calibrated by Mark, 5th November 2008
220'DiodeWZ2outSumDat',937,'x*NaN','mW';
221'DiodeWZ2outSumSqr',938,'x*NaN','mW';
222'DiodeWZ1in',939,'(x-10000)./128.08','mW'; %calibrated by Mark, 5th November 2008
223'DiodeWZ1inSumDat',940,'x*NaN','mW';
224'DiodeWZ1inSumSqr',941,'x*NaN','mW';
225'DiodeWZ2in',891,'(x-10000)/97.748','mW'; %calibrated by Mark, 5th November 2008
226'DiodeWZ2inSumDat',892,'x*NaN','mW';
227'DiodeWZ2inSumSqr',893,'x*NaN','mW';
228'PitotAbs',897,'(x-10000-3030/5).*1500./3030-15.8','mbar';
229'PitotAbsSumDat',898,'(x-10000-3030/5).*1500./3030','mbar';
230'PitotAbsSumSqr',899,'(x-10000-3030/5).*1500./3030','mbar';
231'PitotDiff',900,'(x-10000)*5/3030','mbar';
232'PitotDiffSumDat',901,'(x-10000)*5/3030','mbar';
233'PitotDiffSumSqr',902,'(x-10000)*5/3030','mbar';
234'IFilament',716,'x*NaN','A';
235'IFilamentSumDat',717,'x*NaN','A';
236'IFilamentSumSqr',718,'x*NaN','A';
237'Ophir',719,'x','W';
238'OphirSumDat',720,'x','W';
239'OphirSumSqr',721,'x','W';
240'P1000Config',942,'x*NaN','';
241'P20Config',943,'x*NaN','';
242'PNOConfig',944,'x*NaN','';
243'VHVConfig',945,'x*NaN','';
244'TDetSupplyVConfig',946,'x*NaN','';
245'DiodeWZ1outConfig',947,'x*NaN','';
246'DiodeWZ2outConfig',948,'x*NaN','';
247'DiodeWZ1inConfig',949,'x*NaN','';
248'DiodeWZ2inConfig',911,'x*NaN','';
249'PitotAbsConfig',913,'x*NaN','';
250'PitotDiffConfig',914,'x*NaN','';
251'IFilamentConfig',728,'x*NaN','';
252'OphirConfig',729,'x*NaN','';
253'MFCSetFlow',730,'20*x/255','sccm';
254'MFCFlow',731,'20*(x-10010)/(11461-10010)','sccm';
255'ValveVoltLift',732,'x/140','V';
256'ValveLift',733,'x*NaN','';
257'Valve1VoltarmAxis',983,'x/140','V';
258'Valve1armAxis',984,'x*NaN','';
259'Valve2VoltarmAxis',985,'x/140','V';
260'Valve2armAxis',986,'x*NaN','';
261'DCDC4ch0SwitchV',734,'x/140','V';
262'DCDC4ch1SwitchV',735,'x/140','V';
263'DCDC4ch2SwitchV',736,'x/140','V';
264'DCDC4ch3SwitchV',737,'x/140','V';
265'TempMissedLift',738,'x','';
266'TempNumberLift',739,'x','';
267'TempErrCRCLift',740,'x','';
268'TempNoResponseLift',741,'x','';
269'TempLaserPlate',colTempLaserPlate,'x/100-273.15','C';
270'TempLaserPlateStatus',colTempLaserPlate+1,'x*NaN','';
271'TempLaserPlateid',colTempLaserPlate+2,'dec2hex(x)','';
272'TempDyelaser',colTempDyelaser,'x/100-273.15','C';
273'TempDyelaserStatus',colTempDyelaser+1,'x*NaN','';
274'TempDyelaserid',colTempDyelaser+2,'dec2hex(x)','';
275'TempRefCell',colTempRefCell,'x/100-273.15','C';
276'TempRefCellStatus',colTempRefCell+1,'x*NaN','';
277'TempRefCellid',colTempRefCell+2,'dec2hex(x)','';
278'TempDiodeEt',colTempDiodeEt,'x/100-273.15','C';
279'TempDiodeEtStatus',colTempDiodeEt+1,'x*NaN','';
280'TempDiodeEtid',colTempDiodeEt+2,'dec2hex(x)','';
281'Temp4L',colTemp4L,'x/100-273.15','C';
282'Temp4LStatus',colTemp4L+1,'x*NaN','';
283'Temp4Lid',colTemp4L+2,'dec2hex(x)','';
284'TempDiodeUV',colTempDiodeUV,'x/100-273.15','C';
285'TempDiodeUVStatus',colTempDiodeUV+1,'x*NaN','';
286'TempDiodeUVid',colTempDiodeUV+2,'dec2hex(x)','';
287'TempSensCardLift',colTempSensCardLift,'x/100-273.15','C';
288'TempSensCardLiftStatus',colTempSensCardLift+1,'x*NaN','';
289'TempSensCardLiftid',colTempSensCardLift+2,'dec2hex(x)','';
290'TempCPULift',colTempCPULift,'x/100-273.15','C';
291'TempCPULiftStatus',colTempCPULift+1,'x*NaN','';
292'TempCPULiftid',colTempCPULift+2,'dec2hex(x)','';
293'TempDiodeGr',colTempDiodeGr,'x/100-273.15','C';
294'TempDiodeGrStatus',colTempDiodeGr+1,'x*NaN','';
295'TempDiodeGrid',colTempDiodeGr+2,'dec2hex(x)','';
296'TempLUnknown',colTempLUnknown,'x/100-273.15','C';
297'TempLUnknownStatus',colTempLUnknown+1,'x*NaN','';
298'TempLUnknownid',colTempLUnknown+2,'dec2hex(x)','';
299'TempMissedarmAxis',987,'x*NaN','';
300'TempNumberarmAxis',988,'dec2hex(x)','';
301'TempErrCRCarmAxis',989,'x*NaN','';
302'TempNoResponsearmAxis',990,'dec2hex(x)','';
303'TempPump',colTempPump,'x/100-273.15','C';
304'TempPumpStatus',colTempPump+1,'x*NaN','';
305'TempPumpid',colTempPump+2,'dec2hex(x)','';
306'TempPumpOil',colTempPumpOil,'x/100-273.15','C';
307'TempPumpOilStatus',colTempPumpOil+1,'x*NaN','';
308'TempPumpOilid',colTempPumpOil+2,'dec2hex(x)','';
309'TempDiodeWZ1out',colTempWZ1out,'x/100-273.15','C';
310'TempDiodeWZ1outStatus',colTempWZ1out+1,'x*NaN','';
311'TempDiodeWZ1outid',colTempWZ1out+2,'dec2hex(x)','';
312'TempAxisPlate',colTempAxisPlate,'x/100-273.15','C';
313'TempAxisPlateStatus',colTempAxisPlate+1,'x*NaN','';
314'TempAxisPlateid',colTempAxisPlate+2,'dec2hex(x)','';
315'TempArmPS',colTempArmPS,'x/100-273.15','C';
316'TempArmPSStatus',colTempArmPS+1,'x*NaN','';
317'TempArmPSid',colTempArmPS+2,'dec2hex(x)','';
318'TempDiodeWZ1in',colTempWZ1in,'x/100-273.15','C';
319'TempDiodeWZ1inStatus',colTempWZ1in+1,'x*NaN','';
320'TempDiodeWZ1inid',colTempWZ1in+2,'dec2hex(x)','';
321'TempDiodeWZ2in',colTempWZ2in,'x/100-273.15','C';
322'TempDiodeWZ2inStatus',colTempWZ2in+1,'x*NaN','';
323'TempDiodeWZ2inid',colTempWZ2in+2,'dec2hex(x)','';
324'TempTMPSensCard',colTempSensCard,'x/100-273.15','C';
325'TempTMPSensCardStatus',colTempSensCard+1,'x*NaN','';
326'TempTMPSensCardid',colTempSensCard+2,'dec2hex(x)','';
327'TempLaserSync',colTempLasersync,'x/100-273.15','C';
328'TempLaserSyncStatus',colTempLasersync+1,'x*NaN','';
329'TempLaserSyncid',colTempLasersync+2,'dec2hex(x)','';
330'TempInverter',colTempInverter,'x/100-273.15','C';
331'TempInverterStatus',colTempInverter+1,'x*NaN','';
332'TempInverterid',colTempInverter+2,'dec2hex(x)','';
333'TempArmBackWall',colTempArmBackWall,'x/100-273.15','C';
334'TempArmBackWallStatus',colTempArmBackWall+1,'x*NaN','';
335'TempArmBackWallid',colTempArmBackWall+2,'dec2hex(x)','';
336'TempBlower',colTempBlower,'x/100-273.15','C';
337'TempBlowerStatus',colTempBlower+1,'x*NaN','';
338'TempBlowerid',colTempBlower+2,'dec2hex(x)','';
339'TempDiodeWZ2out',colTempWZ2out,'x/100-273.15','C';
340'TempDiodeWZ2outStatus',colTempWZ2out+1,'x*NaN','';
341'TempDiodeWZ2outid',colTempWZ2out+2,'dec2hex(x)','';
342'TempCalPlate',colTempCalPlate,'x/100-273.15','C';
343'TempCalPlateStatus',colTempCalPlate+1,'x*NaN','';
344'TempCalPlateid',colTempCalPlate+2,'dec2hex(x)','';
345'TempHV',colTempHV,'x/100-273.15','C';
346'TempHVStatus',colTempHV+1,'x*NaN','';
347'TempHVid',colTempHV+2,'dec2hex(x)','';
348'TempKuvette',colTempKuvette,'x/100-273.15','C';
349'TempKuvetteStatus',colTempKuvette+1,'x*NaN','';
350'TempKuvetteid',colTempKuvette+2,'dec2hex(x)','';
351'TempPenray',colTempPenray,'x/100-273.15','C';
352'TempPenrayStatus',colTempPenray+1,'x*NaN','';
353'TempPenrayid',colTempPenray+2,'dec2hex(x)','';
354'TempMCP1',colTempMCP1,'x/100-273.15','C';
355'TempMCP1Status',colTempMCP1+1,'x*NaN','';
356'TempMCP1id',colTempMCP1+2,'dec2hex(x)','';
357'TempMCP2',colTempMCP2,'x/100-273.15','C';
358'TempMCP2Status',colTempMCP2+1,'x*NaN','';
359'TempMCP2id',colTempMCP2+2,'dec2hex(x)','';
360'TempPreamp1',colTempPreamp1,'x/100-273.15','C';
361'TempPreamp1Status',colTempPreamp1+1,'x*NaN','';
362'TempPreamp1id',colTempPreamp1+2,'dec2hex(x)','';
363'TempPrallpl',colTempPrallpl,'x/100-273.15','C';
364'TempPrallplStatus',colTempPrallpl+1,'x*NaN','';
365'TempPrallplid',colTempPrallpl+2,'dec2hex(x)','';
366'TempAxis',colTempAxis,'x/100-273.15','C';
367'TempAxisStatus',colTempAxis+1,'x*NaN','';
368'TempAxisid',colTempAxis+2,'dec2hex(x)','';
369'TempScrollMotor',colTempScrollMotor,'x/100-273.15','C';
370'TempScrollMotorStatus',colTempScrollMotor+1,'x*NaN','';
371'TempScrollMotorid',colTempScrollMotor+2,'dec2hex(x)','';
372'TempScrollContr',colTempScrollContr,'x/100-273.15','C';
373'TempScrollContrStatus',colTempScrollContr+1,'x*NaN','';
374'TempScrollContrid',colTempScrollContr+2,'dec2hex(x)','';
375'TempArmTempCard',colTempArmTempCard,'x/100-273.15','C';
376'TempArmTempCardStatus',colTempArmTempCard+1,'x*NaN','';
377'TempArmTempCardid',colTempArmTempCard+2,'dec2hex(x)','';
378'TempPhotoOpp',colTempPhotoOpp,'x/100-273.15','C';
379'TempPhotoOppStatus',colTempPhotoOpp+1,'x*NaN','';
380'TempPhotoOppid',colTempPhotoOpp+2,'dec2hex(x)','';
381'TempPrallhz',colTempPrallhz,'x/100-273.15','C';
382'TempPrallhzStatus',colTempPrallhz+1,'x*NaN','';
383'TempPrallhzid',colTempPrallhz+2,'dec2hex(x)','';
384'TempFiberTube',colTempFiberTube,'x/100-273.15','C';
385'TempFiberTubeStatus',colTempFiberTube+1,'x*NaN','';
386'TempFiberTubeid',colTempFiberTube+2,'dec2hex(x)','';
387'TempWPUnknown',colTempWPUnknown,'x/100-273.15','C';
388'TempWPUnknownStatus',colTempWPUnknown+1,'x*NaN','';
389'TempWPUnknownid',colTempWPUnknown+2,'dec2hex(x)','';
390'EtalonAction',862,'x*NaN','';
391'etaOnlinePosLow',863,'x*NaN','';
392'etaOnlinePosHigh',864,'x*NaN','';
393'RAvgOnOffFlag',865,'x*NaN','';
394'InstrumentAction',866,'x*NaN','';
395'GPSMsecondsUTC',867,'x','s';
396'GPSMLongitude',868,'x/60-180','deg';
397'GPSMLongitudeDecimals',869,'x/10000','min';
398'GPSMLatitude',870,'x/60-90','deg';
399'GPSMLatitudeDecimals',871,'x/10000','min';
400'GPSMAltitude',872,'x','m';
401'GPSMHDOP',873,'x','';
402'GPSMnumSat',874,'x','';
403'GPSMLastValidData',875,'x*5','s';
404'GPSMGroundSpeed',876,'x/100','m/s';
405'GPSMHeading',877,'x/10','deg';
406'GPSSsecondsUTC',1111,'x','s';
407'GPSSLongitude',1112,'x/60-180','deg';
408'GPSSLongitudeDecimals',1113,'x/10000','min';
409'GPSSLatitude',1114,'x/60-90','deg';
410'GPSSLatitudeDecimals',1115,'x/10000','min';
411'GPSSAltitude',1116,'x','m';
412'GPSSHDOP',1117,'x','';
413'GPSSnumSat',1118,'x','';
414'GPSSLastValidData',1119,'x*5','s';
415'GPSSGroundSpeed',1120,'x/100','m/s';
416'GPSSHeading',1121,'x/10','deg';
417'ValidSlaveDataFlag',1122,'x','';
418'PhototubeLamp1',951,'x*NaN','';
419'PhototubeLamp2',954,'x*NaN','';
420'PCuvette',957,'(x-10485).*5.12264e-4+1','bar';
421'PCuvetteSupply',960,'x*NaN','';
422'ButterflyPositionValid',1129,'x','';
423'ButterflyCurrentPosition',1130,'x','';
424'MirrorGr1XAxisLo',1135,'x','';
425'MirrorGr1XAxisHi',1136,'x','';
426'MirrorGr1YAxisLo',1137,'x','';
427'MirrorGr1YAxisHi',1138,'x','';
428'MirrorGr2XAxisLo',1139,'x','';
429'MirrorGr2XAxisHi',1140,'x','';
430'MirrorGr2YAxisLo',1141,'x','';
431'MirrorGr2YAxisHi',1142,'x','';
432'MirrorUV1XAxisLo',1143,'x','';
433'MirrorUV1XAxisHi',1144,'x','';
434'MirrorUV1YAxisLo',1145,'x','';
435'MirrorUV1YAxisHi',1146,'x','';
436'MirrorUV2XAxisLo',1147,'x','';
437'MirrorUV2XAxisHi',1148,'x','';
438'MirrorUV2YAxisLo',1149,'x','';
439'MirrorUV2YAxisHi',1150,'x','';
440'MirrorRealigning',1151,'x','';
441'MirrorMovingFlags',1152,'x','';
442'MirrorMinUVDiffCts',1153,'x','';
443'MirrorRealignMinutes',1154,'x',''
444'I28V',972,'(x-10000)./3030.*80','A';
445'CalFlow0Set',NaN,'(x-2.107).*4.7306e-3','';
446'CalFlow0',NaN,'(x-9985.01).*36.034','sccm';
447'CalFlow1Set',NaN,'(x+3.378).*4.8982e-3','';
448'CalFlow1',NaN,'(x-10014.68).*34.874','sccm';
449'CalFlow2Set',NaN,'(x-1.281).*4.8307e-2','';
450'CalFlow2',NaN,'(x-9992.05).*3.5217','sccm';
451'CalFlow3Set',NaN,'(x+1.0291).*4.8305e-2','';
452'CalFlow3',NaN,'(x-10000.85).*3.5215','sccm';
453};
454
455% create structure 'col' with field names taken from 1st column of
456% statusDataCols and values from 2nd column
457col=cell2struct(statusDataCols(:,2),statusDataCols(:,1),1);
458
459% create structure 'fcts2val' with field names taken from 1st column of
460% statusDataCols and values from 3rd column
461fcts2val=cell2struct(statusDataCols(:,3),statusDataCols(:,1),1);
462