index_old.php 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677
  1. <html>
  2. <head>
  3. <title>KATRIN Spectrometer and Detector Section Status Overview</title>
  4. <style type="text/css">
  5. body { font-family:Calibri,Arial; }
  6. a:link { text-decoration:none; }
  7. a:visited { text-decoration:none; }
  8. a:hover { text-decoration:none; }
  9. a:active { text-decoration:none; }
  10. a:focus { text-decoration:none; }
  11. </style>
  12. <?php
  13. // get client ip adress to check whether computer is on-site or not
  14. if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
  15. $ip = $_SERVER['HTTP_CLIENT_IP'];
  16. } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  17. $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  18. } else { $ip = $_SERVER['REMOTE_ADDR']; }
  19. $onsite = false;
  20. $slowrefresh = false;
  21. if (substr($ip, 0, 6) == "141.52") { echo '<meta http-equiv="refresh" content="60">'; $onsite = true; }
  22. else { echo '<meta http-equiv="refresh" content="300">'; $slowrefresh= true; }
  23. ?>
  24. </head>
  25. <body>
  26. <?php
  27. function placePic($posY, $posX, $pic, $size, $title)
  28. {
  29. echo '<div title="' . $title . '" style="position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
  30. echo '<img src="pics/' . $pic . '" width="' . $size . '" height="' . $size . '">';
  31. echo '</div>';
  32. }
  33. function placePicWithLink($posY, $posX, $pic, $size, $title, $link)
  34. {
  35. echo '<a href="https://katrin.kit.edu/adei-katrin/#module=graph&db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&db_mask=all&experiment=-&window=86400&module=graph&virtual=srctree&srctree=' . $link . '" target="_blank">';
  36. placePic($posY, $posX, $pic, $size, $title);
  37. echo '</a>';
  38. }
  39. function placeText($posY, $posX, $text, $width, $size, $color)
  40. {
  41. echo '<div align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
  42. echo '<font size="' . $size . '" color="' . $color . '"><b>';
  43. echo $text;
  44. echo '</b></font></div>';
  45. }
  46. function placeTextWithLink($posY, $posX, $text, $width, $size, $color, $title, $link)
  47. {
  48. echo '<div title="' . $title . '" align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
  49. echo '<a href="https://katrin.kit.edu/adei-katrin/#module=graph&db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&db_mask=all&experiment=-&window=86400&module=graph&virtual=srctree&srctree=' . $link . '" target="_blank">';
  50. echo '<font size="' . $size . '" color="' . $color . '"><b>';
  51. echo $text;
  52. echo '</b></font></a></div>';
  53. }
  54. function placeTextWithWebsiteLink($posY, $posX, $text, $width, $size, $color, $title, $link)
  55. {
  56. echo '<div title="' . $title . '" align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
  57. echo '<a href='.$link.'>';
  58. echo '<font size="' . $size . '" color="' . $color . '"><b>';
  59. echo $text;
  60. echo '</b></font></a></div>';
  61. }
  62. function placeBox($posY, $posX, $text, $width, $size, $color)
  63. {
  64. echo '<div align="center" style="background-color:' . $color . '; border-style:solid; border-width:2px; border-color:#000000; width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
  65. echo '<font size="' . $size . '" color=#000000><b>';
  66. echo $text;
  67. echo '</b></font></div>';
  68. }
  69. function getValveStatus($value)
  70. {
  71. $value = decbin($value);
  72. $value = substr("00000000000", 0, 11 - strlen($value)) . $value;
  73. if (substr($value, 3, 1) == 1) return 1;
  74. else if (substr($value, 2, 1) == 1) return 0;
  75. else return -1;
  76. }
  77. ?>
  78. <?php
  79. // ########## SLOW CONTROL CHANNELS ##########
  80. $adeiChannel = array(
  81. array(
  82. "aircoils__aircoils_rep__0__2", //EMCS currents
  83. "aircoils__aircoils_rep__0__3",
  84. "aircoils__aircoils_rep__0__4",
  85. "aircoils__aircoils_rep__0__5",
  86. "aircoils__aircoils_rep__0__6",
  87. "aircoils__aircoils_rep__0__7",
  88. "aircoils__aircoils_rep__0__8",
  89. "aircoils__aircoils_rep__0__9",
  90. "aircoils__aircoils_rep__0__10",
  91. "aircoils__aircoils_rep__0__11",
  92. "aircoils__aircoils_rep__0__12",
  93. "aircoils__aircoils_rep__0__13",
  94. "aircoils__aircoils_rep__0__14",
  95. "aircoils__aircoils_rep__0__15",
  96. "aircoils__aircoils_rep__0__16",
  97. "aircoils__aircoils_rep__0__17"
  98. ),
  99. array(
  100. "aircoils__aircoils_rep__0__34", //EMCS Status
  101. "aircoils__aircoils_rep__0__35",
  102. "aircoils__aircoils_rep__0__36",
  103. "aircoils__aircoils_rep__0__37",
  104. "aircoils__aircoils_rep__0__38",
  105. "aircoils__aircoils_rep__0__39",
  106. "aircoils__aircoils_rep__0__40",
  107. "aircoils__aircoils_rep__0__41",
  108. "aircoils__aircoils_rep__0__42",
  109. "aircoils__aircoils_rep__0__43",
  110. "aircoils__aircoils_rep__0__44",
  111. "aircoils__aircoils_rep__0__45",
  112. "aircoils__aircoils_rep__0__46",
  113. "aircoils__aircoils_rep__0__47",
  114. "aircoils__aircoils_rep__0__48",
  115. "aircoils__aircoils_rep__0__49"
  116. ),
  117. array(
  118. "aircoils__aircoils_rep__0__86", // LEM Status
  119. "aircoils__aircoils_rep__0__87",
  120. "aircoils__aircoils_rep__0__88",
  121. "aircoils__aircoils_rep__0__89",
  122. "aircoils__aircoils_rep__0__90",
  123. "aircoils__aircoils_rep__0__91",
  124. "aircoils__aircoils_rep__0__92",
  125. "aircoils__aircoils_rep__0__93",
  126. "aircoils__aircoils_rep__0__94",
  127. "aircoils__aircoils_rep__0__95",
  128. "aircoils__aircoils_rep__0__96",
  129. "aircoils__aircoils_rep__0__97",
  130. "aircoils__aircoils_rep__0__98",
  131. "aircoils__aircoils_rep__0__99",
  132. "aircoils__aircoils_rep__0__100",
  133. "aircoils__aircoils_rep__0__101",
  134. "aircoils__aircoils_rep__0__102" // HV dipole trigger status
  135. ),
  136. array(
  137. "aircoils__aircoils_rep__0__82", //PS1 + PS2 current
  138. "aircoils__aircoils_rep__0__83",
  139. "aircoils__aircoils_rep__0__84", //PS1 + PS2 Status
  140. "aircoils__aircoils_rep__0__85"
  141. ),
  142. array(
  143. "fpd__katrin_rep__0__153",
  144. "fpd__katrin_rep__0__158"
  145. ),
  146. // Baffle vacuum (index 5, former egun part)
  147. array(
  148. "csms__ControlSystem_MS__432VAK_Kryoleitung__9"
  149. ),
  150. array(
  151. "fpd__katrin_rep__0__43",
  152. "fpd__katrin_rep__0__66",
  153. "fpd__katrin_rep__0__80",
  154. "fpd__katrin_rep__0__99",
  155. "fpd__katrin_rep__0__112",
  156. "fpd__katrin_rep__0__113",
  157. "fpd__katrin_rep__0__116",
  158. "fpd__katrin_rep__0__117",
  159. "fpd__katrin_rep__0__118",
  160. "fpd__katrin_rep__0__60",
  161. "fpd__katrin_rep__0__62",
  162. "fpd__katrin_rep__0__114",
  163. "fpd__katrin_rep__0__45"
  164. ),
  165. array(
  166. "csms__ControlSystem_MS__432VAK_PumpPort2__33",
  167. "csms__ControlSystem_MS__432VAK_PumpPort2__6",
  168. "csms__ControlSystem_MS__432VAK_PumpPort2__12",
  169. "csms__ControlSystem_MS__432VAK_PumpPort2__18",
  170. "csms__ControlSystem_MS__432VAK_PumpPort2__57",
  171. "csms__ControlSystem_MS__432VAK_PumpPort2__60",
  172. "csms__ControlSystem_MS__432VAK_PumpPort2__63",
  173. "csms__ControlSystem_MS__432VAK_PumpPort2__36"
  174. ),
  175. array(
  176. "csms__ControlSystem_MS__432VAK_PumpPort3__24",
  177. "csms__ControlSystem_MS__432VAK_PumpPort3__6",
  178. "csms__ControlSystem_MS__432VAK_PumpPort3__12",
  179. "csms__ControlSystem_MS__432VAK_PumpPort3__18",
  180. "csms__ControlSystem_MS__432VAK_PumpPort3__42",
  181. "csms__ControlSystem_MS__432VAK_PumpPort3__45",
  182. "csms__ControlSystem_MS__432VAK_PumpPort3__48"
  183. ),
  184. array(
  185. "csms__ControlSystem_MS__432VAK_Tank__6", // RPM 106
  186. "csms__ControlSystem_MS__432VAK_Tank__9", // VAI 105
  187. "csms__ControlSystem_MS__432VAK_Tank__0", // RPI 0096
  188. "csms__ControlSystem_MS__432VAK_Tank__15",
  189. "csms__ControlSystem_MS__432VAK_Tank__27",
  190. "csms__ControlSystem_MS__432VAK_Tank__30",
  191. "csms__ControlSystem_MS__432VAK_Tank__33",
  192. "csms__ControlSystem_MS__432VAK_Tank__30",
  193. "csms__ControlSystem_MS__432VAK_Tank__30",
  194. "csms__ControlSystem_MS__432VAK_Tank__30",
  195. "csms__ControlSystem_MS__432VAK_Tank__30"
  196. // "csms__ControlSystem_MS__432VAK_Tank__15",
  197. // "csms__ControlSystem_MS__432VAK_Tank__27",
  198. // "csms__ControlSystem_MS__432VAK_Tank__30",
  199. // "csms__ControlSystem_MS__432VAK_Tank__33",
  200. // "csms__ControlSystem_MS__432VAK_Tank__39",
  201. // "csms__ControlSystem_MS__432VAK_Tank__45",
  202. // "csms__ControlSystem_MS__432VAK_Tank__48",
  203. // "csms__ControlSystem_MS__432VAK_Tank__36"
  204. ),
  205. array( //HV subsystem
  206. "hv__katrin-hv_rep__0__39", // MS vessel IST
  207. "hv__katrin-hv_rep__0__38", // MS vessel SOLL
  208. "hv__katrin-hv_rep__0__87", // MS IE Common electrode IST
  209. "hv__katrin-hv_rep__0__86", // MS IE Common electrode SOLL
  210. "hv__katrin-hv_rep__0__71", // MS IE dipole west IST
  211. "hv__katrin-hv_rep__0__70", // MS IE dipole west SOLL
  212. "hv__katrin-hv_rep__0__79", // MS IE dipole east IST
  213. "hv__katrin-hv_rep__0__78", // MS IE dipole east SOLL
  214. "hv__katrin-hv_rep__0__63",
  215. "hv__katrin-hv_rep__0__62",
  216. "hv__katrin-hv_rep__0__55",
  217. "hv__katrin-hv_rep__0__54",
  218. "hv__katrin-hv_rep__0__132", // dipole relay status
  219. "hv__katrin-hv_rep__0__131", // dipole relay status
  220. "hv__katrin-hv_rep__0__95", // PS vessel IST
  221. "hv__katrin-hv_rep__0__94", // PS vessel SOLL
  222. "hv__katrin-hv_rep__0__103", // PS dipole west IST
  223. "hv__katrin-hv_rep__0__102", // PS dipole west SOLL
  224. "hv__katrin-hv_rep__0__111", // PS dipole east IST
  225. "hv__katrin-hv_rep__0__110", // PS dipole east SOLL
  226. "hv__katrin-hv_rep__0__47", // MS IE Precision Supply IST
  227. "hv__katrin-hv_rep__0__46", // MS IE Precision Supply SOLL
  228. ),
  229. array(
  230. "hv__katrin-hv_rep__1__3",
  231. "hv__katrin-hv_rep__1__10",
  232. "hv__katrin-hv_rep__1__17",
  233. "hv__katrin-hv_rep__1__24",
  234. "hv__katrin-hv_rep__1__31",
  235. "hv__katrin-hv_rep__1__38",
  236. "hv__katrin-hv_rep__1__45",
  237. "hv__katrin-hv_rep__1__52",
  238. "hv__katrin-hv_rep__1__59",
  239. "hv__katrin-hv_rep__1__66",
  240. "hv__katrin-hv_rep__1__73",
  241. "hv__katrin-hv_rep__1__80",
  242. "hv__katrin-hv_rep__1__87",
  243. "hv__katrin-hv_rep__1__94",
  244. "hv__katrin-hv_rep__1__101",
  245. "hv__katrin-hv_rep__1__108",
  246. "hv__katrin-hv_rep__1__115",
  247. "hv__katrin-hv_rep__1__122",
  248. "hv__katrin-hv_rep__1__129",
  249. "hv__katrin-hv_rep__1__136",
  250. "hv__katrin-hv_rep__1__143",
  251. "hv__katrin-hv_rep__1__150",
  252. "hv__katrin-hv_rep__1__157",
  253. "hv__katrin-hv_rep__1__164"
  254. ),
  255. array(
  256. "hv__katrin-hv_rep__1__2",
  257. "hv__katrin-hv_rep__1__9",
  258. "hv__katrin-hv_rep__1__16",
  259. "hv__katrin-hv_rep__1__23",
  260. "hv__katrin-hv_rep__1__30",
  261. "hv__katrin-hv_rep__1__37",
  262. "hv__katrin-hv_rep__1__44",
  263. "hv__katrin-hv_rep__1__51",
  264. "hv__katrin-hv_rep__1__58",
  265. "hv__katrin-hv_rep__1__65",
  266. "hv__katrin-hv_rep__1__72",
  267. "hv__katrin-hv_rep__1__79",
  268. "hv__katrin-hv_rep__1__86",
  269. "hv__katrin-hv_rep__1__93",
  270. "hv__katrin-hv_rep__1__100",
  271. "hv__katrin-hv_rep__1__107",
  272. "hv__katrin-hv_rep__1__114",
  273. "hv__katrin-hv_rep__1__121",
  274. "hv__katrin-hv_rep__1__128",
  275. "hv__katrin-hv_rep__1__135",
  276. "hv__katrin-hv_rep__1__142",
  277. "hv__katrin-hv_rep__1__149",
  278. "hv__katrin-hv_rep__1__156",
  279. "hv__katrin-hv_rep__1__163"
  280. ),
  281. array(
  282. "hv__katrin-hv_rep__2__3",
  283. "hv__katrin-hv_rep__2__10",
  284. "hv__katrin-hv_rep__2__17",
  285. "hv__katrin-hv_rep__2__24",
  286. "hv__katrin-hv_rep__2__31",
  287. "hv__katrin-hv_rep__2__38",
  288. "hv__katrin-hv_rep__2__45",
  289. "hv__katrin-hv_rep__2__52",
  290. "hv__katrin-hv_rep__2__59",
  291. "hv__katrin-hv_rep__2__66",
  292. "hv__katrin-hv_rep__2__73",
  293. "hv__katrin-hv_rep__2__80",
  294. "hv__katrin-hv_rep__2__87",
  295. "hv__katrin-hv_rep__2__94",
  296. "hv__katrin-hv_rep__2__101",
  297. "hv__katrin-hv_rep__2__108",
  298. "hv__katrin-hv_rep__2__115",
  299. "hv__katrin-hv_rep__2__122",
  300. "hv__katrin-hv_rep__2__129",
  301. "hv__katrin-hv_rep__2__136",
  302. "hv__katrin-hv_rep__2__143",
  303. "hv__katrin-hv_rep__2__150",
  304. "hv__katrin-hv_rep__2__157",
  305. "hv__katrin-hv_rep__2__164"
  306. ),
  307. array(
  308. "hv__katrin-hv_rep__2__2",
  309. "hv__katrin-hv_rep__2__9",
  310. "hv__katrin-hv_rep__2__16",
  311. "hv__katrin-hv_rep__2__23",
  312. "hv__katrin-hv_rep__2__30",
  313. "hv__katrin-hv_rep__2__37",
  314. "hv__katrin-hv_rep__2__44",
  315. "hv__katrin-hv_rep__2__51",
  316. "hv__katrin-hv_rep__2__58",
  317. "hv__katrin-hv_rep__2__65",
  318. "hv__katrin-hv_rep__2__72",
  319. "hv__katrin-hv_rep__2__79",
  320. "hv__katrin-hv_rep__2__86",
  321. "hv__katrin-hv_rep__2__93",
  322. "hv__katrin-hv_rep__2__100",
  323. "hv__katrin-hv_rep__2__107",
  324. "hv__katrin-hv_rep__2__114",
  325. "hv__katrin-hv_rep__2__121",
  326. "hv__katrin-hv_rep__2__128",
  327. "hv__katrin-hv_rep__2__135",
  328. "hv__katrin-hv_rep__2__142",
  329. "hv__katrin-hv_rep__2__149",
  330. "hv__katrin-hv_rep__2__156",
  331. "hv__katrin-hv_rep__2__163"
  332. ),
  333. array(
  334. "csms__ControlSystem_MS__430KRYO_Baffel__147",
  335. "csms__ControlSystem_MS__430KRYO_Baffel__159",
  336. "csms__ControlSystem_MS__430KRYO_Baffel__171",
  337. "csms__ControlSystem_MS__430KRYO_Baffel__183",
  338. "csms__ControlSystem_MS__430KRYO_Baffel__189",
  339. "csms__ControlSystem_MS__430KRYO_Baffel__195",
  340. "csms__ControlSystem_MS__430KRYO_Baffel__120",
  341. "csms__ControlSystem_MS__430KRYO_Baffel__123"
  342. ),
  343. array(
  344. "precmm0__PrecMagnet__NorthRing__0",
  345. "precmm0__PrecMagnet__NorthRing__1",
  346. "precmm0__PrecMagnet__NorthRing__2",
  347. "precmm0__PrecMagnet__NorthRing__7",
  348. "precmm0__PrecMagnet__NorthRing__8",
  349. "precmm0__PrecMagnet__NorthRing__9",
  350. "precmm0__PrecMagnet__NorthRing__14",
  351. "precmm0__PrecMagnet__NorthRing__15",
  352. "precmm0__PrecMagnet__NorthRing__16",
  353. "precmm0__PrecMagnet__NorthRing__21",
  354. "precmm0__PrecMagnet__NorthRing__22",
  355. "precmm0__PrecMagnet__NorthRing__23"
  356. ),
  357. array(
  358. "precmm0__PrecMagnet__MidRing__0",
  359. "precmm0__PrecMagnet__MidRing__1",
  360. "precmm0__PrecMagnet__MidRing__2",
  361. "precmm0__PrecMagnet__MidRing__7",
  362. "precmm0__PrecMagnet__MidRing__8",
  363. "precmm0__PrecMagnet__MidRing__9",
  364. "precmm0__PrecMagnet__MidRing__14",
  365. "precmm0__PrecMagnet__MidRing__15",
  366. "precmm0__PrecMagnet__MidRing__16",
  367. "precmm0__PrecMagnet__MidRing__21",
  368. "precmm0__PrecMagnet__MidRing__22",
  369. "precmm0__PrecMagnet__MidRing__23",
  370. "precmm0__PrecMagnet__MidRing__28",
  371. "precmm0__PrecMagnet__MidRing__29",
  372. "precmm0__PrecMagnet__MidRing__30",
  373. "precmm0__PrecMagnet__MidRing__35",
  374. "precmm0__PrecMagnet__MidRing__36",
  375. "precmm0__PrecMagnet__MidRing__37"
  376. ),
  377. array(
  378. "precmm0__PrecMagnet__SouthRing__0",
  379. "precmm0__PrecMagnet__SouthRing__1",
  380. "precmm0__PrecMagnet__SouthRing__2",
  381. "precmm0__PrecMagnet__SouthRing__7",
  382. "precmm0__PrecMagnet__SouthRing__8",
  383. "precmm0__PrecMagnet__SouthRing__9",
  384. "precmm0__PrecMagnet__SouthRing__14",
  385. "precmm0__PrecMagnet__SouthRing__15",
  386. "precmm0__PrecMagnet__SouthRing__16",
  387. "precmm0__PrecMagnet__SouthRing__21",
  388. "precmm0__PrecMagnet__SouthRing__22",
  389. "precmm0__PrecMagnet__SouthRing__23"
  390. ),
  391. array(
  392. "fpd__katrin_rep__0__198",
  393. "fpd__katrin_rep__0__199",
  394. "fpd__katrin_rep__0__200"
  395. ),
  396. array(
  397. "csms__ControlSystem_MS__435HZ_Temperatur__27",
  398. "csms__ControlSystem_MS__435HZ_Temperatur__33",
  399. "csms__ControlSystem_MS__435HZ_Temperatur__42",
  400. "csms__ControlSystem_MS__435HZ_Temperatur__45"
  401. ),
  402. array(
  403. "aircoils__aircoils_rep__1__2",
  404. "aircoils__aircoils_rep__1__3",
  405. "aircoils__aircoils_rep__1__4",
  406. "aircoils__aircoils_rep__1__5",
  407. "aircoils__aircoils_rep__1__6",
  408. "aircoils__aircoils_rep__1__7",
  409. "aircoils__aircoils_rep__1__8",
  410. "aircoils__aircoils_rep__1__9",
  411. "aircoils__aircoils_rep__1__10",
  412. "aircoils__aircoils_rep__1__11",
  413. "aircoils__aircoils_rep__1__12",
  414. "aircoils__aircoils_rep__1__13",
  415. "aircoils__aircoils_rep__1__14",
  416. "aircoils__aircoils_rep__1__15",
  417. "aircoils__aircoils_rep__1__16",
  418. "aircoils__aircoils_rep__1__17"
  419. ),
  420. array(
  421. "aircoils__aircoils_rep__1__18",
  422. "aircoils__aircoils_rep__1__19",
  423. "aircoils__aircoils_rep__1__20",
  424. "aircoils__aircoils_rep__1__21",
  425. "aircoils__aircoils_rep__1__22",
  426. "aircoils__aircoils_rep__1__23",
  427. "aircoils__aircoils_rep__1__24",
  428. "aircoils__aircoils_rep__1__25",
  429. "aircoils__aircoils_rep__1__26",
  430. "aircoils__aircoils_rep__1__27",
  431. "aircoils__aircoils_rep__1__28",
  432. "aircoils__aircoils_rep__1__29",
  433. "aircoils__aircoils_rep__1__30",
  434. "aircoils__aircoils_rep__1__31",
  435. "aircoils__aircoils_rep__1__32",
  436. "aircoils__aircoils_rep__1__33"
  437. ),
  438. array(
  439. "aircoils__aircoils_rep__1__57",
  440. "aircoils__aircoils_rep__1__58",
  441. "aircoils__aircoils_rep__1__43",
  442. "aircoils__aircoils_rep__1__44",
  443. "aircoils__aircoils_rep__1__45",
  444. "aircoils__aircoils_rep__1__46",
  445. "aircoils__aircoils_rep__1__47",
  446. "aircoils__aircoils_rep__1__48",
  447. "aircoils__aircoils_rep__1__49",
  448. "aircoils__aircoils_rep__1__50",
  449. "aircoils__aircoils_rep__1__51",
  450. "aircoils__aircoils_rep__1__52",
  451. "aircoils__aircoils_rep__1__53",
  452. "aircoils__aircoils_rep__1__54",
  453. "aircoils__aircoils_rep__1__55",
  454. "aircoils__aircoils_rep__1__56",
  455. "aircoils__aircoils_rep__1__38"
  456. ),
  457. // CPS current (index 24)
  458. array(
  459. "cscps__ControlSystem_CPS__320_MAG_Stromzufuhr__0"
  460. ) ,
  461. // PP2 TMP temps (index 25)
  462. array(
  463. "csms__ControlSystem_MS__435HZ_PumpPort2__78",
  464. "csms__ControlSystem_MS__435HZ_PumpPort2__81",
  465. "csms__ControlSystem_MS__435HZ_PumpPort2__84"
  466. ),
  467. // PP3 TMP temps (index 26)
  468. array(
  469. "csms__ControlSystem_MS__435HZ_PumpPort3__60",
  470. "csms__ControlSystem_MS__435HZ_PumpPort3__63",
  471. "csms__ControlSystem_MS__435HZ_PumpPort3__66"
  472. ),
  473. // PS vacuum system (index 27)
  474. array(
  475. "csps__ControlSystem_PS__412VAK_PumpPort__27", // CC1232
  476. "csps__ControlSystem_PS__412VAK_PumpPort__6", // TMP 1122 speed
  477. "csps__ControlSystem_PS__412VAK_PumpPort__12", // TMP 1123 speed
  478. "csps__ControlSystem_PS__412VAK_PumpPort__42", // VAO 1313 ZUST
  479. "csps__ControlSystem_PS__412VAK_PumpPort__45", // VAO 1314 ZUST
  480. "csps__ControlSystem_PS__412VAK_PumpPort__21" // Ex1221
  481. ),
  482. // MS PP1 vacuum (index 28)
  483. array(
  484. "csms__ControlSystem_MS__432VAK_PumpPort1__0"
  485. ),
  486. // PS Temperatures (index 29)
  487. array(
  488. "csps__ControlSystem_PS__415HZ_Tank__78",
  489. "csps__ControlSystem_PS__415HZ_Tank__84",
  490. "csps__ControlSystem_PS__415HZ_Tank__90"
  491. ) ,
  492. // Voltage monitoring K35 etc. (index 30)
  493. array(
  494. "hv__katrin-hv_rep__7__2", //K35 divided voltage
  495. "hv__katrin-hv_rep__7__5" //K65 divided voltage
  496. ),
  497. // Interlock V4 and Detector Valve (index 31)
  498. array(
  499. "csms__ControlSystem_MS__436HV_Interlook__6" //CRT 5221 Freigabe
  500. )
  501. );
  502. $username = 'katrin';
  503. $password = 'neutrino';
  504. $context = stream_context_create(array(
  505. 'http' => array(
  506. 'header' => "Authorization: Basic " . base64_encode("$username:$password"), "Connection: close\r\n"
  507. )
  508. ));
  509. $errorcount = 0;
  510. $errormessage = '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
  511. for ($id = 0; $id < sizeof($adeiChannel); $id++)
  512. {
  513. $adeiChannels = "";
  514. for ($id2 = 0; $id2 < sizeof($adeiChannel[$id]); $id2++)
  515. {
  516. $adeiChannels = $adeiChannels . $adeiChannel[$id][$id2] . ",";
  517. }
  518. $adeiChannels = substr($adeiChannels, 0, strlen($adeiChannels) - 1);
  519. $fileip = file_get_contents("http://katrin.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=60&format=csv", false, $context);
  520. //$fileip = file_get_contents("http://ipekatrinbackupserv1.ipe.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=60&format=csv", false, $context);
  521. //$fileip = file_get_contents("http://katrin.kit.edu/adei-katrin/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=10&format=csv", false, $context);
  522. //if ($id == 9) echo $fileip . "<br> <br>"; // echo debug info for one single group
  523. if (substr($fileip,0,5) == "ERROR")
  524. {$errorcount++; $errormessage = $errormessage . "Error loading ADEI channel " . $id . "<br>";}
  525. for ($id2 = sizeof($adeiChannel[$id]) - 1 ; $id2 > -1; $id2--)
  526. {
  527. $pos = strrpos($fileip, ",");
  528. $adeiValue[$id][$id2] = floatval(substr($fileip, $pos + 2));
  529. $fileip = substr($fileip, 0, $pos);
  530. //echo "<br>" . $fileip . "<br> <br>" . $id . ", " . $id2 . ", " . $adeiValue[$id][$id2] . "<br>";
  531. }
  532. }
  533. /*
  534. // special case: temperature ramp speed (array 21) !!!!!!!!!!
  535. $id = 21;
  536. $adeiChannels = "";
  537. for ($id2 = 0; $id2 < sizeof($adeiChannel[$id]); $id2++)
  538. {
  539. $adeiChannels = $adeiChannels . $adeiChannel[$id][$id2] . ",";
  540. }
  541. $adeiChannels = substr($adeiChannels, 0, strlen($adeiChannels) - 1);
  542. $fileip = file_get_contents("http://katrin.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&window=" . (time() - 3600) . "-" . (time() - 3600 + 60) . "&format=csv", false, $context);
  543. for ($id2 = sizeof($adeiChannel[$id]) - 1 ; $id2 > -1; $id2--)
  544. {
  545. $pos = strrpos($fileip, ",");
  546. $adeiValue[$id][$id2 + 4] = floatval(substr($fileip, $pos + 2));
  547. $fileip = substr($fileip, 0, $pos);
  548. }
  549. */
  550. // ########## TIME STAMP ##########
  551. echo '<font size="6" color="#000000"><b>KATRIN Spectrometer and Detector Section Status Overview</b></font><br>';
  552. echo '<font size="5" color="#000000">' . date(DATE_RFC822) . '</font><br>';
  553. if ($errorcount >0) echo $errormessage;
  554. ?>
  555. <div style="position:absolute; top:150px; left:0px">
  556. <img src="pics/beamline_noMoS.png">
  557. <div style="position:absolute; top:20px; left:315px">
  558. <img src="pics/spectrometer.png" width="1130" height="596">
  559. </div>
  560. <div style="position:absolute; top:-140px; left:1800px">
  561. <img src="pics/katrin_logo.jpg" width="100" height="100">
  562. </div>
  563. <a href="mailto:thuemmler@kit.edu">
  564. <div title="send email to Thomas Thuemmler" style="position:absolute; top:-70px; left:8px">
  565. <img src="pics/newEmail.png" width="23" height="23">
  566. </div>
  567. </a>
  568. <?php
  569. if ($onsite) echo '<br>Requested from inside KIT network.<br>';
  570. $tol = 0.5;
  571. // ########## VALVES ##########
  572. // V4
  573. $value = $adeiValue[31][0];
  574. $pic = "valve";
  575. if ($value == 1) $pic = $pic . "FREE";
  576. else if ($value == 0) $pic = $pic . "Off";
  577. placePicWithLink(303, 60, $pic . ".png", 30, "status CPS-PS gate vlave V4 &#10;purple: clearance to open, red: no clearance, grey: undefined", $adeiChannel[6][0]);
  578. // PS
  579. $value = 1; //getValveStatus($adeiValue[9][0]);
  580. $pic = "valve";
  581. if ($value == 1) $pic = $pic . "On";
  582. else if ($value == 0) $pic = $pic . "Off";
  583. placePicWithLink(303, 283, $pic . ".png", 30, "status PS beam-line gate valve&#10;green: open, red: closed, grey: undefined", $adeiChannel[9][0]);
  584. // FPD
  585. $value = $adeiValue[6][0];
  586. $pic = "valve";
  587. if ($value == 1) $pic = $pic . "On";
  588. else if ($value == 0) $pic = $pic . "Off";
  589. placePicWithLink(303, 1466, $pic . ".png", 30, "status FPD beam-line gate valve&#10;green: open, red: closed, grey: undefined", $adeiChannel[6][0]);
  590. // ########## MAGNETS ##########
  591. // CPS
  592. $NlCPS = 20550 / 0.9133;
  593. $BfieldCPS = 1.26e-6 * $adeiValue[24][0] * $NlCPS; // mu0 * I * N/l
  594. if ($BfieldCPS < 0.1) { $value = "OFF"; $color = "#FF0000"; }
  595. else { $value = sprintf('%.1F T', $BfieldCPS); $color = "#000000"; }
  596. placeTextWithLink(240, 2, $value, 60, 5, $color, "field of CPS behind separation wall derived from current", $adeiChannel[24][0]);
  597. placeText(265, 2, "CPS", 60, 2, "#000000");
  598. // PS1
  599. if ($adeiValue[3][3] == 0) { $value = "LEM"; $color = "#FF0000"; }
  600. else { $value = sprintf('%.1F T', $adeiValue[3][1] / 157.0 * 4.5); $color = "#000000"; }
  601. placeTextWithLink(240, 66, $value, 70, 5, $color, "stand-alone center field PS1 magnet", $adeiChannel[3][1]);
  602. placeText(265, 66, "PS1", 70, 2, "#000000");
  603. // PS2
  604. if ($adeiValue[3][2] == 0) { $value = "LEM"; $color = "#FF0000"; }
  605. else { $value = sprintf('%.1F T', $adeiValue[3][0] / 157.0 * 4.5); $color = "#000000"; }
  606. placeTextWithLink(240, 274, $value, 70, 5, $color, "stand-alone center field PS2 magnet", $adeiChannel[3][0]);
  607. placeText(265, 274, "PS2", 70, 2, "#000000");
  608. // Pinch
  609. placeTextWithLink(240, 1420, sprintf('%.1F', $adeiValue[4][0] / 86.98 * 6.0) . " T", 70, 5, "#000000", "stand-alone center field PCH magnet", $adeiChannel[4][0]);
  610. placeText(265, 1420, "PCH", 70, 2, "#000000");
  611. // Detector
  612. placeTextWithLink(240, 1495, sprintf('%.1F', $adeiValue[4][1] / 93.59 * 6.0) . " T", 70, 5, "#000000", "stand-alone center field DET magnet", $adeiChannel[4][1]);
  613. placeText(265, 1495, "DET", 70, 2, "#000000");
  614. // ########## PAE ##########
  615. placeTextWithLink(303, 1553, sprintf('%.1F', $adeiValue[6][2]) . " kV", 90, 5, "#000000", "PAE potential", $adeiChannel[6][2]);
  616. placeText(328, 1553, "PAE", 90, 2, "#000000");
  617. // ########## PUMP PORTS ##########
  618. placeText(416, 1623, "PP2", 50, 2, "#000000");
  619. placeText(466, 1623, "PP1", 50, 2, "#000000");
  620. placeText(516, 1623, "PP3", 50, 2, "#000000");
  621. // ########## BAFFLE ##########
  622. $max = array( 90, 94, 88 );
  623. placeText(560, 1395, "LN<sub>2</sub> Tank", 130, 5, "#000000");
  624. $link = $adeiChannel[15][6] . "," . $adeiChannel[15][7];
  625. placePicWithLink(562,1360, "LN2tank.png", 60, "LN2 tank", $link);
  626. $value = $adeiValue[15][6];
  627. $link = $adeiChannel[15][6];
  628. $text = sprintf('%.0F', $value) . " %";
  629. placeTextWithLink(590, 1395, $text, 70, 4, "#000000", "LN2 tank level", $link);
  630. $value = $adeiValue[15][7];
  631. $link = $adeiChannel[15][7];
  632. $text = sprintf('%.1F', $value) . " bar";
  633. placeTextWithLink(590, 1450, $text, 70, 4, "#000000", "LN2 tank pressure", $link);
  634. for ($id = 0; $id < 3; $id++)
  635. {
  636. $value = $adeiValue[15][$id];
  637. $pic = "ice.png";
  638. $text = "---";
  639. if ($value < 800)
  640. {
  641. $text = sprintf('%.0F', $value) . " K";
  642. if ($value > $max[$id]) $pic = "iceOff.png";
  643. else
  644. {
  645. $value = $adeiValue[15][$id + 3];
  646. if ($value > 0.1 && $value < 7.0) $pic = "iceOn.png";
  647. else $pic = "iceBlink.gif";
  648. }
  649. }
  650. $pos = $id;
  651. if ($id == 0) $pos = 1;
  652. else if ($id == 1) $pos = 0;
  653. $link = $adeiChannel[15][$id] . "," . $adeiChannel[15][$id + 3];
  654. placePicWithLink(410 + $pos * 50, 1375, $pic, 30, "status baffle PP" . ($id + 1) . "&#10;blue: cooled, red: warmed, blinking: warming, grey: undefined", $link);
  655. placeTextWithLink(437 + $pos * 50, 1355, $text, 70, 4, "#000000", "temperature baffle PP" . ($id + 1), $link);
  656. }
  657. // ########## PRESSURES ##########
  658. // CC2320
  659. $value = $adeiValue[7][0];
  660. $pic = "cc";
  661. $text = "---";
  662. if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
  663. else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  664. placePicWithLink(410, 1435, $pic . ".png", 30, "status cold cathode gauge CC2320&#10;green: on, red: off, grey: undefined", $adeiChannel[7][0]);
  665. placeTextWithLink(439, 1415, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC2320", $adeiChannel[7][0]);
  666. // CC2345
  667. $value = $adeiValue[7][7];
  668. $pic = "cc";
  669. $text = "---";
  670. if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
  671. else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  672. placePicWithLink(427, 1482, $pic . ".png", 30, "status cold cathode gauge CC2345&#10;green: on, red: off, grey: undefined", $adeiChannel[7][7]);
  673. placeTextWithLink(406, 1462, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC2345", $adeiChannel[7][7]);
  674. // Ex3110
  675. $value = $adeiValue[8][0];
  676. $pic = "ex";
  677. $text = "---";
  678. if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
  679. else if ($value <= 2E-5 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  680. placePicWithLink(510, 1435, $pic . ".png", 30, "status extractor ion gauge Ex3110&#10;green: on, red: off, grey: undefined", $adeiChannel[8][0]);
  681. placeTextWithLink(539, 1415, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex3110", $adeiChannel[8][0]);
  682. // Ex1110
  683. $value = $adeiValue[28][0];
  684. $link = $adeiChannel[28][0];
  685. $pic = "ex";
  686. $text = "---";
  687. if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
  688. if ($value <= 2E-5 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value);}
  689. placePicWithLink(460, 1435, $pic, 30, "status extractor ion gauge Ex1110&#10;green: off, blinking: on, grey: undefined", $link);
  690. placeTextWithLink(489, 1415, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex1110", $link);
  691. // Ex0096
  692. $value = $adeiValue[9][2];
  693. $link = $adeiChannel[9][2];
  694. $pic = "gauge";
  695. $text = "---";
  696. //$text = sprintf('%.1E', $value);
  697. if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
  698. if ($value <= 1E-11) { $pic = $pic; $text = "LOW"; }
  699. if ($value <= 2E-5 && $value > 1E-11) { $pic = "gaugeOn.png"; $text = sprintf('%.1E', $value);}
  700. placePicWithLink(230, 1220, $pic, 30, "status stable ion gauge 0096&#10;green: off, blinking: on, grey: undefined", $link);
  701. placeTextWithLink(259, 1200, $text, 70, 4, "#000000", "pressure [mbar] stable ion gauge 0096", $link);
  702. // CC FPD
  703. $value = $adeiValue[6][1];
  704. $pic = "cc";
  705. $text = "---";
  706. if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
  707. if ($value < 1E-11) { $pic = $pic . "Off"; $text = "OFF"; }
  708. else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  709. placePicWithLink(188, 1475, $pic . ".png", 30, "status FPD cold cathode gauge&#10;green: on, red: off, grey: undefined", $adeiChannel[6][1]);
  710. placeTextWithLink(217, 1455, $text, 70, 4, "#000000", "pressure [mbar] FPD cold cathode gauge", $adeiChannel[6][1]);
  711. // Gauge Baffle
  712. $value = $adeiValue[5][0];
  713. $link = $adeiChannel[5][0];
  714. $color = "#000000";
  715. $pic = "gauge";
  716. $text = "---";
  717. if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
  718. // standard cold blue "#0026FF" , ice cold blue "#107BC7"
  719. if ($value < 2E-6 && $value > 1E-9) { $pic ="gaugeOn.png"; $color ="#107BC7"; $text = sprintf('%.1E', $value); }
  720. else if ($value >= 1E-6 && $value < 1e-1) { $pic = "gaugeOff.png"; $color = "FF0000"; $text = sprintf('%.1E', $value); }
  721. placePicWithLink(460, 1315, $pic, 30, "status baffle insulation vacuum gauge&#10;gray: off, green: on, red: too high&#10Should be < 5e-6 mbar for HV operation!!!", $link);
  722. placeTextWithLink(460+29, 1295, $text, 70, 4, $color, "pressure [mbar] baffle insulation vacuum gauge", $link);
  723. // PS CC1232
  724. $value = $adeiValue[27][0];
  725. $link = $adeiChannel[27][0];
  726. $pic = "cc";
  727. $text = "---";
  728. if ($value > 1E-5) { $pic = $pic . "Off"; $text = "OFF"; }
  729. else if ($value <= 1E-5 && $value > 2E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  730. placePicWithLink(370, 210, $pic . ".png", 30, "status cold cathode gauge CC1232&#10;green: on, red: off, grey: undefined", $link);
  731. placeTextWithLink(399, 190, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC1232", $link);
  732. // PS Ex1221
  733. $value = $adeiValue[27][5];
  734. $link = $adeiChannel[27][5];
  735. $pic = "ex";
  736. $text = "---";
  737. if ($value > 1E-5) { $pic = $pic . "Off"; $text = "OFF"; }
  738. else if ($value <= 1E-5 && $value > 2E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
  739. placePicWithLink(188, 141, $pic . ".png", 30, "status extractor ion gauge Ex1221&#10;green: on, red: off, grey: undefined", $link);
  740. placeTextWithLink(217, 121, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex1221", $link);
  741. // ########## VACUUM PUMPS ##########
  742. // MS TMP Temperatures
  743. //T<sub>max</sub>
  744. $value = max($adeiValue[25][0], $adeiValue[25][1], $adeiValue[25][2]);
  745. $link = $adeiChannel[25][0] . "," . $adeiChannel[25][1] . "," . $adeiChannel[25][2];
  746. $color = "#000000";
  747. if ($value < 10) $color = "#0026FF";
  748. else if ($value > 50) $color = "#FF0000";
  749. placeTextWithLink(435, 1625, sprintf('%.1F &#176;C', $value), 70, 3, $color, "TMP max temperature PP2", $link);
  750. $value = max($adeiValue[26][0], $adeiValue[26][1], $adeiValue[26][2]);
  751. $link = $adeiChannel[26][0] . "," . $adeiChannel[26][1] . "," . $adeiChannel[26][2];
  752. $color = "#000000";
  753. if ($value < 10) $color = "#0026FF";
  754. else if ($value > 50) $color = "#FF0000";
  755. placeTextWithLink(535, 1625, sprintf('%.1F &#176;C', $value), 70, 3, $color, "TMP max temperature PP3", $link);
  756. // TMPs (PP2 + PP3)
  757. for ($pp = 0; $pp < 2; $pp++)
  758. {
  759. for ($id = 0; $id < 3; $id++)
  760. {
  761. $value = $adeiValue[$pp + 7][$id + 1];
  762. $pic = "tmp";
  763. $text = "---";
  764. if ($value < 50)
  765. {
  766. $pic = $pic . "Off";
  767. }
  768. else if ($value >= 50 && $value < 500)
  769. {
  770. $text = sprintf('%.0F', $value);
  771. if ($value > 450)
  772. {
  773. $value = $adeiValue[$pp + 7][$id + 4];
  774. //$pic = $pic . "On";
  775. if ($value == 1) $pic = $pic . "On";
  776. else if ($value == 0) $pic = $pic . "Standby";
  777. }
  778. }
  779. placePicWithLink(410 + $pp * 100, 1528 + $id * 35, $pic . ".png", 30, "status turbo-molecular pump TMP" . ($pp + 2) . ($id + 4) . "20&#10;green: on, yellow: on but isolated, red: off, grey: undefined", $adeiChannel[$pp + 7][$id + 1]);
  780. placeTextWithLink(439 + $pp * 100, 1518 + $id * 35, $text, 50, 4, "#000000", "rotational speed [Hz] turbo-molecular pump TMP" . ($pp + 2) . ($id + 4) . "20", $adeiChannel[$pp + 7][$id + 1]);
  781. }
  782. }
  783. // PS TMPs
  784. for ($id = 0; $id < 2; $id++)
  785. {
  786. $value = $adeiValue[27][$id + 1];
  787. $link = $adeiChannel[27][$id + 1];
  788. $pic = "tmp";
  789. $text = "---";
  790. if ($value < 50)
  791. {
  792. $pic = $pic . "Off";
  793. }
  794. else if ($value >= 50 && $value < 700)
  795. {
  796. $text = sprintf('%.0F', $value);
  797. if ($value > 570)
  798. {
  799. $value = $adeiValue[27][$id + 3];
  800. //$pic = $pic . "On";
  801. if ($value == 1) $pic = $pic . "On";
  802. else if ($value == 0) $pic = $pic . "Standby";
  803. }
  804. }
  805. placePicWithLink(370, 123 + $id * 35, $pic . ".png", 30, "status turbo-molecular pump TMP" . (1123 - $id) . "&#10;green: on, yellow: on but isolated, red: off, grey: undefined", $link);
  806. placeTextWithLink(399, 114 + $id * 35, $text, 50, 4, "#000000", "rotational speed [Hz] turbo-molecular pump TMP" . (1123 - $id), $link);
  807. }
  808. // FPD CP
  809. $value = $adeiValue[6][3];
  810. $pic = "cp";
  811. $text = "---";
  812. if ($value > 20)
  813. {
  814. $pic = $pic . "Off";
  815. }
  816. else if ($value <= 20 && $value > 5)
  817. {
  818. $text = sprintf('%.0F K', $value);
  819. $value = $adeiValue[6][12];
  820. if ($value == 1) { $pic = $pic . "On"; }
  821. else if ($value == 0) { $pic = $pic . "Standby"; }
  822. }
  823. placePicWithLink(340, 1470, $pic . ".png", 30, "status FPD UHV cryo pump&#10;green: on, yellow: on but isolated, red: off, grey: undefined", $adeiChannel[6][3]);
  824. placeTextWithLink(367, 1450, $text, 70, 4, "#000000", "temperature FPD UHV cryo pump", $adeiChannel[6][3]);
  825. // ########## FPD SOURCES ##########
  826. $pic = "source";
  827. $text = "---";
  828. if ($adeiValue[6][9] == 1 && $adeiValue[6][10] == 1) { $pic = $pic . "On"; $text = "OUT"; }
  829. else if ($adeiValue[6][9] == 1 && $adeiValue[6][10] == 0) { $pic = $pic . "EIn"; $text = "IN"; }
  830. else if ($adeiValue[6][9] == 0 && $adeiValue[6][10] == 1) { $pic = $pic . "GIn"; $text = "IN"; }
  831. else if ($adeiValue[6][9] == 0 && $adeiValue[6][10] == 0) { $pic = $pic . "Off"; $text = "IN"; }
  832. $link = $adeiChannel[6][9] . "," . $adeiChannel[6][10];
  833. placePicWithLink(340, 1505, $pic . ".png", 30, "status FPD sources (electron and gamma source)&#10;green: retracted (out), red: inserted (in), grey: undefined", $link);
  834. placeTextWithLink(367, 1485, $text, 70, 4, "#000000", "status FPD sources (electron and gamma source)", $link);
  835. // ########## AIR COILS ##########
  836. $tol = 0.5;
  837. for ($coil = 0; $coil < 16; $coil++)
  838. {
  839. $value = $adeiValue[0][$coil];
  840. $color = "#000000";
  841. if (abs($value) < $adeiValue[21][$coil] - $tol || abs($value) > $adeiValue[21][$coil] + $tol) $color = "#FF0000";
  842. if ($value < -$tol && $adeiValue[22][$coil] != 1) $color = "#FF0000";
  843. if ($value > $tol && $adeiValue[22][$coil] != 0) $color = "#FF0000";
  844. if ($coil == 15) $value = -$value; // coil 14 is inverted
  845. $value = sprintf('%.1F', $value);
  846. if ($value <= -100 || $value >= 100) $value = sprintf('%.0F', $value);
  847. if ($value >= -0.1 && $value <= 0.1) $value = sprintf('%.1F', 0.0);
  848. // $status = $adeiValue[1][$coil];
  849. $status = 1;
  850. // $lem = $adeiValue[2][$coil];
  851. $lem = 1;
  852. if ($coil == 0) $pos = 270;
  853. else if ($coil == 1) $pos = 320;
  854. else if ($coil == 2) $pos = 521;
  855. else if ($coil == 15) $pos = 1167;
  856. else $pos = 609 + ($coil - 3) * 42.9;
  857. if ($status == 0 || $lem == 0) $color = "#FF0000";
  858. if ($status == 0) $value = "OVP";
  859. if ($lem == 0) $value = "LEM";
  860. $label = ($coil - 1);
  861. if ($coil == 0) $label = "VER";
  862. else if ($coil == 1) $label = "HOR";
  863. $color = "#006400";
  864. placeTextWithLink(-13, $pos, $value, 70, 4, $color, "air-coil current [A]&#10;OVP: over-voltage protection triggered, LEM: DCCT offline", $adeiChannel[0][$coil]);
  865. placeText(5, $pos, $label, 70, 2, "#000000");
  866. $color = "#000000";
  867. $label = "";
  868. if ($adeiValue[22][$coil] == 1 && $adeiValue[23][16] == 0) { $color = "#FF0000"; $label = "FLIP"; }
  869. if ($adeiValue[22][$coil] == 0 && $adeiValue[23][16] == 1 && $adeiValue[23][$coil] == 1) { $color = "#FF0000"; $label = "PULS"; }
  870. if ($adeiValue[22][$coil] == 1 && $adeiValue[23][16] == 1 && $adeiValue[23][$coil] == 1) { $color = "#FF0000"; $label = "PULS"; } // F+P
  871. placeTextWithLink(22 + 12, $pos, $label, 70, 2, $color, "air-coil status&#10;FLIP: flipped, PULS: pulsed, F+P: both", $adeiChannel[23][$coil]);
  872. }
  873. // EMCS
  874. placeText(-15, 200, "EMCS", 70, 5, "#000000");
  875. $tol = 0.5;
  876. $text = "???";
  877. $color = "#FFD800";
  878. $EMCSver = 46.46;
  879. $EMCShor = 7.1;
  880. if ($adeiValue[0][0] > $EMCSver - $tol && $adeiValue[0][0] < $EMCSver + $tol && $adeiValue[0][1] > $EMCShor - $tol && $adeiValue[0][1] < $EMCShor + $tol) { $text = "ON"; $color = "#4CFF00"; }
  881. else if ($adeiValue[0][0] < $tol && $adeiValue[0][1] < $tol && $adeiValue[0][0] > -$tol && $adeiValue[0][1] > -$tol) { $text = "OFF"; $color = "#FF0000"; }
  882. placeBox(-12, 160, $text, 35, 3, $color);
  883. // LFCS
  884. placeText(-15, 467, "LFCS", 70, 5, "#000000");
  885. $tol = 0.5;
  886. $text = "ON ???";
  887. $color = "#FFD800";
  888. $lfcs = array( // current 14 is inverted, negative value in definition must be positive here
  889. array( "0.0", 0.000, 0.000, 0.000, 0.000, 0.000,0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000),
  890. array( "STD 20%", 32.3, 3.6, 4.8, 0.4, 27.4, 25.1, 2.5, 2.7, 34.9, 0.9, 22.4, 10.7, 11.4, 10.0 ),
  891. array( "2.7 70%", 0.0, 9.3, 1.5, 0.8, 12.9, 22.9, 36.7, 43.0, 14.7, 20.3, 9.2, 10.7, 11.0, 25.5 ),
  892. array( "2.7 100%", 38.09, 43.70, 24.34, 24.84, 44.50, 54.14, 19.45, 37.08, 47.81, 36.43, 39.24, 25.78, 40.46, 30.82 ),
  893. array( "1.0 100%", 30.0, 20.0, 25.0, 10.0, 0.0, 12.0, 20.0, 20.0, 12.0, 0.0, 5.0, 13.0, 20.0, 25.0),
  894. array( "1.0 70%", -24.4, -19.0, -21.4, -8.3, -1.8, 6.2, 21.5, 9.1, 11.5, 6.5, 4.4, -15.9, -25.0, 25.6),
  895. array( "10G 100%", 33.0, 159.0, 135.3, 78.8, 75.4, 116.7, 98.7, 86.3, 128.0, 57.4, 92.6, 150.7, 94.8, 33.7),
  896. array( "10G 70%", 31.4, 138.4, 112.2, 72.9, 110.8, 119.9, 96.6, 103.4, 140.0, 56.2, 86.0, 137.8, 110.1, 22.8),
  897. array( "2.0 70%", -11.9, -9.0, 5.8, -6.6, 15.3, 0.8, 34.1, 44.6, 5.5, 5.4, -8.6, 13.0, -10.0, 19.4),
  898. array( "9.7 70%", 28.4, 98.7, 93.0, 76.8, 95.6, 132.6, 103.4, 98.5, 149.1, 66.8, 84.4, 94.6, 95.0, 25.7),
  899. array( "14G 70%", 100, 94.8, 157.6, 143.9, 170, 130.1, 150.0, 150.0, 145, 162.5, 170, 100, 100, 0),
  900. array( "5/7 14G", 51.02, 48.37, 80.41, 73.42, 86.73, 66.38, 76.53, 76.53, 73.98, 82.91, 86.73, 51.02, 51.02, 0.00),
  901. array( "3.8G", 21.6, 21.3, 33.2, 7.4, 55.9, 32.0, 61.0, 56.8, 35.8, 36.0, 42.3, 33.9, 15.8, 45.2),
  902. array( "5G", 31.2, 45.8, 41.3, 33.7, 47.7, 53.0, 75.2, 65.6, 61.5, 35.0, 48.6, 49.9, 24.2, 32.3),
  903. array( "9G", 70.3, 84.0, 65.9, 106.4, 87.5, 142.3, 81.0, 103.1, 98.0, 112.7, 100.7, 90.1, 94.8, 54.0)
  904. );
  905. for ($pp = 0; $pp < 15; $pp++)
  906. {
  907. for ($id = 0; $id < 14; $id++)
  908. {
  909. $tol = abs($tol);
  910. //echo $pp . ", " . $id . ", " . $adeiValue[0][$id + 2] . ", " . $lfcs[$pp][$id + 1] .", ". $tol . "<br>";
  911. //if ($adeiValue[0][$id + 2] > $lfcs[$pp][$id + 1] - $tol && $adeiValue[0][$id + 2] < $lfcs[$pp][$id + 1] + $tol)
  912. if (abs($adeiValue[0][$id + 2] - $lfcs[$pp][$id + 1]) < $tol)
  913. {
  914. if ($id == 13) { $text = $lfcs[$pp][0]; $color = "#4CFF00"; }
  915. }
  916. else break;
  917. }
  918. }
  919. if ($text == "0.0") { $text = "OFF"; $color = "#FF0000"; }
  920. placeBox(-12, 400, $text, 67, 3, $color);
  921. // ########## HIGH VOLTAGE ##########
  922. // load patch-panel configuration
  923. $handle = fopen("patchpanel/ringstoadei.txt", "r");
  924. if ($handle)
  925. {
  926. while (($buffer = fgets($handle, 4096)) !== false)
  927. {
  928. $buffer = trim($buffer);
  929. $ringsToAdei[count($ringsToAdei)] = $buffer;
  930. }
  931. fclose($handle);
  932. }
  933. // labels
  934. $posY = 12; // offset between labels and voltages (13)
  935. $posX = 6; // down/bottom (7)
  936. // voltage monitoring readout
  937. $color = "#000000";
  938. $factor_m = 1972.4531;
  939. $offset = 3.104e-6;
  940. $gain = 0.9999992578;
  941. $value = ($adeiValue[30][0] - $offset) * $gain * $factor_m;
  942. $voltage_error = abs($value * 2e-3);
  943. if ($voltage_error < 1) { $voltage_error = 1; }
  944. $link = $adeiChannel[30][0];
  945. $text = "K35 divider readout, precision value";
  946. placeText(385, 816, "K35 Voltage Reading", 130, 2, $color); // K35 voltage reading
  947. placeTextWithLink(363, 796, sprintf('%.3F', $value ) . "(" . sprintf('%.0F', $voltage_error ) .") V" , 170, 4, $color, $text, $link);
  948. //placeText(180, 845, "MS WEST IE", 70, 2,"#808080"); // west IE being displayed in loop below
  949. //placeText(450, 845, "MS EAST IE", 70, 2,"#808080"); // east IE
  950. placeText(265, 815, "MS IE COMMON", 130, 2, "#000000"); // mainspec IE Common
  951. placeText(265, 170, "PS TANK", 70, 2, "#000000"); // prespec tank
  952. placeText(305, 150, "PS CONES IE", 110, 2, "#505050"); // prespec west IE
  953. placeText(345, 150, "PS CENTER IE", 110, 2, "#505050"); // prespec east IE
  954. // MS Tank from Precision HCP Supply or Standard HCN
  955. $text = "MS TANK";
  956. $ms_hcn_soll = $adeiValue[10][1];
  957. $ms_hcp_soll = $adeiValue[10][21];
  958. if ($ms_hcn_soll == 0) {
  959. if ($ms_hcp_soll == 0) { $text = $text . " OFF";}
  960. else { $text = $text . " HCP"; $HCP = true; }
  961. } else { $text = $text . " HCN"; $HCP = false; }
  962. placeText(70, 830, $text, 100, 2, "#000000"); // mainspec tank
  963. // switch values here between HCN and HCP in Value and Channel Array !!!
  964. if ($HCP) { $adeiValue[10][0] = -$adeiValue[10][20]; $adeiValue[10][1] = $adeiValue[10][21];
  965. $adeiChannel[10][0] = $adeiChannel[10][20]; $adeiChannel[10][1] = $adeiChannel[10][21]; }
  966. placeText(110-$posY, 845, "W7-11", 70, 2, "#000000"); // w7-11
  967. placeText(503+$posY+$posX, 845, "E7-11", 70, 2, "#000000"); // e7-11
  968. placeText(126-$posY, 600, "W6", 70, 2, "#000000"); // w6
  969. placeText(487+$posY+$posX, 600, "E6", 70, 2, "#000000"); // e6
  970. placeText(126-$posY, 1090, "W12", 70, 2, "#000000"); // w12
  971. placeText(487+$posY+$posX, 1090, "E12", 70, 2, "#000000"); // e12
  972. placeText(161-$posY, 516, "W5", 70, 2, "#000000"); // w5
  973. placeText(452+$posY+$posX, 516, "E5", 70, 2, "#000000"); // e5
  974. placeText(161-$posY, 1174, "W13", 70, 2, "#000000"); // w13
  975. placeText(452+$posY+$posX, 1174, "E13", 70, 2, "#000000"); // e13
  976. placeText(194-$posY, 434, "W4", 70, 2, "#000000"); // w4
  977. placeText(419+$posY+$posX, 434, "E4", 70, 2, "#000000"); // e4
  978. placeText(194-$posY, 1256, "W14", 70, 2, "#000000"); // w14
  979. placeText(419+$posY+$posX, 1256, "E14", 70, 2, "#000000"); // e14
  980. placeText(225-$posY, 385, "W3", 70, 2, "#000000"); // w3
  981. placeText(388+$posY+$posX, 385, "E3", 70, 2, "#000000"); // e3
  982. placeText(225-$posY, 1305, "W15", 70, 2, "#000000"); // w15
  983. placeText(388+$posY+$posX, 1305, "E15", 70, 2, "#000000"); // e15
  984. placeText(273-$posY, 352, "W2", 70, 2, "#000000"); // w2
  985. placeText(340+$posY+$posX, 352, "E2", 70, 2, "#000000"); // e2
  986. placeText(273-$posY, 1338, "W16", 70, 2, "#000000"); // w16
  987. placeText(340+$posY+$posX, 1338, "E16", 70, 2, "#000000"); // e16
  988. if ($adeiValue[10][8] > 10.0) placeText(309, 359, "APE", 70, 2, "#000000"); // ape south
  989. if ($adeiValue[10][10] > 10.0) placeText(309, 1331, "APE", 70, 2, "#000000"); // ape north
  990. // offset voltages
  991. $posY = 16; // offset between outer and inner voltages
  992. $ringsPosY = array( 273, 273+$posY, 225, 225+$posY, 194, 194+$posY, 161, 161+$posY, 126, 126+$posY, 110, 110+$posY, 126, 126+$posY, 161, 161+$posY, 194, 194+$posY, 225, 225+$posY, 273, 273+$posY, 340, 340-$posY, 388, 388-$posY, 419, 419-$posY, 452, 452-$posY, 487, 487-$posY, 503, 503-$posY, 487, 487-$posY, 452, 452-$posY, 419, 419-$posY, 388, 388-$posY, 340, 340-$posY );
  993. $ringsPosX = array( 352, 352, 385, 385, 434, 434, 516, 516, 600, 600, 845, 845, 1090, 1090, 1174, 1174, 1256, 1256, 1305, 1305, 1338, 1338, 352, 352, 385, 385, 434, 434, 516, 516, 600, 600, 845, 845, 1090, 1090, 1174, 1174, 1256, 1256, 1305, 1305, 1338, 1338 );
  994. $tol = 0.2;
  995. for ($pp = 0; $pp < 2; $pp++) // west (0), east (1)
  996. {
  997. for ($id = 0; $id < 22; $id++) // rings: o, i, o, i, ...
  998. {
  999. // show voltage if not shorted to IE
  1000. if ($ringsToAdei[$id + 22*$pp] != "IE" && $ringsToAdei[$id + 22*$pp] != "")
  1001. {
  1002. // color
  1003. if ( ($adeiValue[11 + 2*$pp][$ringsToAdei[$id + 22*$pp]] > $adeiValue[12 + 2*$pp][$ringsToAdei[$id + 22*$pp]] - $tol) && ($adeiValue[11 + 2*$pp][$ringsToAdei[$id + 22*$pp]] < $adeiValue[12 + 2*$pp][$ringsToAdei[$id + 22*$pp]] + $tol) )
  1004. $color = "#000000";
  1005. else
  1006. $color = "#FF0000";
  1007. // show voltage
  1008. if ( ($id % 2 == 0) || ($id % 2 == 1 && $ringsToAdei[$id + 22*$pp] != $ringsToAdei[$id + 22*$pp - 1]) )
  1009. {
  1010. placeTextWithLink($ringsPosY[$id + 22*$pp], $ringsPosX[$id + 22*$pp], "+" . sprintf('%.1F', $adeiValue[11 + 2*$pp][$ringsToAdei[$id + 22*$pp]]), 70, 4, $color, "relative voltage offset", $adeiChannel[11 + 2*$pp][$ringsToAdei[$id + 22*$pp]]);
  1011. }
  1012. }
  1013. }
  1014. }
  1015. // tank, ie, dipole, ape
  1016. $ringsPosY = array( 45, 240, 155, 425, 306, 306, 0, 240, 280, 320 );
  1017. $ringsPosX = array( 805, 805, 805, 805, 319, 1371, 0, 130, 130, 130 );
  1018. $tolA = array ( 15, 2, 1, 1, 1, 1, 0, 250, 1, 1 );
  1019. // MS voltages
  1020. for ($pp = 0; $pp < 6; $pp++) // tank (0), ie (1), ie west (2), ie east (3), ape south (4), ape north (5)
  1021. {
  1022. // color
  1023. if ( ($adeiValue[10][2*$pp] > $adeiValue[10][2*$pp + 1] - $tolA[$pp]) && ($adeiValue[10][2*$pp] < $adeiValue[10][2*$pp + 1] + $tolA[$pp]) )
  1024. $color = "#000000";
  1025. else
  1026. $color = "#FF0000";
  1027. // show voltage
  1028. $value = $adeiValue[10][2*$pp];
  1029. $link = $adeiChannel[10][2*$pp];
  1030. $dipolestatus = $adeiValue[2][16];
  1031. $dipolelink = $adeiChannel[2][16];
  1032. if ($pp == 0) { $text = "absolute tank potential"; }
  1033. else if ($pp == 1) { $text = "IE common offset potential"; }
  1034. else if ($pp == 2) { $text = "relative voltage potential west IE"; }
  1035. else if ($pp == 3) { $text = "relative voltage potential east IE"; }
  1036. else if ($pp == 4) { $text = "relative voltage potential south APE"; }
  1037. else if ($pp == 5) { $text = "relative voltage potential north APE"; }
  1038. if ($pp == 2 || $pp == 3)
  1039. {
  1040. if ($dipolestatus == 1) // dipole enabled
  1041. {
  1042. $color = "#990000";
  1043. $value = $adeiValue[10][2*$pp];
  1044. if ($pp == 2)
  1045. {
  1046. placeText($ringsPosY[$pp] + 40, $ringsPosX[$pp], "DIPOLE", 150, 4, "#CC0000" );
  1047. }
  1048. else if ($pp == 3)
  1049. {
  1050. placeText($ringsPosY[$pp] + 40, $ringsPosX[$pp], "DIPOLE", 150, 4, "#CC0000");
  1051. }
  1052. }
  1053. else
  1054. {
  1055. $value = $adeiValue[10][2*$pp]; // dipole disabled
  1056. $color = "#909090";
  1057. }
  1058. if ($pp == 2) placeText(180, 825, "MS WEST IE", 110, 2, $color); // west IE
  1059. else if ($pp == 3) placeText(450, 825, "MS EAST IE", 110, 2, $color); // east IE
  1060. $link = $adeiChannel[10][2*$pp+1] . "," . $adeiChannel[10][2*$pp] . "," . $dipolelink;
  1061. }
  1062. // tank potential
  1063. if ($pp == 0) placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.1F V', -$value), 150, 5, $color, $text, $link);
  1064. // IE common and dipoles
  1065. else if ($pp == 1 || $pp == 2 || $pp == 3) placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.2F V', -$value), 150, 5, $color, $text, $link);
  1066. // APE
  1067. else if ($pp == 4 || $pp == 5)
  1068. {
  1069. if ($adeiValue[10][2*$pp] > 10.0) { placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp] , sprintf('%.1F', $value), 70, 4, $color, $text, $link); }
  1070. }
  1071. }
  1072. // PS voltages (add $pp < 10 for PS IE )
  1073. for ($pp = 7; $pp < 10; $pp++) // PS tank (channel 7 = array entry 14 + 15), IE west (8), IE east (9)
  1074. {
  1075. // color
  1076. if ( ($adeiValue[10][2*$pp] > $adeiValue[10][2*$pp + 1] - $tolA[$pp]) && ($adeiValue[10][2*$pp] < $adeiValue[10][2*$pp + 1] + $tolA[$pp]) )
  1077. $color = "#000000";
  1078. else
  1079. $color = "#FF0000";
  1080. // show voltage
  1081. $value = $adeiValue[10][2*$pp];
  1082. $link = $adeiChannel[10][2*$pp];
  1083. if ($pp == 7) { $text = "absolute ps tank potential"; }
  1084. else if ($pp == 8) { $text = "relative voltage potential PS IE west"; $color = "#505050";}
  1085. else if ($pp == 9) { $text = "relative voltage potential PS IE west"; $color = "#505050";}
  1086. placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.1F V', -$value), 150, 5, $color, $text, $link);
  1087. }
  1088. /*
  1089. // voltage test
  1090. $tol = 5.0;
  1091. for ($pp = 0; $pp < 3; $pp++)
  1092. {
  1093. if ($pp == 0) $idMax = 2;
  1094. else $idMax = 11;
  1095. for ($id = 0; $id < $idMax; $id++)
  1096. {
  1097. if ( ($adeiValue[10 + $pp][$id] > $adeiValue[10 + $pp][$id + $idMax] - $tol) && ($adeiValue[10 + $pp][$id] < $adeiValue[10 + $pp][$id + $idMax] + $tol) )
  1098. $adeiColor[10 + $pp][$id] = "#000000";
  1099. else
  1100. $adeiColor[10 + $pp][$id] = "#FF0000";
  1101. }
  1102. }
  1103. // voltages
  1104. placeTextWithLink(103, 805, sprintf('%.1F', -$adeiValue[10][0] - $adeiValue[10][1]) . " V", 150, 5, $adeiColor[10][1], "absolute IE potential", $adeiChannel[10][1]); // IE
  1105. placeTextWithLink(53, 805, sprintf('%.1F', -$adeiValue[10][0]) . " V", 150, 5, $adeiColor[10][0], "absolute tank potential", $adeiChannel[10][0]); // tank
  1106. placeTextWithLink(120, 590, "+" . sprintf('%.1F', $adeiValue[11][4]), 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6", $adeiChannel[11][4]); // w6
  1107. placeTextWithLink(490, 590, "+" . sprintf('%.1F', $adeiValue[12][4]), 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6", $adeiChannel[12][4]); // e6
  1108. placeTextWithLink(120, 1100, "+" . sprintf('%.1F', $adeiValue[11][6]), 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12", $adeiChannel[11][6]); // w12
  1109. placeTextWithLink(490, 1100, "+" . sprintf('%.1F', $adeiValue[12][6]), 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12", $adeiChannel[12][6]); // e12
  1110. placeTextWithLink(155, 506, "+" . sprintf('%.1F', $adeiValue[11][3]), 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5
  1111. placeTextWithLink(455, 506, "+" . sprintf('%.1F', $adeiValue[12][3]), 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5
  1112. placeTextWithLink(155, 1184, "+" . sprintf('%.1F', $adeiValue[11][7]), 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13
  1113. placeTextWithLink(455, 1184, "+" . sprintf('%.1F', $adeiValue[12][7]), 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13
  1114. placeTextWithLink(188, 424, "+" . sprintf('%.1F', $adeiValue[11][2]), 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4
  1115. placeTextWithLink(422, 424, "+" . sprintf('%.1F', $adeiValue[12][2]), 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4
  1116. placeTextWithLink(188, 1266, "+" . sprintf('%.1F', $adeiValue[11][8]), 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14
  1117. placeTextWithLink(422, 1266, "+" . sprintf('%.1F', $adeiValue[12][8]), 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14
  1118. placeTextWithLink(225, 385, "+" . sprintf('%.1F', $adeiValue[11][1]), 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3
  1119. placeTextWithLink(385, 385, "+" . sprintf('%.1F', $adeiValue[12][1]), 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3
  1120. placeTextWithLink(225, 1305, "+" . sprintf('%.1F', $adeiValue[11][9]), 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15
  1121. placeTextWithLink(385, 1305, "+" . sprintf('%.1F', $adeiValue[12][9]), 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15
  1122. placeTextWithLink(275, 350, "+" . sprintf('%.1F', $adeiValue[11][0]), 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2
  1123. placeTextWithLink(335, 350, "+" . sprintf('%.1F', $adeiValue[12][0]), 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2
  1124. placeTextWithLink(275, 1340, "+" . sprintf('%.1F', $adeiValue[11][10]), 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16
  1125. placeTextWithLink(335, 1340, "+" . sprintf('%.1F', $adeiValue[12][10]), 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16
  1126. $posY = 16; // offset between outer and inner voltages
  1127. placeTextWithLink(126, 600, "+200.0", 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6-outer", $adeiChannel[11][4]); // w6o
  1128. placeTextWithLink(487, 600, "+200.0", 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6-outer", $adeiChannel[12][4]); // e6o
  1129. placeTextWithLink(126, 1090, "+200.0", 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12-outer", $adeiChannel[11][6]); // w12o
  1130. placeTextWithLink(487, 1090, "+200.0", 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12-outer", $adeiChannel[12][6]); // e12o
  1131. placeTextWithLink(126+$posY, 600, "+200.0", 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6", $adeiChannel[11][4]); // w6i
  1132. placeTextWithLink(487-$posY, 600, "+200.0", 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6", $adeiChannel[12][4]); // e6i
  1133. placeTextWithLink(126+$posY, 1090, "+200.0", 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12", $adeiChannel[11][6]); // w12i
  1134. placeTextWithLink(487-$posY, 1090, "+200.0", 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12", $adeiChannel[12][6]); // e12i
  1135. placeTextWithLink(161, 516, "+200.0", 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5o
  1136. placeTextWithLink(452, 516, "+200.0", 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5o
  1137. placeTextWithLink(161, 1174, "+200.0", 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13o
  1138. placeTextWithLink(452, 1174, "+200.0", 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13o
  1139. placeTextWithLink(161+$posY, 516, "+200.0", 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5i
  1140. placeTextWithLink(452-$posY, 516, "+200.0", 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5i
  1141. placeTextWithLink(161+$posY, 1174, "+200.0", 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13i
  1142. placeTextWithLink(452-$posY, 1174, "+200.0", 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13i
  1143. placeTextWithLink(194, 434, "+200.0", 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4o
  1144. placeTextWithLink(419, 434, "+200.0", 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4o
  1145. placeTextWithLink(194, 1256, "+200.0", 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14o
  1146. placeTextWithLink(419, 1256, "+200.0", 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14o
  1147. placeTextWithLink(194+$posY, 434, "+200.0", 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4i
  1148. placeTextWithLink(419-$posY, 434, "+200.0", 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4i
  1149. placeTextWithLink(194+$posY, 1256, "+200.0", 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14i
  1150. placeTextWithLink(419-$posY, 1256, "+200.0", 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14i
  1151. placeTextWithLink(225, 385, "+200.0", 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3o
  1152. placeTextWithLink(388, 385, "+200.0", 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3o
  1153. placeTextWithLink(225, 1305, "+200.0", 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15o
  1154. placeTextWithLink(388, 1305, "+200.0", 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15o
  1155. placeTextWithLink(225+$posY, 385, "+200.0", 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3i
  1156. placeTextWithLink(388-$posY, 385, "+200.0", 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3i
  1157. placeTextWithLink(225+$posY, 1305, "+200.0", 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15i
  1158. placeTextWithLink(388-$posY, 1305, "+200.0", 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15i
  1159. placeTextWithLink(273, 352, "+200.0", 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2o
  1160. placeTextWithLink(340, 352, "+200.0", 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2o
  1161. placeTextWithLink(273, 1338, "+200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16o
  1162. placeTextWithLink(340, 1338, "+200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16o
  1163. placeTextWithLink(273+$posY, 352, "+200.0", 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2i
  1164. placeTextWithLink(340-$posY, 352, "+200.0", 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2i
  1165. placeTextWithLink(273+$posY, 1338, "+200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16i
  1166. placeTextWithLink(340-$posY, 1338, "+200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16i
  1167. placeTextWithLink(306, 319, "-200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // apes
  1168. placeTextWithLink(306, 1371, "-200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // apen
  1169. */
  1170. // ########## DETECTOR ##########
  1171. // detector powered
  1172. $lowVoltage = array( 12, 8, 6, 6, 120 );
  1173. $link = "";
  1174. $pic = "fpdOn";
  1175. $text = "ON";
  1176. for ($id = 0; $id < 5; $id++)
  1177. {
  1178. $value = $adeiValue[6][4 + $id];
  1179. if (!($value < $lowVoltage[$id] + 0.2 && $value > $lowVoltage[$id] - 0.2))
  1180. {
  1181. $pic = "fpdOff";
  1182. $text = "OFF";
  1183. }
  1184. $link = $link . $adeiChannel[6][4 + $id] . ",";
  1185. }
  1186. $link = substr($link, 0, strlen($link) - 1);
  1187. placePicWithLink(200, 1600, $pic . ".png", 30, "status FPD power&#10;green: on, red: off, grey: undefined", $link);
  1188. placeTextWithLink(227, 1580, $text, 70, 4, "#000000", "status FPD power", $link);
  1189. // carousel
  1190. $value = $adeiValue[6][11];
  1191. $color = "#000000";
  1192. if ($value < -95) $value = "---";
  1193. else $value = sprintf('%.0F', $adeiValue[6][11]) . " &#176;C";
  1194. placeTextWithLink(255, 1565, $value, 100, 4, $color, "temperature FPD carousel/electronics", $adeiChannel[6][11]);
  1195. placeText(275, 1565, "carousel", 100, 2, "#000000");
  1196. // ########## MAGNETOMETERS ##########
  1197. $mag = array(4, 6, 4);
  1198. for ($pp = 0; $pp < 3; $pp++)
  1199. {
  1200. $bx = 0;
  1201. $by = 0;
  1202. $bz = 0;
  1203. $link = "";
  1204. for ($id = 0; $id < $mag[$pp]; $id++)
  1205. {
  1206. $bx = $bx + $adeiValue[16 + $pp][3 * $id];
  1207. $by = $by + $adeiValue[16 + $pp][3 * $id + 1];
  1208. $bz = $bz + $adeiValue[16 + $pp][3 * $id + 2];
  1209. $link = $link . $adeiChannel[16 + $pp][3 * $id + 2] . ",";
  1210. //echo $bx . " " . $by . " " . $bz . "<br>";
  1211. }
  1212. $bx = $bx / $mag[$pp];
  1213. $by = $by / $mag[$pp];
  1214. $bz = $bz / $mag[$pp];
  1215. $link = substr($link, 0, strlen($link) - 1);
  1216. $value = sqrt($bx * $bx + $by * $by + $bz * $bz);
  1217. $text = "averaged field precise magnetometers ";
  1218. if ($pp == 0) $text = $text . "north ";
  1219. else if ($pp == 1) $text = $text . "middle ";
  1220. else if ($pp == 2) $text = $text . "south ";
  1221. $text = $text . "ring";
  1222. placeTextWithLink(553, 1015 - 170 * $pp, sprintf('%.1F G', $value), 70, 5, "#000000", $text, $link);
  1223. }
  1224. // dipole
  1225. $pic = "status";
  1226. if ($pulserId[0] == "dipole" && $daqElapsed[0] > 30)
  1227. {
  1228. if ($pulserCounts[0] > 0) $pic = $pic . "On";
  1229. else if ($pulserCounts[0] == 0) $pic = $pic . "Off";
  1230. }
  1231. //placePic($posY + 34 + 25, $posX + 80, $pic . ".png", 17, "status dipole sync pulser&#10;green: on, red: off, grey: undefined");
  1232. // egun
  1233. $pic = "status";
  1234. if ($pulserId[1] == "egun" && $daqElapsed[0] > 30)
  1235. {
  1236. if ($pulserCounts[1] > 0) $pic = $pic . "On";
  1237. else if ($pulserCounts[1] == 0) $pic = $pic . "Off";
  1238. }
  1239. //placePic($posY + 34 + 50, $posX + 80, $pic . ".png", 17, "status egun sync pulser&#10;green: on, red: off, grey: undefined");
  1240. // muon
  1241. // $pic = "status";
  1242. // if ($pulserId[3] == "muon" && $daqElapsed[0] > 30)
  1243. // {
  1244. // if ($pulserCounts[3] > 0) $pic = $pic . "On";
  1245. // else if ($pulserCounts[3] == 0) $pic = $pic . "Off";
  1246. // }
  1247. // placePic($posY + 34 + 75, $posX + 80, $pic . ".png", 17, "status muon sync pulser&#10;green: on, red: off, grey: undefined");
  1248. // ########## HALL ##########
  1249. placePicWithLink(-30-3, 1800, "newTemperature.png", 23, "temperature in KATRIN hall", $adeiChannel[19][1]);
  1250. placeTextWithLink(-30-3, 1820, sprintf('%.1F &#176;C', $adeiValue[19][1]), 80, 4, "#000000", "temperature in KATRIN hall", $adeiChannel[19][1]);
  1251. placePicWithLink(-2-3, 1800, "newPressure.png", 23, "atmospheric pressure in KATRIN hall", $adeiChannel[19][0]);
  1252. placeTextWithLink(-2-3, 1820, sprintf('%.0F hPa', $adeiValue[19][0] * 0.0689475729 * 1000.0), 80, 4, "#000000", "atmospheric pressure in KATRIN hall", $adeiChannel[19][0]);
  1253. //placeTextWithLink(-2-3, 1820, sprintf('%.3F bar', $adeiValue[19][0] * 0.0689475729), 80, 4, "#000000", "atmospheric pressure in KATRIN hall", $adeiChannel[19][0]);
  1254. placePicWithLink(26-3, 1800, "newHumidity.png", 23, "relative humidity in KATRIN hall", $adeiChannel[19][2]);
  1255. placeTextWithLink(26-3, 1820, sprintf('%.1F &#037;', $adeiValue[19][2]), 80, 4, "#000000", "relative humidity in KATRIN hall", $adeiChannel[19][2]);
  1256. // ########## HIGH PRESSURE ##########
  1257. if (getValveStatus($adeiValue[9][6]) == -1 && getValveStatus($adeiValue[9][7]) == 1 && getValveStatus($adeiValue[9][8]) == 1 && getValveStatus($adeiValue[9][9]) == 0)
  1258. {
  1259. $pic = "bottleBlinking.gif";
  1260. $text = "ON";
  1261. $color = "#000000";
  1262. if ($adeiValue[9][4] != 64) $color = "#FF0000";
  1263. placeTextWithLink(135, 1387, sprintf('%.1F &#037;', $adeiValue[9][5]), 70, 4, $color, "gas flow leak valve", $adeiChannel[9][5]);
  1264. placeTextWithLink(160, 1387, sprintf('%.1E', $adeiValue[9][3]), 70, 4, $color, "pressure [mbar] MKS Baratron", $adeiChannel[9][3]);
  1265. }
  1266. else
  1267. {
  1268. if (getValveStatus($adeiValue[9][7]) == 1)
  1269. {
  1270. $pic = "bottleOn.png";
  1271. $text = "OPEN";
  1272. }
  1273. else
  1274. {
  1275. $pic = "bottleOn.png";
  1276. $text = "OFF";
  1277. }
  1278. }
  1279. $link = $adeiChannel[9][3] . "," . $adeiChannel[9][4] . "," . $adeiChannel[9][5] . "," . $adeiChannel[9][6] . "," . $adeiChannel[9][7] . "," . $adeiChannel[9][8] . "," . $adeiChannel[9][9];
  1280. placePicWithLink(135, 1358, $pic, 48, "status gas injection system&#10;green: off, blinking: on, grey: undefined&#10Should be off for nominal pressure measurements!!!", $link);
  1281. placeTextWithLink(180, 1347, $text, 70, 4, "#000000", "status gas injection system", $link);
  1282. // ########## PS VESSEL TEMPERATURES ##########
  1283. $min = 18;
  1284. $max = 30;
  1285. // mean of 4020, 4030, 4040
  1286. $link = $adeiChannel[29][0] . "," . $adeiChannel[29][1] . "," . $adeiChannel[29][2];
  1287. $value = ($adeiValue[29][0] + $adeiValue[29][1] + $adeiValue[29][2])/3.0;
  1288. $color = "#000000";
  1289. if ($value < $min) $color = "#0026FF";
  1290. else if ($value > $max) $color = "#FF0000";
  1291. if ($value < 400) placeTextWithLink(303, 170, sprintf('%.1F &#176;C', $value), 90, 4, $color, "PS mean temperature of 4020..30..40", $link);
  1292. // ########## MS VESSEL TEMPERATURES ##########
  1293. $min = 14;
  1294. $max = 24;
  1295. // 0066
  1296. $value = $adeiValue[20][0];
  1297. $color = "#000000";
  1298. if ($value < $min) $color = "#0026FF";
  1299. else if ($value > $max) $color = "#FF0000";
  1300. if ($value < 400) placeTextWithLink(110, 933, "T<sub>IE0066</sub> = " . sprintf('%.1F &#176;C', $value), 170, 4, $color, "IE temperature 0066", $adeiChannel[20][0]);
  1301. // 0076
  1302. $value = $adeiValue[20][1];
  1303. $color = "#000000";
  1304. if ($value < $min) $color = "#0026FF";
  1305. else if ($value > $max) $color = "#FF0000";
  1306. if ($value < 400) placeTextWithLink(110+20, 933, "T<sub>IE0076</sub> = " . sprintf('%.1F &#176;C', $value), 170, 4, $color, "IE temperature 0076", $adeiChannel[20][1]);
  1307. // 0270
  1308. $value = $adeiValue[20][2];
  1309. $color = "#000000";
  1310. if ($value < $min) $color = "#0026FF";
  1311. else if ($value > $max) $color = "#FF0000";
  1312. if ($value < 400) placeTextWithLink(307, 805, "T<sub>0270</sub> = " . sprintf('%.1F &#176;C', $value), 160, 4, $color, "tank temperature 0270", $adeiChannel[20][2]);
  1313. // 0283
  1314. $value = $adeiValue[20][3];
  1315. $color = "#000000";
  1316. if ($value < $min) $color = "#0026FF";
  1317. else if ($value > $max) $color = "#FF0000";
  1318. if ($value < 400) placeTextWithLink(307, 963, "T<sub>0283</sub> = " . sprintf('%.1F &#176;C', $value), 160, 4, $color, "tank temperature 0283", $adeiChannel[20][3]);
  1319. /*
  1320. // 0066
  1321. $value = $adeiValue[20][0] - $adeiValue[20][4];
  1322. $color = "#000000";
  1323. if ($value < 50) placeTextWithLink(110+16, 973-30, sprintf('(%.2F &#176;C/h)', $value), 130, 4, $color, "IE temperature 0066 (ramp speed)", $adeiChannel[20][0]);
  1324. // 0076
  1325. $value = $adeiValue[20][1] - $adeiValue[20][5];
  1326. $color = "#000000";
  1327. if ($value < 50) placeTextWithLink(126+24+16, 973-30, sprintf('(%.2F &#176;C/h)', $value), 130, 4, $color, "IE temperature 0076 (ramp speed)", $adeiChannel[20][1]);
  1328. // 0270
  1329. $value = $adeiValue[20][2] - $adeiValue[20][6];
  1330. $color = "#000000";
  1331. if ($value < 50) placeTextWithLink(307+16, 845-30, sprintf('(%.2F &#176;C/h)', $value), 130, 4, $color, "tank temperature 0270 (ramp speed)", $adeiChannel[20][2]);
  1332. // 0283
  1333. $value = $adeiValue[20][3] - $adeiValue[20][7];
  1334. $color = "#000000";
  1335. if ($value < 50) placeTextWithLink(307+16, 973-30, sprintf('(%.2F &#176;C/h)', $value), 130, 4, $color, "tank temperature 0283 (ramp speed)", $adeiChannel[20][3]);
  1336. */
  1337. $color = "#000000";
  1338. // ########## 60s counter ##########
  1339. $date= date("Ymdgis");
  1340. if ($onsite) placePic(5, 5, "countdown60.gif?".$date, 100, "60s counter");
  1341. // ########## STS ##########
  1342. placeTextWithWebsiteLink(360, 5, "&larr;STS", 60, 5, $color, "Link to STS Status Overview", "../stsstatus");
  1343. // ########## FPD Status ##########
  1344. placeTextWithWebsiteLink(-10, 1450, "&rarr; FPD Status", 155, 4, $color, "Link to FPD Status Overview", "../fpdstatus");
  1345. // ########## MoS und HV Status ##########
  1346. placeTextWithWebsiteLink(20, 1440, "&rarr; MoS and HV Status", 240, 4, $color, "Link to Monitor Spectrometer and High Voltage Status Overview", "http://ipepc57.ipe.kit.edu:5858/mos/status");
  1347. // ########## Run Summary ##########
  1348. placeTextWithWebsiteLink(50, 1440, "&rarr; Run Summary Page", 240, 4, $color, "Link to Run Summary Page", "http://katana.npl.washington.edu/~sanshiro/kaffee/Krypton/");
  1349. // ########## 10s readout link ##########
  1350. if ($ip == "141.52.12.164") placeTextWithWebsiteLink(80, 1475, "&rarr; Switch to quick refresh", 195, 4, $color, "Link to 10s readout page", "./index_q.php");
  1351. if ($ip == "141.52.16.94") placeTextWithWebsiteLink(80, 1475, "&rarr; Switch to quick refresh", 195, 4, $color, "Link to 10s readout page", "./index_q.php");
  1352. // ########## PS ##########
  1353. // placeText(100, 170, "PS", 60, 30, $color);
  1354. // ########## HIGH VOLTAGE SWITCH ##########
  1355. /*
  1356. $value = $adeiValue[10][4]; // HAS CHANGED!!!!!
  1357. $pic = "switch";
  1358. if ($value == 1) $pic = $pic . "Open";
  1359. else if ($value == 0) $pic = $pic . "Closed";
  1360. placePicWithLink(498, 501, $pic . ".png", 80, "status high-voltage ground switch", $adeiChannel[10][4]);
  1361. */
  1362. ?>
  1363. <!--
  1364. <div style="position:absolute; top:100px; left:100px">
  1365. <canvas id="myCanvas" width="578" height="200"></canvas>
  1366. <script>
  1367. var canvas = document.getElementById('myCanvas');
  1368. var context = canvas.getContext('2d');
  1369. context.beginPath();
  1370. context.moveTo(100, 150);
  1371. context.lineTo(450, 50);
  1372. context.lineTo(250, 250);
  1373. context.stroke();
  1374. </script>
  1375. </div>
  1376. -->
  1377. </div>
  1378. </body>
  1379. </html>