123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- <?php
- // ########## SLOW CONTROL CHANNELS ##########
- $adeiChannel = array(
- // DPS Magnets
- array(//0
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__15", // "311-RBY-1-1051",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__18", // "311-RBY-1-1052",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__21", // "311-RBY-1-2051",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__24", // "311-RBY-1-2052",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__27", // "311-RBY-1-3051",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__30", // "311-RBY-1-3052",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__33", // "311-RBY-1-4051",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__36", // "311-RBY-1-4052",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__39", // "311-RBY-1-5051",
- "cscryo__ControlSystem_DPS__310_MAG_Magnetbetrieb__42" // "311-RBY-1-5052"
- ),
- // CPS Magnets
- array(//1
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__0", // "320-RBI-1-1101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__3", // "320-RBI-1-1102"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__6", // "320-RBI-1-2101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__9", // "320-RBI-1-2102"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__12", // "320-RBI-1-3101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__15", // "320-RBI-1-3102"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__18", // "320-RBI-1-4101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__21", // "320-RBI-1-4102"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__24", // "320-RBI-1-5101" ("320-RBI-1-5102" corrupted, not in ADEI anymore)
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__27", // "320-RBI-1-6101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__30", // "320-RBI-1-6102"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__33", // "320-RBI-1-7101"
- "cscps__ControlSystem_CPS__320_MAG_Magnetfeld__36" // "320-RBI-1-7102"
- ),
- // LN2&LHe supply
- array(//2
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_LN__0" // "200-RLI-2-4119" LN2 lev
- ),
- array(//3
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__30", // "200-RLI-2-1119" LHe level
- ),
- array(//4
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_LN__3" // "200-RPI-2-4125" LN2 pressure
- ),
- array(//5
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_SUB_Sicherheit__6" // "200-RPI-2-2144" LHe pressure
- ),
- // DPS1-R beamtube temperature
- array(//6
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__78", // "200-RTP-3-1101" DPS1-R-2
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__84", // "200-RTP-3-1102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__90", // "200-RTP-3-1103"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__96", // "200-RTP-3-1104"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__102", // "200-RTP-3-2101" PP2-R
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_R__108" // "200-RTP-3-2102"
- ),
- array(//7
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__108", // "200-RTP-3-3101" DPS1-R-1
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__114", // "200-RTP-3-3102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__120", // "200-RTP-3-3103"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__126", // "200-RTP-3-3104"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__144", // "200-RTP-3-6101" PP1-R
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_R__147" // "200-RTP-3-6102"
- ),
- // Source beamtube temperature
- array(//8
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__84", // "200-RTP-3-5101", starting at front side for numbering reasons
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__87", // "200-RTP-3-5102",
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__108", // "200-RTP-3-5109"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__111", // "200-RTP-3-5110",
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__114", // "200-RTP-3-5111"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__117", // "200-RTP-3-5112"
- //"cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__120", // "200-RTP-3-5113"
- //"cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__123", // "200-RTP-3-5114"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__126", // "200-RTP-3-5115",
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__129", // "200-RTP-3-5116",
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__150", // "200-RTP-3-5123",
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__153" // "200-RTP-3-5124"
- ),
- // DPS1-F beamtube temperature
- array(//9
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__108", // "200-RTP-3-4101" PP1-F
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__111", // "200-RTP-3-4102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__126", // "200-RTP-3-7101" DPS1-F-1
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__129", // "200-RTP-3-7102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__132", // "200-RTP-3-7103"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP1_F__135" // "200-RTP-3-7104"
- ),
- array(//10
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__78", // "200-RTP-3-8101" PP2-F
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__84", // "200-RTP-3-8102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__96", // "200-RTP-3-9101" DPS1-F-2
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__102", // "200-RTP-3-9102"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__108", // "200-RTP-3-9103"
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_PP2_F__114" // "200-RTP-3-9104"
- ),
- // Isolation vacuum
- array(//11
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_SUB_Vakuum__9", // "200-RPV-4-1110"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_SUB_Vakuum__15" // "200-RPV-4-1160"
- ),
- // Magnet temperature
- array(//12
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__108", // "200-RTT-1-5103" M5
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__93", // "200-RTT-1-4103" M4
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__48", // "200-RTT-1-1103" M1
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__63", // "200-RTT-1-2103" M2
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__78", // "200-RTT-1-3103" M3
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__138", // "200-RTT-1-7103" M7
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__123" // "200-RTT-1-6103" M6
- ),
- // Magnet currents
- array(//13
- "cswgts__ControlSystem_WGTS_Magnet__200_MAG_Stromzufuhr_M1_M4_M5__0" // "200-REI-5-3111"
- ),
- array(//14
- "cswgts__ControlSystem_WGTS_Magnet__200_MAG_Stromzufuhr_M2_M3__0" // "200-REI-5-3211"
- ),
- array(//15
- "cswgts__ControlSystem_WGTS_Magnet__200_MAG_Stromzufuhr_M6_M7__0" // "200-REI-5-3311"
- ),
- // Inner shield (27K)
- array(//16
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__24", // "200-RTP-2-3122"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__21", // "200-RTP-2-3121"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__30", // "200-RTP-2-3124"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__27", // "200-RTP-2-3123"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__45", // "200-RTP-2-3129"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__48", // "200-RTP-2-3130"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__33", // "200-RTP-2-3125"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__36", // "200-RTP-2-3126"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__51", // "200-RTP-2-3131"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__54", // "200-RTP-2-3132"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__57", // "200-RTP-2-3133"
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_27K__60" // "200-RTP-2-3134"
- ),
- // LN2 temperature
- array(//17
- //"cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_LN__87" // "200-RTP-2-4130" LN2 temperature
- "cswgts__ControlSystem_WGTS_Gradient__200_KRY_Kryo_LN__24" // "200-GRA-0-201-Min_Val" LN2 temperature by M. Hackenjos
- ),
- // LHe temperature
- array(//18
- "cswgts__ControlSystem_WGTS_Kryotechnik__200_KRY_Kryo_4K__177" // "200-RTT-2-1114" LHe temperature
- ),
- // M5, M6 magnetic dipoles
- array(//19
- "cstmagnet__ControlSystem_Magnet__800_MAG_MAG_Control__45", // "200-ELV-5-3410", M5 dipole x
- "cstmagnet__ControlSystem_Magnet__800_MAG_MAG_Control__51" // "200-ELV-5-3420", M5 dipole y
- ),
- array(//20
- "cstmagnet__ControlSystem_Magnet__800_MAG_MAG_Control__57", // "200-ELV-5-3430", M6 dipole x
- "cstmagnet__ControlSystem_Magnet__800_MAG_MAG_Control__63" // "200-ELV-5-3440", M6 dipole y
- ),
- // temperature sensors on top of beamtube
- array(//21
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__87", // RTP-3-5102, starting at front side
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__99", // RTP-3-5106
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__105", // RTP-3-5108
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__111", // RTP-3-5110
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__117", // RTP-3-5112
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__123", // RTP-3-5114
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__129", // RTP-3-5116
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__135", // RTP-3-5118
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__141", // RTP-3-5120
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__153" // RTP-3-5124
- ),
- // temperature sensors on bottom of beamtube
- array(//22
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__84", // RTP-3-5101, starting at front side
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__96", // RTP-3-5105
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__102", // RTP-3-5107
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__108", // RTP-3-5109
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__114", // RTP-3-5111
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__120", // RTP-3-5113
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__126", // RTP-3-5115
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__132", // RTP-3-5117
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__138", // RTP-3-5119
- "cswgts__ControlSystem_WGTS_Strahlrohr__200_STR_WGTS__150" // RTP-3-5123
- )
- );
- $username = 'katrin';
- $password = 'neutrino';
- $context = stream_context_create(array(
- 'http' => array(
- 'header' => "Authorization: Basic " . base64_encode("$username:$password"), "Connection: close\r\n"
- )
- ));
-
- 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);
- // adei address changed
- $fileip = file_get_contents("http://adei-katrin.kaas.kit.edu/adei/services/getdata.php?db_server=virtual&db_name=srctree&db_group=-3&control_group=-3&virtual=srctree&srctree=" . $adeiChannels . "&rt=full&window=60,-1&format=csv", false, $context);
- // old adei
- //$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);
- // backup server
- //$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);
- //echo $fileip . "<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 $id . "," . $id2 . "," . $adeiValue[$id][$id2] . "<br>";
- }
- }
- // corresponding KATRIN numbers of sensors
- $KatrinNumber = array(
- // DPS Magnets
- array(//0
- "311-RBY-1-1051",
- "311-RBY-1-1052",
- "311-RBY-1-2051",
- "311-RBY-1-2052",
- "311-RBY-1-3051",
- "311-RBY-1-3052",
- "311-RBY-1-4051",
- "311-RBY-1-4052",
- "311-RBY-1-5051",
- "311-RBY-1-5052"
- ),
- // CPS Magnets
- array(//1
- "320-RBI-1-1101",
- "320-RBI-1-1102",
- "320-RBI-1-2101",
- "320-RBI-1-2102",
- "320-RBI-1-3101",
- "320-RBI-1-3102",
- "320-RBI-1-4101",
- "320-RBI-1-4102",
- "320-RBI-1-5101",
- //"320-RBI-1-5102", // corrupted, not in ADEI anymore
- "320-RBI-1-6101",
- "320-RBI-1-6102",
- "320-RBI-1-7101",
- "320-RBI-1-7102"
- ),
- // LN2&LHe supply
- array(//2
- "200-RLI-2-4119" // LN2 level
- ),
- array(//3
- "200-RLI-2-1119" // LHe level
- ),
- array(//4
- "200-RPI-2-4125" // LN2 pressure
- ),
- array(//5
- "200-RPI-2-2144" // LHe pressure
- ),
- // DPS1-R beamtube temperature
- array(//6
- "200-RTP-3-1101",
- "200-RTP-3-1102",
- "200-RTP-3-1103",
- "200-RTP-3-1104",
- "200-RTP-3-2101",
- "200-RTP-3-2102"
- ),
- array(//7
- "200-RTP-3-3101",
- "200-RTP-3-3102",
- "200-RTP-3-3103",
- "200-RTP-3-3104",
- "200-RTP-3-6101",
- "200-RTP-3-6102"
- ),
- // Source beamtube temperature
- array(//8
- "200-RTP-3-5101",
- "200-RTP-3-5102",
- "200-RTP-3-5109", // extremely unstable
- "200-RTP-3-5110",
- "200-RTP-3-5111",
- "200-RTP-3-5112",
- //"200-RTP-3-5113",
- //"200-RTP-3-5114", // shows 20 K
- "200-RTP-3-5115",
- "200-RTP-3-5116",
- "200-RTP-3-5123",
- "200-RTP-3-5124"
- ),
- // DPS1-F beamtube temperature
- array(//9
- "200-RTP-3-4101",
- "200-RTP-3-4102",
- "200-RTP-3-7101",
- "200-RTP-3-7102",
- "200-RTP-3-7103",
- "200-RTP-3-7104"
- ),
- array(//10
- "200-RTP-3-8101",
- "200-RTP-3-8102",
- "200-RTP-3-9101",
- "200-RTP-3-9102",
- "200-RTP-3-9103",
- "200-RTP-3-9104"
- ),
- // Isolation vacuum
- array(//11
- "200-RPV-4-1110",
- "200-RPV-4-1160"
- ),
- // Magnet temperature
- array(//12
- "200-RTT-1-5103", // M5
- "200-RTT-1-4103", // M4
- "200-RTT-1-1103", // M1
- "200-RTT-1-2103", // M2
- "200-RTT-1-3103", // M3
- "200-RTT-1-7103", // M7
- "200-RTT-1-6103" // M6
- ),
- //Magnet currents
- array(//13
- "200-REI-5-3111" // M5_M4_M1
- ),
- array(//14
- "200-REI-5-3211" // M2_M3
- ),
- array(//15
- "200-REI-5-3311" // M7_M6
- ),
- // Inner shield (27 K)
- array(//16
- "200-RTP-2-3122",
- "200-RTP-2-3121",
- "200-RTP-2-3124",
- "200-RTP-2-3123",
- "200-RTP-2-3129",
- "200-RTP-2-3130",
- "200-RTP-2-3125",
- "200-RTP-2-3126",
- "200-RTP-2-3131",
- "200-RTP-2-3132",
- "200-RTP-2-3133",
- "200-RTP-2-3134"
- ),
- // LN2 temperature
- array(//17
- //"200-RTP-2-4130" // maybe wrong?
- "200-GRA-0-201-Min_Val" // told by M. Hackenjos
- ),
- // LHe temperature
- array(//18
- "200-RTT-2-1114"
- ),
- // M5, M6 magnetic dipoles
- array(//19
- "200-ELV-5-3410", // M5 dipole x
- "200-ELV-5-3420", // M5 dipole y
- ),
- array(//20
- "200-ELV-5-3430", // M6 dipole x
- "200-ELV-5-3440", // M6 dipole y
- ),
- // temperature sensors on top of beamtube
- array(//21
- "200-RTP-3-5102", // starting at front side
- "200-RTP-3-5106", // unstable
- "200-RTP-3-5108",
- "200-RTP-3-5110",
- "200-RTP-3-5112",
- "200-RTP-3-5114",
- "200-RTP-3-5116",
- "200-RTP-3-5118",
- "200-RTP-3-5120",
- "200-RTP-3-5124"
- ),
- // temperature sensors on bottom of beamtube
- array(//22
- "200-RTP-3-5101", // starting at front side
- "200-RTP-3-5105", // shows 20K, lost during cooldown
- "200-RTP-3-5107", // shows 20K, lost during cooldown
- "200-RTP-3-5109", // unstable
- "200-RTP-3-5111",
- "200-RTP-3-5113",
- "200-RTP-3-5115",
- "200-RTP-3-5117",
- "200-RTP-3-5119",
- "200-RTP-3-5123"
- )
- );
- ?>
|