/matlab/varassignold.m

http://github.com/Yniold/liftsrc · Objective C · 462 lines · 453 code · 9 blank · 0 comment · 51 complexity · ce9896eae72f8274efece390b8b4ea0f MD5 · raw file

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