123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677 |
- <html>
- <head>
- <title>KATRIN Spectrometer and Detector Section Status Overview</title>
- <style type="text/css">
- body { font-family:Calibri,Arial; }
- a:link { text-decoration:none; }
- a:visited { text-decoration:none; }
- a:hover { text-decoration:none; }
- a:active { text-decoration:none; }
- a:focus { text-decoration:none; }
- </style>
- <?php
- // get client ip adress to check whether computer is on-site or not
- if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
- $ip = $_SERVER['HTTP_CLIENT_IP'];
- } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
- } else { $ip = $_SERVER['REMOTE_ADDR']; }
- $onsite = false;
- $slowrefresh = false;
- if (substr($ip, 0, 6) == "141.52") { echo '<meta http-equiv="refresh" content="60">'; $onsite = true; }
- else { echo '<meta http-equiv="refresh" content="300">'; $slowrefresh= true; }
- ?>
- </head>
- <body>
- <?php
- function placePic($posY, $posX, $pic, $size, $title)
- {
- echo '<div title="' . $title . '" style="position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
- echo '<img src="pics/' . $pic . '" width="' . $size . '" height="' . $size . '">';
- echo '</div>';
- }
-
- function placePicWithLink($posY, $posX, $pic, $size, $title, $link)
- {
- 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">';
- placePic($posY, $posX, $pic, $size, $title);
- echo '</a>';
- }
- function placeText($posY, $posX, $text, $width, $size, $color)
- {
- echo '<div align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
- echo '<font size="' . $size . '" color="' . $color . '"><b>';
- echo $text;
- echo '</b></font></div>';
- }
- function placeTextWithLink($posY, $posX, $text, $width, $size, $color, $title, $link)
- {
- echo '<div title="' . $title . '" align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
- 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">';
- echo '<font size="' . $size . '" color="' . $color . '"><b>';
- echo $text;
- echo '</b></font></a></div>';
- }
- function placeTextWithWebsiteLink($posY, $posX, $text, $width, $size, $color, $title, $link)
- {
- echo '<div title="' . $title . '" align="center" style="width:' . $width . 'px; position:absolute; top:' . $posY . 'px; left:' . $posX . 'px">';
- echo '<a href='.$link.'>';
- echo '<font size="' . $size . '" color="' . $color . '"><b>';
- echo $text;
- echo '</b></font></a></div>';
- }
-
- function placeBox($posY, $posX, $text, $width, $size, $color)
- {
- 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">';
- echo '<font size="' . $size . '" color=#000000><b>';
- echo $text;
- echo '</b></font></div>';
- }
- function getValveStatus($value)
- {
- $value = decbin($value);
- $value = substr("00000000000", 0, 11 - strlen($value)) . $value;
- if (substr($value, 3, 1) == 1) return 1;
- else if (substr($value, 2, 1) == 1) return 0;
- else return -1;
- }
- ?>
- <?php
- // ########## SLOW CONTROL CHANNELS ##########
- $adeiChannel = array(
- array(
- "aircoils__aircoils_rep__0__2", //EMCS currents
- "aircoils__aircoils_rep__0__3",
- "aircoils__aircoils_rep__0__4",
- "aircoils__aircoils_rep__0__5",
- "aircoils__aircoils_rep__0__6",
- "aircoils__aircoils_rep__0__7",
- "aircoils__aircoils_rep__0__8",
- "aircoils__aircoils_rep__0__9",
- "aircoils__aircoils_rep__0__10",
- "aircoils__aircoils_rep__0__11",
- "aircoils__aircoils_rep__0__12",
- "aircoils__aircoils_rep__0__13",
- "aircoils__aircoils_rep__0__14",
- "aircoils__aircoils_rep__0__15",
- "aircoils__aircoils_rep__0__16",
- "aircoils__aircoils_rep__0__17"
- ),
- array(
- "aircoils__aircoils_rep__0__34", //EMCS Status
- "aircoils__aircoils_rep__0__35",
- "aircoils__aircoils_rep__0__36",
- "aircoils__aircoils_rep__0__37",
- "aircoils__aircoils_rep__0__38",
- "aircoils__aircoils_rep__0__39",
- "aircoils__aircoils_rep__0__40",
- "aircoils__aircoils_rep__0__41",
- "aircoils__aircoils_rep__0__42",
- "aircoils__aircoils_rep__0__43",
- "aircoils__aircoils_rep__0__44",
- "aircoils__aircoils_rep__0__45",
- "aircoils__aircoils_rep__0__46",
- "aircoils__aircoils_rep__0__47",
- "aircoils__aircoils_rep__0__48",
- "aircoils__aircoils_rep__0__49"
- ),
- array(
- "aircoils__aircoils_rep__0__86", // LEM Status
- "aircoils__aircoils_rep__0__87",
- "aircoils__aircoils_rep__0__88",
- "aircoils__aircoils_rep__0__89",
- "aircoils__aircoils_rep__0__90",
- "aircoils__aircoils_rep__0__91",
- "aircoils__aircoils_rep__0__92",
- "aircoils__aircoils_rep__0__93",
- "aircoils__aircoils_rep__0__94",
- "aircoils__aircoils_rep__0__95",
- "aircoils__aircoils_rep__0__96",
- "aircoils__aircoils_rep__0__97",
- "aircoils__aircoils_rep__0__98",
- "aircoils__aircoils_rep__0__99",
- "aircoils__aircoils_rep__0__100",
- "aircoils__aircoils_rep__0__101",
- "aircoils__aircoils_rep__0__102" // HV dipole trigger status
- ),
- array(
- "aircoils__aircoils_rep__0__82", //PS1 + PS2 current
- "aircoils__aircoils_rep__0__83",
- "aircoils__aircoils_rep__0__84", //PS1 + PS2 Status
- "aircoils__aircoils_rep__0__85"
- ),
- array(
- "fpd__katrin_rep__0__153",
- "fpd__katrin_rep__0__158"
- ),
- // Baffle vacuum (index 5, former egun part)
- array(
- "csms__ControlSystem_MS__432VAK_Kryoleitung__9"
- ),
- array(
- "fpd__katrin_rep__0__43",
- "fpd__katrin_rep__0__66",
- "fpd__katrin_rep__0__80",
- "fpd__katrin_rep__0__99",
- "fpd__katrin_rep__0__112",
- "fpd__katrin_rep__0__113",
- "fpd__katrin_rep__0__116",
- "fpd__katrin_rep__0__117",
- "fpd__katrin_rep__0__118",
- "fpd__katrin_rep__0__60",
- "fpd__katrin_rep__0__62",
- "fpd__katrin_rep__0__114",
- "fpd__katrin_rep__0__45"
- ),
- array(
- "csms__ControlSystem_MS__432VAK_PumpPort2__33",
- "csms__ControlSystem_MS__432VAK_PumpPort2__6",
- "csms__ControlSystem_MS__432VAK_PumpPort2__12",
- "csms__ControlSystem_MS__432VAK_PumpPort2__18",
- "csms__ControlSystem_MS__432VAK_PumpPort2__57",
- "csms__ControlSystem_MS__432VAK_PumpPort2__60",
- "csms__ControlSystem_MS__432VAK_PumpPort2__63",
- "csms__ControlSystem_MS__432VAK_PumpPort2__36"
- ),
- array(
- "csms__ControlSystem_MS__432VAK_PumpPort3__24",
- "csms__ControlSystem_MS__432VAK_PumpPort3__6",
- "csms__ControlSystem_MS__432VAK_PumpPort3__12",
- "csms__ControlSystem_MS__432VAK_PumpPort3__18",
- "csms__ControlSystem_MS__432VAK_PumpPort3__42",
- "csms__ControlSystem_MS__432VAK_PumpPort3__45",
- "csms__ControlSystem_MS__432VAK_PumpPort3__48"
- ),
- array(
- "csms__ControlSystem_MS__432VAK_Tank__6", // RPM 106
- "csms__ControlSystem_MS__432VAK_Tank__9", // VAI 105
- "csms__ControlSystem_MS__432VAK_Tank__0", // RPI 0096
- "csms__ControlSystem_MS__432VAK_Tank__15",
- "csms__ControlSystem_MS__432VAK_Tank__27",
- "csms__ControlSystem_MS__432VAK_Tank__30",
- "csms__ControlSystem_MS__432VAK_Tank__33",
- "csms__ControlSystem_MS__432VAK_Tank__30",
- "csms__ControlSystem_MS__432VAK_Tank__30",
- "csms__ControlSystem_MS__432VAK_Tank__30",
- "csms__ControlSystem_MS__432VAK_Tank__30"
- // "csms__ControlSystem_MS__432VAK_Tank__15",
- // "csms__ControlSystem_MS__432VAK_Tank__27",
- // "csms__ControlSystem_MS__432VAK_Tank__30",
- // "csms__ControlSystem_MS__432VAK_Tank__33",
- // "csms__ControlSystem_MS__432VAK_Tank__39",
- // "csms__ControlSystem_MS__432VAK_Tank__45",
- // "csms__ControlSystem_MS__432VAK_Tank__48",
- // "csms__ControlSystem_MS__432VAK_Tank__36"
- ),
- array( //HV subsystem
- "hv__katrin-hv_rep__0__39", // MS vessel IST
- "hv__katrin-hv_rep__0__38", // MS vessel SOLL
- "hv__katrin-hv_rep__0__87", // MS IE Common electrode IST
- "hv__katrin-hv_rep__0__86", // MS IE Common electrode SOLL
- "hv__katrin-hv_rep__0__71", // MS IE dipole west IST
- "hv__katrin-hv_rep__0__70", // MS IE dipole west SOLL
- "hv__katrin-hv_rep__0__79", // MS IE dipole east IST
- "hv__katrin-hv_rep__0__78", // MS IE dipole east SOLL
- "hv__katrin-hv_rep__0__63",
- "hv__katrin-hv_rep__0__62",
- "hv__katrin-hv_rep__0__55",
- "hv__katrin-hv_rep__0__54",
- "hv__katrin-hv_rep__0__132", // dipole relay status
- "hv__katrin-hv_rep__0__131", // dipole relay status
- "hv__katrin-hv_rep__0__95", // PS vessel IST
- "hv__katrin-hv_rep__0__94", // PS vessel SOLL
- "hv__katrin-hv_rep__0__103", // PS dipole west IST
- "hv__katrin-hv_rep__0__102", // PS dipole west SOLL
- "hv__katrin-hv_rep__0__111", // PS dipole east IST
- "hv__katrin-hv_rep__0__110", // PS dipole east SOLL
- "hv__katrin-hv_rep__0__47", // MS IE Precision Supply IST
- "hv__katrin-hv_rep__0__46", // MS IE Precision Supply SOLL
- ),
- array(
- "hv__katrin-hv_rep__1__3",
- "hv__katrin-hv_rep__1__10",
- "hv__katrin-hv_rep__1__17",
- "hv__katrin-hv_rep__1__24",
- "hv__katrin-hv_rep__1__31",
- "hv__katrin-hv_rep__1__38",
- "hv__katrin-hv_rep__1__45",
- "hv__katrin-hv_rep__1__52",
- "hv__katrin-hv_rep__1__59",
- "hv__katrin-hv_rep__1__66",
- "hv__katrin-hv_rep__1__73",
- "hv__katrin-hv_rep__1__80",
- "hv__katrin-hv_rep__1__87",
- "hv__katrin-hv_rep__1__94",
- "hv__katrin-hv_rep__1__101",
- "hv__katrin-hv_rep__1__108",
- "hv__katrin-hv_rep__1__115",
- "hv__katrin-hv_rep__1__122",
- "hv__katrin-hv_rep__1__129",
- "hv__katrin-hv_rep__1__136",
- "hv__katrin-hv_rep__1__143",
- "hv__katrin-hv_rep__1__150",
- "hv__katrin-hv_rep__1__157",
- "hv__katrin-hv_rep__1__164"
- ),
- array(
- "hv__katrin-hv_rep__1__2",
- "hv__katrin-hv_rep__1__9",
- "hv__katrin-hv_rep__1__16",
- "hv__katrin-hv_rep__1__23",
- "hv__katrin-hv_rep__1__30",
- "hv__katrin-hv_rep__1__37",
- "hv__katrin-hv_rep__1__44",
- "hv__katrin-hv_rep__1__51",
- "hv__katrin-hv_rep__1__58",
- "hv__katrin-hv_rep__1__65",
- "hv__katrin-hv_rep__1__72",
- "hv__katrin-hv_rep__1__79",
- "hv__katrin-hv_rep__1__86",
- "hv__katrin-hv_rep__1__93",
- "hv__katrin-hv_rep__1__100",
- "hv__katrin-hv_rep__1__107",
- "hv__katrin-hv_rep__1__114",
- "hv__katrin-hv_rep__1__121",
- "hv__katrin-hv_rep__1__128",
- "hv__katrin-hv_rep__1__135",
- "hv__katrin-hv_rep__1__142",
- "hv__katrin-hv_rep__1__149",
- "hv__katrin-hv_rep__1__156",
- "hv__katrin-hv_rep__1__163"
- ),
- array(
- "hv__katrin-hv_rep__2__3",
- "hv__katrin-hv_rep__2__10",
- "hv__katrin-hv_rep__2__17",
- "hv__katrin-hv_rep__2__24",
- "hv__katrin-hv_rep__2__31",
- "hv__katrin-hv_rep__2__38",
- "hv__katrin-hv_rep__2__45",
- "hv__katrin-hv_rep__2__52",
- "hv__katrin-hv_rep__2__59",
- "hv__katrin-hv_rep__2__66",
- "hv__katrin-hv_rep__2__73",
- "hv__katrin-hv_rep__2__80",
- "hv__katrin-hv_rep__2__87",
- "hv__katrin-hv_rep__2__94",
- "hv__katrin-hv_rep__2__101",
- "hv__katrin-hv_rep__2__108",
- "hv__katrin-hv_rep__2__115",
- "hv__katrin-hv_rep__2__122",
- "hv__katrin-hv_rep__2__129",
- "hv__katrin-hv_rep__2__136",
- "hv__katrin-hv_rep__2__143",
- "hv__katrin-hv_rep__2__150",
- "hv__katrin-hv_rep__2__157",
- "hv__katrin-hv_rep__2__164"
- ),
- array(
- "hv__katrin-hv_rep__2__2",
- "hv__katrin-hv_rep__2__9",
- "hv__katrin-hv_rep__2__16",
- "hv__katrin-hv_rep__2__23",
- "hv__katrin-hv_rep__2__30",
- "hv__katrin-hv_rep__2__37",
- "hv__katrin-hv_rep__2__44",
- "hv__katrin-hv_rep__2__51",
- "hv__katrin-hv_rep__2__58",
- "hv__katrin-hv_rep__2__65",
- "hv__katrin-hv_rep__2__72",
- "hv__katrin-hv_rep__2__79",
- "hv__katrin-hv_rep__2__86",
- "hv__katrin-hv_rep__2__93",
- "hv__katrin-hv_rep__2__100",
- "hv__katrin-hv_rep__2__107",
- "hv__katrin-hv_rep__2__114",
- "hv__katrin-hv_rep__2__121",
- "hv__katrin-hv_rep__2__128",
- "hv__katrin-hv_rep__2__135",
- "hv__katrin-hv_rep__2__142",
- "hv__katrin-hv_rep__2__149",
- "hv__katrin-hv_rep__2__156",
- "hv__katrin-hv_rep__2__163"
- ),
- array(
- "csms__ControlSystem_MS__430KRYO_Baffel__147",
- "csms__ControlSystem_MS__430KRYO_Baffel__159",
- "csms__ControlSystem_MS__430KRYO_Baffel__171",
- "csms__ControlSystem_MS__430KRYO_Baffel__183",
- "csms__ControlSystem_MS__430KRYO_Baffel__189",
- "csms__ControlSystem_MS__430KRYO_Baffel__195",
- "csms__ControlSystem_MS__430KRYO_Baffel__120",
- "csms__ControlSystem_MS__430KRYO_Baffel__123"
- ),
- array(
- "precmm0__PrecMagnet__NorthRing__0",
- "precmm0__PrecMagnet__NorthRing__1",
- "precmm0__PrecMagnet__NorthRing__2",
- "precmm0__PrecMagnet__NorthRing__7",
- "precmm0__PrecMagnet__NorthRing__8",
- "precmm0__PrecMagnet__NorthRing__9",
- "precmm0__PrecMagnet__NorthRing__14",
- "precmm0__PrecMagnet__NorthRing__15",
- "precmm0__PrecMagnet__NorthRing__16",
- "precmm0__PrecMagnet__NorthRing__21",
- "precmm0__PrecMagnet__NorthRing__22",
- "precmm0__PrecMagnet__NorthRing__23"
- ),
- array(
- "precmm0__PrecMagnet__MidRing__0",
- "precmm0__PrecMagnet__MidRing__1",
- "precmm0__PrecMagnet__MidRing__2",
- "precmm0__PrecMagnet__MidRing__7",
- "precmm0__PrecMagnet__MidRing__8",
- "precmm0__PrecMagnet__MidRing__9",
- "precmm0__PrecMagnet__MidRing__14",
- "precmm0__PrecMagnet__MidRing__15",
- "precmm0__PrecMagnet__MidRing__16",
- "precmm0__PrecMagnet__MidRing__21",
- "precmm0__PrecMagnet__MidRing__22",
- "precmm0__PrecMagnet__MidRing__23",
- "precmm0__PrecMagnet__MidRing__28",
- "precmm0__PrecMagnet__MidRing__29",
- "precmm0__PrecMagnet__MidRing__30",
- "precmm0__PrecMagnet__MidRing__35",
- "precmm0__PrecMagnet__MidRing__36",
- "precmm0__PrecMagnet__MidRing__37"
- ),
- array(
- "precmm0__PrecMagnet__SouthRing__0",
- "precmm0__PrecMagnet__SouthRing__1",
- "precmm0__PrecMagnet__SouthRing__2",
- "precmm0__PrecMagnet__SouthRing__7",
- "precmm0__PrecMagnet__SouthRing__8",
- "precmm0__PrecMagnet__SouthRing__9",
- "precmm0__PrecMagnet__SouthRing__14",
- "precmm0__PrecMagnet__SouthRing__15",
- "precmm0__PrecMagnet__SouthRing__16",
- "precmm0__PrecMagnet__SouthRing__21",
- "precmm0__PrecMagnet__SouthRing__22",
- "precmm0__PrecMagnet__SouthRing__23"
- ),
- array(
- "fpd__katrin_rep__0__198",
- "fpd__katrin_rep__0__199",
- "fpd__katrin_rep__0__200"
- ),
- array(
- "csms__ControlSystem_MS__435HZ_Temperatur__27",
- "csms__ControlSystem_MS__435HZ_Temperatur__33",
- "csms__ControlSystem_MS__435HZ_Temperatur__42",
- "csms__ControlSystem_MS__435HZ_Temperatur__45"
- ),
- array(
- "aircoils__aircoils_rep__1__2",
- "aircoils__aircoils_rep__1__3",
- "aircoils__aircoils_rep__1__4",
- "aircoils__aircoils_rep__1__5",
- "aircoils__aircoils_rep__1__6",
- "aircoils__aircoils_rep__1__7",
- "aircoils__aircoils_rep__1__8",
- "aircoils__aircoils_rep__1__9",
- "aircoils__aircoils_rep__1__10",
- "aircoils__aircoils_rep__1__11",
- "aircoils__aircoils_rep__1__12",
- "aircoils__aircoils_rep__1__13",
- "aircoils__aircoils_rep__1__14",
- "aircoils__aircoils_rep__1__15",
- "aircoils__aircoils_rep__1__16",
- "aircoils__aircoils_rep__1__17"
- ),
- array(
- "aircoils__aircoils_rep__1__18",
- "aircoils__aircoils_rep__1__19",
- "aircoils__aircoils_rep__1__20",
- "aircoils__aircoils_rep__1__21",
- "aircoils__aircoils_rep__1__22",
- "aircoils__aircoils_rep__1__23",
- "aircoils__aircoils_rep__1__24",
- "aircoils__aircoils_rep__1__25",
- "aircoils__aircoils_rep__1__26",
- "aircoils__aircoils_rep__1__27",
- "aircoils__aircoils_rep__1__28",
- "aircoils__aircoils_rep__1__29",
- "aircoils__aircoils_rep__1__30",
- "aircoils__aircoils_rep__1__31",
- "aircoils__aircoils_rep__1__32",
- "aircoils__aircoils_rep__1__33"
- ),
- array(
- "aircoils__aircoils_rep__1__57",
- "aircoils__aircoils_rep__1__58",
- "aircoils__aircoils_rep__1__43",
- "aircoils__aircoils_rep__1__44",
- "aircoils__aircoils_rep__1__45",
- "aircoils__aircoils_rep__1__46",
- "aircoils__aircoils_rep__1__47",
- "aircoils__aircoils_rep__1__48",
- "aircoils__aircoils_rep__1__49",
- "aircoils__aircoils_rep__1__50",
- "aircoils__aircoils_rep__1__51",
- "aircoils__aircoils_rep__1__52",
- "aircoils__aircoils_rep__1__53",
- "aircoils__aircoils_rep__1__54",
- "aircoils__aircoils_rep__1__55",
- "aircoils__aircoils_rep__1__56",
- "aircoils__aircoils_rep__1__38"
- ),
- // CPS current (index 24)
- array(
- "cscps__ControlSystem_CPS__320_MAG_Stromzufuhr__0"
- ) ,
- // PP2 TMP temps (index 25)
- array(
- "csms__ControlSystem_MS__435HZ_PumpPort2__78",
- "csms__ControlSystem_MS__435HZ_PumpPort2__81",
- "csms__ControlSystem_MS__435HZ_PumpPort2__84"
- ),
- // PP3 TMP temps (index 26)
- array(
- "csms__ControlSystem_MS__435HZ_PumpPort3__60",
- "csms__ControlSystem_MS__435HZ_PumpPort3__63",
- "csms__ControlSystem_MS__435HZ_PumpPort3__66"
- ),
- // PS vacuum system (index 27)
- array(
- "csps__ControlSystem_PS__412VAK_PumpPort__27", // CC1232
- "csps__ControlSystem_PS__412VAK_PumpPort__6", // TMP 1122 speed
- "csps__ControlSystem_PS__412VAK_PumpPort__12", // TMP 1123 speed
- "csps__ControlSystem_PS__412VAK_PumpPort__42", // VAO 1313 ZUST
- "csps__ControlSystem_PS__412VAK_PumpPort__45", // VAO 1314 ZUST
- "csps__ControlSystem_PS__412VAK_PumpPort__21" // Ex1221
- ),
- // MS PP1 vacuum (index 28)
- array(
- "csms__ControlSystem_MS__432VAK_PumpPort1__0"
- ),
- // PS Temperatures (index 29)
- array(
- "csps__ControlSystem_PS__415HZ_Tank__78",
- "csps__ControlSystem_PS__415HZ_Tank__84",
- "csps__ControlSystem_PS__415HZ_Tank__90"
- ) ,
- // Voltage monitoring K35 etc. (index 30)
- array(
- "hv__katrin-hv_rep__7__2", //K35 divided voltage
- "hv__katrin-hv_rep__7__5" //K65 divided voltage
- ),
- // Interlock V4 and Detector Valve (index 31)
- array(
- "csms__ControlSystem_MS__436HV_Interlook__6" //CRT 5221 Freigabe
- )
- );
- $username = 'katrin';
- $password = 'neutrino';
- $context = stream_context_create(array(
- 'http' => array(
- 'header' => "Authorization: Basic " . base64_encode("$username:$password"), "Connection: close\r\n"
- )
- ));
- $errorcount = 0;
- $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>';
- for ($id = 0; $id < sizeof($adeiChannel); $id++)
- {
- $adeiChannels = "";
- for ($id2 = 0; $id2 < sizeof($adeiChannel[$id]); $id2++)
- {
- $adeiChannels = $adeiChannels . $adeiChannel[$id][$id2] . ",";
- }
- $adeiChannels = substr($adeiChannels, 0, strlen($adeiChannels) - 1);
- $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);
- //$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);
- //$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);
- //if ($id == 9) echo $fileip . "<br> <br>"; // echo debug info for one single group
- if (substr($fileip,0,5) == "ERROR")
- {$errorcount++; $errormessage = $errormessage . "Error loading ADEI channel " . $id . "<br>";}
- for ($id2 = sizeof($adeiChannel[$id]) - 1 ; $id2 > -1; $id2--)
- {
- $pos = strrpos($fileip, ",");
- $adeiValue[$id][$id2] = floatval(substr($fileip, $pos + 2));
- $fileip = substr($fileip, 0, $pos);
- //echo "<br>" . $fileip . "<br> <br>" . $id . ", " . $id2 . ", " . $adeiValue[$id][$id2] . "<br>";
- }
- }
- /*
- // special case: temperature ramp speed (array 21) !!!!!!!!!!
- $id = 21;
- $adeiChannels = "";
- for ($id2 = 0; $id2 < sizeof($adeiChannel[$id]); $id2++)
- {
- $adeiChannels = $adeiChannels . $adeiChannel[$id][$id2] . ",";
- }
- $adeiChannels = substr($adeiChannels, 0, strlen($adeiChannels) - 1);
- $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);
- for ($id2 = sizeof($adeiChannel[$id]) - 1 ; $id2 > -1; $id2--)
- {
- $pos = strrpos($fileip, ",");
- $adeiValue[$id][$id2 + 4] = floatval(substr($fileip, $pos + 2));
- $fileip = substr($fileip, 0, $pos);
- }
- */
- // ########## TIME STAMP ##########
- echo '<font size="6" color="#000000"><b>KATRIN Spectrometer and Detector Section Status Overview</b></font><br>';
- echo '<font size="5" color="#000000">' . date(DATE_RFC822) . '</font><br>';
- if ($errorcount >0) echo $errormessage;
- ?>
- <div style="position:absolute; top:150px; left:0px">
- <img src="pics/beamline_noMoS.png">
- <div style="position:absolute; top:20px; left:315px">
- <img src="pics/spectrometer.png" width="1130" height="596">
- </div>
- <div style="position:absolute; top:-140px; left:1800px">
- <img src="pics/katrin_logo.jpg" width="100" height="100">
- </div>
- <a href="mailto:thuemmler@kit.edu">
- <div title="send email to Thomas Thuemmler" style="position:absolute; top:-70px; left:8px">
- <img src="pics/newEmail.png" width="23" height="23">
- </div>
- </a>
- <?php
- if ($onsite) echo '<br>Requested from inside KIT network.<br>';
- $tol = 0.5;
- // ########## VALVES ##########
- // V4
- $value = $adeiValue[31][0];
- $pic = "valve";
- if ($value == 1) $pic = $pic . "FREE";
- else if ($value == 0) $pic = $pic . "Off";
- placePicWithLink(303, 60, $pic . ".png", 30, "status CPS-PS gate vlave V4 purple: clearance to open, red: no clearance, grey: undefined", $adeiChannel[6][0]);
-
- // PS
- $value = 1; //getValveStatus($adeiValue[9][0]);
- $pic = "valve";
- if ($value == 1) $pic = $pic . "On";
- else if ($value == 0) $pic = $pic . "Off";
- placePicWithLink(303, 283, $pic . ".png", 30, "status PS beam-line gate valve green: open, red: closed, grey: undefined", $adeiChannel[9][0]);
- // FPD
- $value = $adeiValue[6][0];
- $pic = "valve";
- if ($value == 1) $pic = $pic . "On";
- else if ($value == 0) $pic = $pic . "Off";
- placePicWithLink(303, 1466, $pic . ".png", 30, "status FPD beam-line gate valve green: open, red: closed, grey: undefined", $adeiChannel[6][0]);
- // ########## MAGNETS ##########
- // CPS
- $NlCPS = 20550 / 0.9133;
- $BfieldCPS = 1.26e-6 * $adeiValue[24][0] * $NlCPS; // mu0 * I * N/l
- if ($BfieldCPS < 0.1) { $value = "OFF"; $color = "#FF0000"; }
- else { $value = sprintf('%.1F T', $BfieldCPS); $color = "#000000"; }
- placeTextWithLink(240, 2, $value, 60, 5, $color, "field of CPS behind separation wall derived from current", $adeiChannel[24][0]);
- placeText(265, 2, "CPS", 60, 2, "#000000");
-
- // PS1
- if ($adeiValue[3][3] == 0) { $value = "LEM"; $color = "#FF0000"; }
- else { $value = sprintf('%.1F T', $adeiValue[3][1] / 157.0 * 4.5); $color = "#000000"; }
- placeTextWithLink(240, 66, $value, 70, 5, $color, "stand-alone center field PS1 magnet", $adeiChannel[3][1]);
- placeText(265, 66, "PS1", 70, 2, "#000000");
- // PS2
- if ($adeiValue[3][2] == 0) { $value = "LEM"; $color = "#FF0000"; }
- else { $value = sprintf('%.1F T', $adeiValue[3][0] / 157.0 * 4.5); $color = "#000000"; }
- placeTextWithLink(240, 274, $value, 70, 5, $color, "stand-alone center field PS2 magnet", $adeiChannel[3][0]);
- placeText(265, 274, "PS2", 70, 2, "#000000");
- // Pinch
- 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]);
- placeText(265, 1420, "PCH", 70, 2, "#000000");
- // Detector
- 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]);
- placeText(265, 1495, "DET", 70, 2, "#000000");
- // ########## PAE ##########
- placeTextWithLink(303, 1553, sprintf('%.1F', $adeiValue[6][2]) . " kV", 90, 5, "#000000", "PAE potential", $adeiChannel[6][2]);
- placeText(328, 1553, "PAE", 90, 2, "#000000");
- // ########## PUMP PORTS ##########
- placeText(416, 1623, "PP2", 50, 2, "#000000");
- placeText(466, 1623, "PP1", 50, 2, "#000000");
- placeText(516, 1623, "PP3", 50, 2, "#000000");
- // ########## BAFFLE ##########
- $max = array( 90, 94, 88 );
- placeText(560, 1395, "LN<sub>2</sub> Tank", 130, 5, "#000000");
- $link = $adeiChannel[15][6] . "," . $adeiChannel[15][7];
- placePicWithLink(562,1360, "LN2tank.png", 60, "LN2 tank", $link);
- $value = $adeiValue[15][6];
- $link = $adeiChannel[15][6];
- $text = sprintf('%.0F', $value) . " %";
- placeTextWithLink(590, 1395, $text, 70, 4, "#000000", "LN2 tank level", $link);
-
- $value = $adeiValue[15][7];
- $link = $adeiChannel[15][7];
- $text = sprintf('%.1F', $value) . " bar";
- placeTextWithLink(590, 1450, $text, 70, 4, "#000000", "LN2 tank pressure", $link);
- for ($id = 0; $id < 3; $id++)
- {
- $value = $adeiValue[15][$id];
- $pic = "ice.png";
- $text = "---";
- if ($value < 800)
- {
- $text = sprintf('%.0F', $value) . " K";
- if ($value > $max[$id]) $pic = "iceOff.png";
- else
- {
- $value = $adeiValue[15][$id + 3];
- if ($value > 0.1 && $value < 7.0) $pic = "iceOn.png";
- else $pic = "iceBlink.gif";
- }
- }
- $pos = $id;
- if ($id == 0) $pos = 1;
- else if ($id == 1) $pos = 0;
- $link = $adeiChannel[15][$id] . "," . $adeiChannel[15][$id + 3];
- placePicWithLink(410 + $pos * 50, 1375, $pic, 30, "status baffle PP" . ($id + 1) . " blue: cooled, red: warmed, blinking: warming, grey: undefined", $link);
- placeTextWithLink(437 + $pos * 50, 1355, $text, 70, 4, "#000000", "temperature baffle PP" . ($id + 1), $link);
- }
- // ########## PRESSURES ##########
- // CC2320
- $value = $adeiValue[7][0];
- $pic = "cc";
- $text = "---";
- if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(410, 1435, $pic . ".png", 30, "status cold cathode gauge CC2320 green: on, red: off, grey: undefined", $adeiChannel[7][0]);
- placeTextWithLink(439, 1415, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC2320", $adeiChannel[7][0]);
- // CC2345
- $value = $adeiValue[7][7];
- $pic = "cc";
- $text = "---";
- if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(427, 1482, $pic . ".png", 30, "status cold cathode gauge CC2345 green: on, red: off, grey: undefined", $adeiChannel[7][7]);
- placeTextWithLink(406, 1462, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC2345", $adeiChannel[7][7]);
- // Ex3110
- $value = $adeiValue[8][0];
- $pic = "ex";
- $text = "---";
- if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 2E-5 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(510, 1435, $pic . ".png", 30, "status extractor ion gauge Ex3110 green: on, red: off, grey: undefined", $adeiChannel[8][0]);
- placeTextWithLink(539, 1415, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex3110", $adeiChannel[8][0]);
- // Ex1110
- $value = $adeiValue[28][0];
- $link = $adeiChannel[28][0];
- $pic = "ex";
- $text = "---";
- if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
- if ($value <= 2E-5 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value);}
- placePicWithLink(460, 1435, $pic, 30, "status extractor ion gauge Ex1110 green: off, blinking: on, grey: undefined", $link);
- placeTextWithLink(489, 1415, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex1110", $link);
- // Ex0096
- $value = $adeiValue[9][2];
- $link = $adeiChannel[9][2];
- $pic = "gauge";
- $text = "---";
- //$text = sprintf('%.1E', $value);
- if ($value > 2E-5) { $pic = $pic . "Off"; $text = "OFF"; }
- if ($value <= 1E-11) { $pic = $pic; $text = "LOW"; }
- if ($value <= 2E-5 && $value > 1E-11) { $pic = "gaugeOn.png"; $text = sprintf('%.1E', $value);}
- placePicWithLink(230, 1220, $pic, 30, "status stable ion gauge 0096 green: off, blinking: on, grey: undefined", $link);
- placeTextWithLink(259, 1200, $text, 70, 4, "#000000", "pressure [mbar] stable ion gauge 0096", $link);
- // CC FPD
- $value = $adeiValue[6][1];
- $pic = "cc";
- $text = "---";
- if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
- if ($value < 1E-11) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 1E-4 && $value > 1E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(188, 1475, $pic . ".png", 30, "status FPD cold cathode gauge green: on, red: off, grey: undefined", $adeiChannel[6][1]);
- placeTextWithLink(217, 1455, $text, 70, 4, "#000000", "pressure [mbar] FPD cold cathode gauge", $adeiChannel[6][1]);
- // Gauge Baffle
- $value = $adeiValue[5][0];
- $link = $adeiChannel[5][0];
- $color = "#000000";
- $pic = "gauge";
- $text = "---";
- if ($value > 1E-4) { $pic = $pic . "Off"; $text = "OFF"; }
- // standard cold blue "#0026FF" , ice cold blue "#107BC7"
- if ($value < 2E-6 && $value > 1E-9) { $pic ="gaugeOn.png"; $color ="#107BC7"; $text = sprintf('%.1E', $value); }
- else if ($value >= 1E-6 && $value < 1e-1) { $pic = "gaugeOff.png"; $color = "FF0000"; $text = sprintf('%.1E', $value); }
- placePicWithLink(460, 1315, $pic, 30, "status baffle insulation vacuum gauge gray: off, green: on, red: too high
Should be < 5e-6 mbar for HV operation!!!", $link);
- placeTextWithLink(460+29, 1295, $text, 70, 4, $color, "pressure [mbar] baffle insulation vacuum gauge", $link);
- // PS CC1232
- $value = $adeiValue[27][0];
- $link = $adeiChannel[27][0];
- $pic = "cc";
- $text = "---";
- if ($value > 1E-5) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 1E-5 && $value > 2E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(370, 210, $pic . ".png", 30, "status cold cathode gauge CC1232 green: on, red: off, grey: undefined", $link);
- placeTextWithLink(399, 190, $text, 70, 4, "#000000", "pressure [mbar] cold cathode gauge CC1232", $link);
- // PS Ex1221
- $value = $adeiValue[27][5];
- $link = $adeiChannel[27][5];
- $pic = "ex";
- $text = "---";
- if ($value > 1E-5) { $pic = $pic . "Off"; $text = "OFF"; }
- else if ($value <= 1E-5 && $value > 2E-12) { $pic = $pic . "On"; $text = sprintf('%.1E', $value); }
- placePicWithLink(188, 141, $pic . ".png", 30, "status extractor ion gauge Ex1221 green: on, red: off, grey: undefined", $link);
- placeTextWithLink(217, 121, $text, 70, 4, "#000000", "pressure [mbar] extractor ion gauge Ex1221", $link);
- // ########## VACUUM PUMPS ##########
- // MS TMP Temperatures
- //T<sub>max</sub>
- $value = max($adeiValue[25][0], $adeiValue[25][1], $adeiValue[25][2]);
- $link = $adeiChannel[25][0] . "," . $adeiChannel[25][1] . "," . $adeiChannel[25][2];
- $color = "#000000";
- if ($value < 10) $color = "#0026FF";
- else if ($value > 50) $color = "#FF0000";
- placeTextWithLink(435, 1625, sprintf('%.1F °C', $value), 70, 3, $color, "TMP max temperature PP2", $link);
- $value = max($adeiValue[26][0], $adeiValue[26][1], $adeiValue[26][2]);
- $link = $adeiChannel[26][0] . "," . $adeiChannel[26][1] . "," . $adeiChannel[26][2];
- $color = "#000000";
- if ($value < 10) $color = "#0026FF";
- else if ($value > 50) $color = "#FF0000";
- placeTextWithLink(535, 1625, sprintf('%.1F °C', $value), 70, 3, $color, "TMP max temperature PP3", $link);
- // TMPs (PP2 + PP3)
- for ($pp = 0; $pp < 2; $pp++)
- {
- for ($id = 0; $id < 3; $id++)
- {
- $value = $adeiValue[$pp + 7][$id + 1];
- $pic = "tmp";
- $text = "---";
- if ($value < 50)
- {
- $pic = $pic . "Off";
- }
- else if ($value >= 50 && $value < 500)
- {
- $text = sprintf('%.0F', $value);
- if ($value > 450)
- {
- $value = $adeiValue[$pp + 7][$id + 4];
- //$pic = $pic . "On";
- if ($value == 1) $pic = $pic . "On";
- else if ($value == 0) $pic = $pic . "Standby";
- }
- }
- placePicWithLink(410 + $pp * 100, 1528 + $id * 35, $pic . ".png", 30, "status turbo-molecular pump TMP" . ($pp + 2) . ($id + 4) . "20 green: on, yellow: on but isolated, red: off, grey: undefined", $adeiChannel[$pp + 7][$id + 1]);
- 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]);
- }
- }
- // PS TMPs
- for ($id = 0; $id < 2; $id++)
- {
- $value = $adeiValue[27][$id + 1];
- $link = $adeiChannel[27][$id + 1];
- $pic = "tmp";
- $text = "---";
- if ($value < 50)
- {
- $pic = $pic . "Off";
- }
- else if ($value >= 50 && $value < 700)
- {
- $text = sprintf('%.0F', $value);
- if ($value > 570)
- {
- $value = $adeiValue[27][$id + 3];
- //$pic = $pic . "On";
- if ($value == 1) $pic = $pic . "On";
- else if ($value == 0) $pic = $pic . "Standby";
- }
- }
- placePicWithLink(370, 123 + $id * 35, $pic . ".png", 30, "status turbo-molecular pump TMP" . (1123 - $id) . " green: on, yellow: on but isolated, red: off, grey: undefined", $link);
- placeTextWithLink(399, 114 + $id * 35, $text, 50, 4, "#000000", "rotational speed [Hz] turbo-molecular pump TMP" . (1123 - $id), $link);
- }
- // FPD CP
- $value = $adeiValue[6][3];
- $pic = "cp";
- $text = "---";
- if ($value > 20)
- {
- $pic = $pic . "Off";
- }
- else if ($value <= 20 && $value > 5)
- {
- $text = sprintf('%.0F K', $value);
- $value = $adeiValue[6][12];
- if ($value == 1) { $pic = $pic . "On"; }
- else if ($value == 0) { $pic = $pic . "Standby"; }
- }
- placePicWithLink(340, 1470, $pic . ".png", 30, "status FPD UHV cryo pump green: on, yellow: on but isolated, red: off, grey: undefined", $adeiChannel[6][3]);
- placeTextWithLink(367, 1450, $text, 70, 4, "#000000", "temperature FPD UHV cryo pump", $adeiChannel[6][3]);
- // ########## FPD SOURCES ##########
- $pic = "source";
- $text = "---";
- if ($adeiValue[6][9] == 1 && $adeiValue[6][10] == 1) { $pic = $pic . "On"; $text = "OUT"; }
- else if ($adeiValue[6][9] == 1 && $adeiValue[6][10] == 0) { $pic = $pic . "EIn"; $text = "IN"; }
- else if ($adeiValue[6][9] == 0 && $adeiValue[6][10] == 1) { $pic = $pic . "GIn"; $text = "IN"; }
- else if ($adeiValue[6][9] == 0 && $adeiValue[6][10] == 0) { $pic = $pic . "Off"; $text = "IN"; }
- $link = $adeiChannel[6][9] . "," . $adeiChannel[6][10];
- placePicWithLink(340, 1505, $pic . ".png", 30, "status FPD sources (electron and gamma source) green: retracted (out), red: inserted (in), grey: undefined", $link);
- placeTextWithLink(367, 1485, $text, 70, 4, "#000000", "status FPD sources (electron and gamma source)", $link);
- // ########## AIR COILS ##########
- $tol = 0.5;
- for ($coil = 0; $coil < 16; $coil++)
- {
- $value = $adeiValue[0][$coil];
- $color = "#000000";
- if (abs($value) < $adeiValue[21][$coil] - $tol || abs($value) > $adeiValue[21][$coil] + $tol) $color = "#FF0000";
- if ($value < -$tol && $adeiValue[22][$coil] != 1) $color = "#FF0000";
- if ($value > $tol && $adeiValue[22][$coil] != 0) $color = "#FF0000";
- if ($coil == 15) $value = -$value; // coil 14 is inverted
- $value = sprintf('%.1F', $value);
- if ($value <= -100 || $value >= 100) $value = sprintf('%.0F', $value);
- if ($value >= -0.1 && $value <= 0.1) $value = sprintf('%.1F', 0.0);
- // $status = $adeiValue[1][$coil];
- $status = 1;
- // $lem = $adeiValue[2][$coil];
- $lem = 1;
- if ($coil == 0) $pos = 270;
- else if ($coil == 1) $pos = 320;
- else if ($coil == 2) $pos = 521;
- else if ($coil == 15) $pos = 1167;
- else $pos = 609 + ($coil - 3) * 42.9;
- if ($status == 0 || $lem == 0) $color = "#FF0000";
- if ($status == 0) $value = "OVP";
- if ($lem == 0) $value = "LEM";
- $label = ($coil - 1);
- if ($coil == 0) $label = "VER";
- else if ($coil == 1) $label = "HOR";
- $color = "#006400";
- placeTextWithLink(-13, $pos, $value, 70, 4, $color, "air-coil current [A] OVP: over-voltage protection triggered, LEM: DCCT offline", $adeiChannel[0][$coil]);
- placeText(5, $pos, $label, 70, 2, "#000000");
- $color = "#000000";
- $label = "";
- if ($adeiValue[22][$coil] == 1 && $adeiValue[23][16] == 0) { $color = "#FF0000"; $label = "FLIP"; }
- if ($adeiValue[22][$coil] == 0 && $adeiValue[23][16] == 1 && $adeiValue[23][$coil] == 1) { $color = "#FF0000"; $label = "PULS"; }
- if ($adeiValue[22][$coil] == 1 && $adeiValue[23][16] == 1 && $adeiValue[23][$coil] == 1) { $color = "#FF0000"; $label = "PULS"; } // F+P
- placeTextWithLink(22 + 12, $pos, $label, 70, 2, $color, "air-coil status FLIP: flipped, PULS: pulsed, F+P: both", $adeiChannel[23][$coil]);
- }
- // EMCS
- placeText(-15, 200, "EMCS", 70, 5, "#000000");
- $tol = 0.5;
- $text = "???";
- $color = "#FFD800";
- $EMCSver = 46.46;
- $EMCShor = 7.1;
- 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"; }
- else if ($adeiValue[0][0] < $tol && $adeiValue[0][1] < $tol && $adeiValue[0][0] > -$tol && $adeiValue[0][1] > -$tol) { $text = "OFF"; $color = "#FF0000"; }
- placeBox(-12, 160, $text, 35, 3, $color);
- // LFCS
- placeText(-15, 467, "LFCS", 70, 5, "#000000");
- $tol = 0.5;
- $text = "ON ???";
- $color = "#FFD800";
- $lfcs = array( // current 14 is inverted, negative value in definition must be positive here
- 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),
- 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 ),
- 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 ),
- 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 ),
- 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),
- 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),
- 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),
- 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),
- 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),
- 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),
- array( "14G 70%", 100, 94.8, 157.6, 143.9, 170, 130.1, 150.0, 150.0, 145, 162.5, 170, 100, 100, 0),
- 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),
- 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),
- 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),
- 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)
- );
- for ($pp = 0; $pp < 15; $pp++)
- {
- for ($id = 0; $id < 14; $id++)
- {
- $tol = abs($tol);
- //echo $pp . ", " . $id . ", " . $adeiValue[0][$id + 2] . ", " . $lfcs[$pp][$id + 1] .", ". $tol . "<br>";
- //if ($adeiValue[0][$id + 2] > $lfcs[$pp][$id + 1] - $tol && $adeiValue[0][$id + 2] < $lfcs[$pp][$id + 1] + $tol)
- if (abs($adeiValue[0][$id + 2] - $lfcs[$pp][$id + 1]) < $tol)
- {
- if ($id == 13) { $text = $lfcs[$pp][0]; $color = "#4CFF00"; }
- }
- else break;
- }
- }
- if ($text == "0.0") { $text = "OFF"; $color = "#FF0000"; }
- placeBox(-12, 400, $text, 67, 3, $color);
- // ########## HIGH VOLTAGE ##########
- // load patch-panel configuration
- $handle = fopen("patchpanel/ringstoadei.txt", "r");
- if ($handle)
- {
- while (($buffer = fgets($handle, 4096)) !== false)
- {
- $buffer = trim($buffer);
- $ringsToAdei[count($ringsToAdei)] = $buffer;
- }
- fclose($handle);
- }
- // labels
- $posY = 12; // offset between labels and voltages (13)
- $posX = 6; // down/bottom (7)
- // voltage monitoring readout
- $color = "#000000";
- $factor_m = 1972.4531;
- $offset = 3.104e-6;
- $gain = 0.9999992578;
- $value = ($adeiValue[30][0] - $offset) * $gain * $factor_m;
- $voltage_error = abs($value * 2e-3);
- if ($voltage_error < 1) { $voltage_error = 1; }
- $link = $adeiChannel[30][0];
- $text = "K35 divider readout, precision value";
- placeText(385, 816, "K35 Voltage Reading", 130, 2, $color); // K35 voltage reading
- placeTextWithLink(363, 796, sprintf('%.3F', $value ) . "(" . sprintf('%.0F', $voltage_error ) .") V" , 170, 4, $color, $text, $link);
- //placeText(180, 845, "MS WEST IE", 70, 2,"#808080"); // west IE being displayed in loop below
- //placeText(450, 845, "MS EAST IE", 70, 2,"#808080"); // east IE
- placeText(265, 815, "MS IE COMMON", 130, 2, "#000000"); // mainspec IE Common
- placeText(265, 170, "PS TANK", 70, 2, "#000000"); // prespec tank
- placeText(305, 150, "PS CONES IE", 110, 2, "#505050"); // prespec west IE
- placeText(345, 150, "PS CENTER IE", 110, 2, "#505050"); // prespec east IE
- // MS Tank from Precision HCP Supply or Standard HCN
- $text = "MS TANK";
- $ms_hcn_soll = $adeiValue[10][1];
- $ms_hcp_soll = $adeiValue[10][21];
- if ($ms_hcn_soll == 0) {
- if ($ms_hcp_soll == 0) { $text = $text . " OFF";}
- else { $text = $text . " HCP"; $HCP = true; }
- } else { $text = $text . " HCN"; $HCP = false; }
- placeText(70, 830, $text, 100, 2, "#000000"); // mainspec tank
- // switch values here between HCN and HCP in Value and Channel Array !!!
- if ($HCP) { $adeiValue[10][0] = -$adeiValue[10][20]; $adeiValue[10][1] = $adeiValue[10][21];
- $adeiChannel[10][0] = $adeiChannel[10][20]; $adeiChannel[10][1] = $adeiChannel[10][21]; }
- placeText(110-$posY, 845, "W7-11", 70, 2, "#000000"); // w7-11
- placeText(503+$posY+$posX, 845, "E7-11", 70, 2, "#000000"); // e7-11
- placeText(126-$posY, 600, "W6", 70, 2, "#000000"); // w6
- placeText(487+$posY+$posX, 600, "E6", 70, 2, "#000000"); // e6
- placeText(126-$posY, 1090, "W12", 70, 2, "#000000"); // w12
- placeText(487+$posY+$posX, 1090, "E12", 70, 2, "#000000"); // e12
- placeText(161-$posY, 516, "W5", 70, 2, "#000000"); // w5
- placeText(452+$posY+$posX, 516, "E5", 70, 2, "#000000"); // e5
- placeText(161-$posY, 1174, "W13", 70, 2, "#000000"); // w13
- placeText(452+$posY+$posX, 1174, "E13", 70, 2, "#000000"); // e13
- placeText(194-$posY, 434, "W4", 70, 2, "#000000"); // w4
- placeText(419+$posY+$posX, 434, "E4", 70, 2, "#000000"); // e4
- placeText(194-$posY, 1256, "W14", 70, 2, "#000000"); // w14
- placeText(419+$posY+$posX, 1256, "E14", 70, 2, "#000000"); // e14
- placeText(225-$posY, 385, "W3", 70, 2, "#000000"); // w3
- placeText(388+$posY+$posX, 385, "E3", 70, 2, "#000000"); // e3
- placeText(225-$posY, 1305, "W15", 70, 2, "#000000"); // w15
- placeText(388+$posY+$posX, 1305, "E15", 70, 2, "#000000"); // e15
- placeText(273-$posY, 352, "W2", 70, 2, "#000000"); // w2
- placeText(340+$posY+$posX, 352, "E2", 70, 2, "#000000"); // e2
- placeText(273-$posY, 1338, "W16", 70, 2, "#000000"); // w16
- placeText(340+$posY+$posX, 1338, "E16", 70, 2, "#000000"); // e16
- if ($adeiValue[10][8] > 10.0) placeText(309, 359, "APE", 70, 2, "#000000"); // ape south
- if ($adeiValue[10][10] > 10.0) placeText(309, 1331, "APE", 70, 2, "#000000"); // ape north
- // offset voltages
- $posY = 16; // offset between outer and inner voltages
- $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 );
- $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 );
- $tol = 0.2;
- for ($pp = 0; $pp < 2; $pp++) // west (0), east (1)
- {
- for ($id = 0; $id < 22; $id++) // rings: o, i, o, i, ...
- {
- // show voltage if not shorted to IE
- if ($ringsToAdei[$id + 22*$pp] != "IE" && $ringsToAdei[$id + 22*$pp] != "")
- {
- // color
- 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) )
- $color = "#000000";
- else
- $color = "#FF0000";
- // show voltage
- if ( ($id % 2 == 0) || ($id % 2 == 1 && $ringsToAdei[$id + 22*$pp] != $ringsToAdei[$id + 22*$pp - 1]) )
- {
- 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]]);
- }
- }
- }
- }
- // tank, ie, dipole, ape
- $ringsPosY = array( 45, 240, 155, 425, 306, 306, 0, 240, 280, 320 );
- $ringsPosX = array( 805, 805, 805, 805, 319, 1371, 0, 130, 130, 130 );
- $tolA = array ( 15, 2, 1, 1, 1, 1, 0, 250, 1, 1 );
- // MS voltages
- for ($pp = 0; $pp < 6; $pp++) // tank (0), ie (1), ie west (2), ie east (3), ape south (4), ape north (5)
- {
- // color
- if ( ($adeiValue[10][2*$pp] > $adeiValue[10][2*$pp + 1] - $tolA[$pp]) && ($adeiValue[10][2*$pp] < $adeiValue[10][2*$pp + 1] + $tolA[$pp]) )
- $color = "#000000";
- else
- $color = "#FF0000";
- // show voltage
- $value = $adeiValue[10][2*$pp];
- $link = $adeiChannel[10][2*$pp];
- $dipolestatus = $adeiValue[2][16];
- $dipolelink = $adeiChannel[2][16];
- if ($pp == 0) { $text = "absolute tank potential"; }
- else if ($pp == 1) { $text = "IE common offset potential"; }
- else if ($pp == 2) { $text = "relative voltage potential west IE"; }
- else if ($pp == 3) { $text = "relative voltage potential east IE"; }
- else if ($pp == 4) { $text = "relative voltage potential south APE"; }
- else if ($pp == 5) { $text = "relative voltage potential north APE"; }
- if ($pp == 2 || $pp == 3)
- {
- if ($dipolestatus == 1) // dipole enabled
- {
- $color = "#990000";
- $value = $adeiValue[10][2*$pp];
- if ($pp == 2)
- {
- placeText($ringsPosY[$pp] + 40, $ringsPosX[$pp], "DIPOLE", 150, 4, "#CC0000" );
-
- }
- else if ($pp == 3)
- {
- placeText($ringsPosY[$pp] + 40, $ringsPosX[$pp], "DIPOLE", 150, 4, "#CC0000");
-
- }
- }
- else
- {
- $value = $adeiValue[10][2*$pp]; // dipole disabled
- $color = "#909090";
- }
- if ($pp == 2) placeText(180, 825, "MS WEST IE", 110, 2, $color); // west IE
- else if ($pp == 3) placeText(450, 825, "MS EAST IE", 110, 2, $color); // east IE
- $link = $adeiChannel[10][2*$pp+1] . "," . $adeiChannel[10][2*$pp] . "," . $dipolelink;
- }
- // tank potential
- if ($pp == 0) placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.1F V', -$value), 150, 5, $color, $text, $link);
- // IE common and dipoles
- else if ($pp == 1 || $pp == 2 || $pp == 3) placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.2F V', -$value), 150, 5, $color, $text, $link);
- // APE
- else if ($pp == 4 || $pp == 5)
- {
- if ($adeiValue[10][2*$pp] > 10.0) { placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp] , sprintf('%.1F', $value), 70, 4, $color, $text, $link); }
- }
- }
- // PS voltages (add $pp < 10 for PS IE )
- for ($pp = 7; $pp < 10; $pp++) // PS tank (channel 7 = array entry 14 + 15), IE west (8), IE east (9)
- {
- // color
- if ( ($adeiValue[10][2*$pp] > $adeiValue[10][2*$pp + 1] - $tolA[$pp]) && ($adeiValue[10][2*$pp] < $adeiValue[10][2*$pp + 1] + $tolA[$pp]) )
- $color = "#000000";
- else
- $color = "#FF0000";
- // show voltage
- $value = $adeiValue[10][2*$pp];
- $link = $adeiChannel[10][2*$pp];
- if ($pp == 7) { $text = "absolute ps tank potential"; }
- else if ($pp == 8) { $text = "relative voltage potential PS IE west"; $color = "#505050";}
- else if ($pp == 9) { $text = "relative voltage potential PS IE west"; $color = "#505050";}
- placeTextWithLink($ringsPosY[$pp], $ringsPosX[$pp], sprintf('%.1F V', -$value), 150, 5, $color, $text, $link);
- }
- /*
- // voltage test
- $tol = 5.0;
- for ($pp = 0; $pp < 3; $pp++)
- {
- if ($pp == 0) $idMax = 2;
- else $idMax = 11;
- for ($id = 0; $id < $idMax; $id++)
- {
- if ( ($adeiValue[10 + $pp][$id] > $adeiValue[10 + $pp][$id + $idMax] - $tol) && ($adeiValue[10 + $pp][$id] < $adeiValue[10 + $pp][$id + $idMax] + $tol) )
- $adeiColor[10 + $pp][$id] = "#000000";
- else
- $adeiColor[10 + $pp][$id] = "#FF0000";
- }
- }
- // voltages
- placeTextWithLink(103, 805, sprintf('%.1F', -$adeiValue[10][0] - $adeiValue[10][1]) . " V", 150, 5, $adeiColor[10][1], "absolute IE potential", $adeiChannel[10][1]); // IE
- placeTextWithLink(53, 805, sprintf('%.1F', -$adeiValue[10][0]) . " V", 150, 5, $adeiColor[10][0], "absolute tank potential", $adeiChannel[10][0]); // tank
- placeTextWithLink(120, 590, "+" . sprintf('%.1F', $adeiValue[11][4]), 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6", $adeiChannel[11][4]); // w6
- placeTextWithLink(490, 590, "+" . sprintf('%.1F', $adeiValue[12][4]), 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6", $adeiChannel[12][4]); // e6
- placeTextWithLink(120, 1100, "+" . sprintf('%.1F', $adeiValue[11][6]), 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12", $adeiChannel[11][6]); // w12
- placeTextWithLink(490, 1100, "+" . sprintf('%.1F', $adeiValue[12][6]), 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12", $adeiChannel[12][6]); // e12
- placeTextWithLink(155, 506, "+" . sprintf('%.1F', $adeiValue[11][3]), 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5
- placeTextWithLink(455, 506, "+" . sprintf('%.1F', $adeiValue[12][3]), 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5
- placeTextWithLink(155, 1184, "+" . sprintf('%.1F', $adeiValue[11][7]), 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13
- placeTextWithLink(455, 1184, "+" . sprintf('%.1F', $adeiValue[12][7]), 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13
- placeTextWithLink(188, 424, "+" . sprintf('%.1F', $adeiValue[11][2]), 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4
- placeTextWithLink(422, 424, "+" . sprintf('%.1F', $adeiValue[12][2]), 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4
- placeTextWithLink(188, 1266, "+" . sprintf('%.1F', $adeiValue[11][8]), 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14
- placeTextWithLink(422, 1266, "+" . sprintf('%.1F', $adeiValue[12][8]), 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14
- placeTextWithLink(225, 385, "+" . sprintf('%.1F', $adeiValue[11][1]), 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3
- placeTextWithLink(385, 385, "+" . sprintf('%.1F', $adeiValue[12][1]), 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3
- placeTextWithLink(225, 1305, "+" . sprintf('%.1F', $adeiValue[11][9]), 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15
- placeTextWithLink(385, 1305, "+" . sprintf('%.1F', $adeiValue[12][9]), 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15
- placeTextWithLink(275, 350, "+" . sprintf('%.1F', $adeiValue[11][0]), 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2
- placeTextWithLink(335, 350, "+" . sprintf('%.1F', $adeiValue[12][0]), 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2
- placeTextWithLink(275, 1340, "+" . sprintf('%.1F', $adeiValue[11][10]), 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16
- placeTextWithLink(335, 1340, "+" . sprintf('%.1F', $adeiValue[12][10]), 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16
- $posY = 16; // offset between outer and inner voltages
- placeTextWithLink(126, 600, "+200.0", 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6-outer", $adeiChannel[11][4]); // w6o
- placeTextWithLink(487, 600, "+200.0", 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6-outer", $adeiChannel[12][4]); // e6o
- placeTextWithLink(126, 1090, "+200.0", 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12-outer", $adeiChannel[11][6]); // w12o
- placeTextWithLink(487, 1090, "+200.0", 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12-outer", $adeiChannel[12][6]); // e12o
- placeTextWithLink(126+$posY, 600, "+200.0", 70, 4, $adeiColor[11][4], "relative voltage offset ring west-6", $adeiChannel[11][4]); // w6i
- placeTextWithLink(487-$posY, 600, "+200.0", 70, 4, $adeiColor[12][4], "relative voltage offset ring east-6", $adeiChannel[12][4]); // e6i
- placeTextWithLink(126+$posY, 1090, "+200.0", 70, 4, $adeiColor[11][6], "relative voltage offset ring west-12", $adeiChannel[11][6]); // w12i
- placeTextWithLink(487-$posY, 1090, "+200.0", 70, 4, $adeiColor[12][6], "relative voltage offset ring east-12", $adeiChannel[12][6]); // e12i
- placeTextWithLink(161, 516, "+200.0", 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5o
- placeTextWithLink(452, 516, "+200.0", 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5o
- placeTextWithLink(161, 1174, "+200.0", 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13o
- placeTextWithLink(452, 1174, "+200.0", 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13o
- placeTextWithLink(161+$posY, 516, "+200.0", 70, 4, $adeiColor[11][3], "relative voltage offset ring west-5", $adeiChannel[11][3]); // w5i
- placeTextWithLink(452-$posY, 516, "+200.0", 70, 4, $adeiColor[12][3], "relative voltage offset ring east-5", $adeiChannel[12][3]); // e5i
- placeTextWithLink(161+$posY, 1174, "+200.0", 70, 4, $adeiColor[11][7], "relative voltage offset ring west-13", $adeiChannel[11][7]); // w13i
- placeTextWithLink(452-$posY, 1174, "+200.0", 70, 4, $adeiColor[12][7], "relative voltage offset ring east-13", $adeiChannel[12][7]); // e13i
- placeTextWithLink(194, 434, "+200.0", 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4o
- placeTextWithLink(419, 434, "+200.0", 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4o
- placeTextWithLink(194, 1256, "+200.0", 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14o
- placeTextWithLink(419, 1256, "+200.0", 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14o
- placeTextWithLink(194+$posY, 434, "+200.0", 70, 4, $adeiColor[11][2], "relative voltage offset ring west-4", $adeiChannel[11][2]); // w4i
- placeTextWithLink(419-$posY, 434, "+200.0", 70, 4, $adeiColor[12][2], "relative voltage offset ring east-4", $adeiChannel[12][2]); // e4i
- placeTextWithLink(194+$posY, 1256, "+200.0", 70, 4, $adeiColor[11][8], "relative voltage offset ring west-14", $adeiChannel[11][8]); // w14i
- placeTextWithLink(419-$posY, 1256, "+200.0", 70, 4, $adeiColor[12][8], "relative voltage offset ring east-14", $adeiChannel[12][8]); // e14i
- placeTextWithLink(225, 385, "+200.0", 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3o
- placeTextWithLink(388, 385, "+200.0", 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3o
- placeTextWithLink(225, 1305, "+200.0", 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15o
- placeTextWithLink(388, 1305, "+200.0", 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15o
- placeTextWithLink(225+$posY, 385, "+200.0", 70, 4, $adeiColor[11][1], "relative voltage offset ring west-3", $adeiChannel[11][1]); // w3i
- placeTextWithLink(388-$posY, 385, "+200.0", 70, 4, $adeiColor[12][1], "relative voltage offset ring east-3", $adeiChannel[12][1]); // e3i
- placeTextWithLink(225+$posY, 1305, "+200.0", 70, 4, $adeiColor[11][9], "relative voltage offset ring west-15", $adeiChannel[11][9]); // w15i
- placeTextWithLink(388-$posY, 1305, "+200.0", 70, 4, $adeiColor[12][9], "relative voltage offset ring east-15", $adeiChannel[12][9]); // e15i
- placeTextWithLink(273, 352, "+200.0", 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2o
- placeTextWithLink(340, 352, "+200.0", 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2o
- placeTextWithLink(273, 1338, "+200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16o
- placeTextWithLink(340, 1338, "+200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16o
- placeTextWithLink(273+$posY, 352, "+200.0", 70, 4, $adeiColor[11][0], "relative voltage offset ring west-2", $adeiChannel[11][0]); // w2i
- placeTextWithLink(340-$posY, 352, "+200.0", 70, 4, $adeiColor[12][0], "relative voltage offset ring east-2", $adeiChannel[12][0]); // e2i
- placeTextWithLink(273+$posY, 1338, "+200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // w16i
- placeTextWithLink(340-$posY, 1338, "+200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // e16i
- placeTextWithLink(306, 319, "-200.0", 70, 4, $adeiColor[12][10], "relative voltage offset ring east-16", $adeiChannel[12][10]); // apes
- placeTextWithLink(306, 1371, "-200.0", 70, 4, $adeiColor[11][10], "relative voltage offset ring west-16", $adeiChannel[11][10]); // apen
- */
- // ########## DETECTOR ##########
- // detector powered
- $lowVoltage = array( 12, 8, 6, 6, 120 );
- $link = "";
- $pic = "fpdOn";
- $text = "ON";
- for ($id = 0; $id < 5; $id++)
- {
- $value = $adeiValue[6][4 + $id];
- if (!($value < $lowVoltage[$id] + 0.2 && $value > $lowVoltage[$id] - 0.2))
- {
- $pic = "fpdOff";
- $text = "OFF";
- }
- $link = $link . $adeiChannel[6][4 + $id] . ",";
- }
- $link = substr($link, 0, strlen($link) - 1);
- placePicWithLink(200, 1600, $pic . ".png", 30, "status FPD power green: on, red: off, grey: undefined", $link);
- placeTextWithLink(227, 1580, $text, 70, 4, "#000000", "status FPD power", $link);
- // carousel
- $value = $adeiValue[6][11];
- $color = "#000000";
- if ($value < -95) $value = "---";
- else $value = sprintf('%.0F', $adeiValue[6][11]) . " °C";
- placeTextWithLink(255, 1565, $value, 100, 4, $color, "temperature FPD carousel/electronics", $adeiChannel[6][11]);
- placeText(275, 1565, "carousel", 100, 2, "#000000");
- // ########## MAGNETOMETERS ##########
- $mag = array(4, 6, 4);
- for ($pp = 0; $pp < 3; $pp++)
- {
- $bx = 0;
- $by = 0;
- $bz = 0;
- $link = "";
- for ($id = 0; $id < $mag[$pp]; $id++)
- {
- $bx = $bx + $adeiValue[16 + $pp][3 * $id];
- $by = $by + $adeiValue[16 + $pp][3 * $id + 1];
- $bz = $bz + $adeiValue[16 + $pp][3 * $id + 2];
- $link = $link . $adeiChannel[16 + $pp][3 * $id + 2] . ",";
- //echo $bx . " " . $by . " " . $bz . "<br>";
- }
- $bx = $bx / $mag[$pp];
- $by = $by / $mag[$pp];
- $bz = $bz / $mag[$pp];
- $link = substr($link, 0, strlen($link) - 1);
- $value = sqrt($bx * $bx + $by * $by + $bz * $bz);
-
- $text = "averaged field precise magnetometers ";
- if ($pp == 0) $text = $text . "north ";
- else if ($pp == 1) $text = $text . "middle ";
- else if ($pp == 2) $text = $text . "south ";
- $text = $text . "ring";
- placeTextWithLink(553, 1015 - 170 * $pp, sprintf('%.1F G', $value), 70, 5, "#000000", $text, $link);
- }
- // dipole
- $pic = "status";
- if ($pulserId[0] == "dipole" && $daqElapsed[0] > 30)
- {
- if ($pulserCounts[0] > 0) $pic = $pic . "On";
- else if ($pulserCounts[0] == 0) $pic = $pic . "Off";
- }
- //placePic($posY + 34 + 25, $posX + 80, $pic . ".png", 17, "status dipole sync pulser green: on, red: off, grey: undefined");
- // egun
- $pic = "status";
- if ($pulserId[1] == "egun" && $daqElapsed[0] > 30)
- {
- if ($pulserCounts[1] > 0) $pic = $pic . "On";
- else if ($pulserCounts[1] == 0) $pic = $pic . "Off";
- }
- //placePic($posY + 34 + 50, $posX + 80, $pic . ".png", 17, "status egun sync pulser green: on, red: off, grey: undefined");
- // muon
- // $pic = "status";
- // if ($pulserId[3] == "muon" && $daqElapsed[0] > 30)
- // {
- // if ($pulserCounts[3] > 0) $pic = $pic . "On";
- // else if ($pulserCounts[3] == 0) $pic = $pic . "Off";
- // }
- // placePic($posY + 34 + 75, $posX + 80, $pic . ".png", 17, "status muon sync pulser green: on, red: off, grey: undefined");
- // ########## HALL ##########
- placePicWithLink(-30-3, 1800, "newTemperature.png", 23, "temperature in KATRIN hall", $adeiChannel[19][1]);
- placeTextWithLink(-30-3, 1820, sprintf('%.1F °C', $adeiValue[19][1]), 80, 4, "#000000", "temperature in KATRIN hall", $adeiChannel[19][1]);
- placePicWithLink(-2-3, 1800, "newPressure.png", 23, "atmospheric pressure in KATRIN hall", $adeiChannel[19][0]);
- 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]);
- //placeTextWithLink(-2-3, 1820, sprintf('%.3F bar', $adeiValue[19][0] * 0.0689475729), 80, 4, "#000000", "atmospheric pressure in KATRIN hall", $adeiChannel[19][0]);
- placePicWithLink(26-3, 1800, "newHumidity.png", 23, "relative humidity in KATRIN hall", $adeiChannel[19][2]);
- placeTextWithLink(26-3, 1820, sprintf('%.1F %', $adeiValue[19][2]), 80, 4, "#000000", "relative humidity in KATRIN hall", $adeiChannel[19][2]);
- // ########## HIGH PRESSURE ##########
- if (getValveStatus($adeiValue[9][6]) == -1 && getValveStatus($adeiValue[9][7]) == 1 && getValveStatus($adeiValue[9][8]) == 1 && getValveStatus($adeiValue[9][9]) == 0)
- {
- $pic = "bottleBlinking.gif";
- $text = "ON";
- $color = "#000000";
- if ($adeiValue[9][4] != 64) $color = "#FF0000";
- placeTextWithLink(135, 1387, sprintf('%.1F %', $adeiValue[9][5]), 70, 4, $color, "gas flow leak valve", $adeiChannel[9][5]);
- placeTextWithLink(160, 1387, sprintf('%.1E', $adeiValue[9][3]), 70, 4, $color, "pressure [mbar] MKS Baratron", $adeiChannel[9][3]);
- }
- else
- {
- if (getValveStatus($adeiValue[9][7]) == 1)
- {
- $pic = "bottleOn.png";
- $text = "OPEN";
- }
- else
- {
- $pic = "bottleOn.png";
- $text = "OFF";
- }
- }
- $link = $adeiChannel[9][3] . "," . $adeiChannel[9][4] . "," . $adeiChannel[9][5] . "," . $adeiChannel[9][6] . "," . $adeiChannel[9][7] . "," . $adeiChannel[9][8] . "," . $adeiChannel[9][9];
- placePicWithLink(135, 1358, $pic, 48, "status gas injection system green: off, blinking: on, grey: undefined
Should be off for nominal pressure measurements!!!", $link);
- placeTextWithLink(180, 1347, $text, 70, 4, "#000000", "status gas injection system", $link);
- // ########## PS VESSEL TEMPERATURES ##########
- $min = 18;
- $max = 30;
- // mean of 4020, 4030, 4040
- $link = $adeiChannel[29][0] . "," . $adeiChannel[29][1] . "," . $adeiChannel[29][2];
- $value = ($adeiValue[29][0] + $adeiValue[29][1] + $adeiValue[29][2])/3.0;
- $color = "#000000";
- if ($value < $min) $color = "#0026FF";
- else if ($value > $max) $color = "#FF0000";
- if ($value < 400) placeTextWithLink(303, 170, sprintf('%.1F °C', $value), 90, 4, $color, "PS mean temperature of 4020..30..40", $link);
- // ########## MS VESSEL TEMPERATURES ##########
- $min = 14;
- $max = 24;
- // 0066
- $value = $adeiValue[20][0];
- $color = "#000000";
- if ($value < $min) $color = "#0026FF";
- else if ($value > $max) $color = "#FF0000";
- if ($value < 400) placeTextWithLink(110, 933, "T<sub>IE0066</sub> = " . sprintf('%.1F °C', $value), 170, 4, $color, "IE temperature 0066", $adeiChannel[20][0]);
- // 0076
- $value = $adeiValue[20][1];
- $color = "#000000";
- if ($value < $min) $color = "#0026FF";
- else if ($value > $max) $color = "#FF0000";
- if ($value < 400) placeTextWithLink(110+20, 933, "T<sub>IE0076</sub> = " . sprintf('%.1F °C', $value), 170, 4, $color, "IE temperature 0076", $adeiChannel[20][1]);
- // 0270
- $value = $adeiValue[20][2];
- $color = "#000000";
- if ($value < $min) $color = "#0026FF";
- else if ($value > $max) $color = "#FF0000";
- if ($value < 400) placeTextWithLink(307, 805, "T<sub>0270</sub> = " . sprintf('%.1F °C', $value), 160, 4, $color, "tank temperature 0270", $adeiChannel[20][2]);
- // 0283
- $value = $adeiValue[20][3];
- $color = "#000000";
- if ($value < $min) $color = "#0026FF";
- else if ($value > $max) $color = "#FF0000";
- if ($value < 400) placeTextWithLink(307, 963, "T<sub>0283</sub> = " . sprintf('%.1F °C', $value), 160, 4, $color, "tank temperature 0283", $adeiChannel[20][3]);
- /*
- // 0066
- $value = $adeiValue[20][0] - $adeiValue[20][4];
- $color = "#000000";
- if ($value < 50) placeTextWithLink(110+16, 973-30, sprintf('(%.2F °C/h)', $value), 130, 4, $color, "IE temperature 0066 (ramp speed)", $adeiChannel[20][0]);
- // 0076
- $value = $adeiValue[20][1] - $adeiValue[20][5];
- $color = "#000000";
- if ($value < 50) placeTextWithLink(126+24+16, 973-30, sprintf('(%.2F °C/h)', $value), 130, 4, $color, "IE temperature 0076 (ramp speed)", $adeiChannel[20][1]);
- // 0270
- $value = $adeiValue[20][2] - $adeiValue[20][6];
- $color = "#000000";
- if ($value < 50) placeTextWithLink(307+16, 845-30, sprintf('(%.2F °C/h)', $value), 130, 4, $color, "tank temperature 0270 (ramp speed)", $adeiChannel[20][2]);
- // 0283
- $value = $adeiValue[20][3] - $adeiValue[20][7];
- $color = "#000000";
- if ($value < 50) placeTextWithLink(307+16, 973-30, sprintf('(%.2F °C/h)', $value), 130, 4, $color, "tank temperature 0283 (ramp speed)", $adeiChannel[20][3]);
- */
- $color = "#000000";
- // ########## 60s counter ##########
- $date= date("Ymdgis");
- if ($onsite) placePic(5, 5, "countdown60.gif?".$date, 100, "60s counter");
- // ########## STS ##########
- placeTextWithWebsiteLink(360, 5, "←STS", 60, 5, $color, "Link to STS Status Overview", "../stsstatus");
- // ########## FPD Status ##########
- placeTextWithWebsiteLink(-10, 1450, "→ FPD Status", 155, 4, $color, "Link to FPD Status Overview", "../fpdstatus");
- // ########## MoS und HV Status ##########
- placeTextWithWebsiteLink(20, 1440, "→ MoS and HV Status", 240, 4, $color, "Link to Monitor Spectrometer and High Voltage Status Overview", "http://ipepc57.ipe.kit.edu:5858/mos/status");
- // ########## Run Summary ##########
- placeTextWithWebsiteLink(50, 1440, "→ Run Summary Page", 240, 4, $color, "Link to Run Summary Page", "http://katana.npl.washington.edu/~sanshiro/kaffee/Krypton/");
- // ########## 10s readout link ##########
- if ($ip == "141.52.12.164") placeTextWithWebsiteLink(80, 1475, "→ Switch to quick refresh", 195, 4, $color, "Link to 10s readout page", "./index_q.php");
- if ($ip == "141.52.16.94") placeTextWithWebsiteLink(80, 1475, "→ Switch to quick refresh", 195, 4, $color, "Link to 10s readout page", "./index_q.php");
- // ########## PS ##########
- // placeText(100, 170, "PS", 60, 30, $color);
- // ########## HIGH VOLTAGE SWITCH ##########
- /*
- $value = $adeiValue[10][4]; // HAS CHANGED!!!!!
- $pic = "switch";
- if ($value == 1) $pic = $pic . "Open";
- else if ($value == 0) $pic = $pic . "Closed";
- placePicWithLink(498, 501, $pic . ".png", 80, "status high-voltage ground switch", $adeiChannel[10][4]);
- */
- ?>
- <!--
- <div style="position:absolute; top:100px; left:100px">
- <canvas id="myCanvas" width="578" height="200"></canvas>
- <script>
- var canvas = document.getElementById('myCanvas');
- var context = canvas.getContext('2d');
- context.beginPath();
- context.moveTo(100, 150);
- context.lineTo(450, 50);
- context.lineTo(250, 250);
- context.stroke();
- </script>
- </div>
- -->
- </div>
- </body>
- </html>
|