Changeset 15354
- Timestamp:
- 04/16/13 10:24:12 (12 years ago)
- Location:
- trunk/FACT++/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r15293 r15354 119 119 { 120 120 if (!evt.data) 121 {122 this.last_inc = 0;123 121 return; 124 }125 122 126 123 var inc = evt.obj['incomplete']; 127 if (!inc) 128 { 129 this.last_inc = 0; 124 if (!inc || inc>0xffffffffff) 130 125 return; 131 } 132 133 if (this.last_inc==inc) 126 127 if (incomplete>0) 134 128 return; 135 129 130 if (dim.state("MCP").name!="TakingData") 131 return; 132 136 133 incomplete = inc; 137 134 138 var reset = [ ]; 139 140 for (var i=0; i<40; i++) 141 if (inc&(1<<i)) 142 { 143 console.out(" FAD %2d".$(i)+" lost during data taking."); 144 reset.push(parseInt(i/10)); 145 } 146 147 if (reset.length>10) 148 return; 149 150 dim.send("MCP/RESET"); 151 152 reset = reset.filter(function(elem,pos){return reset.indexOf(elem)==pos;}); 153 154 if (reset.length>0) 155 { 156 console.out(""); 157 console.out(" FADs belong to crate(s): "+reset); 158 console.out(""); 159 } 160 161 this.last_inc = inc; 135 console.out("Sending MCP/STOP"); 136 dim.send("MCP/STOP"); 162 137 } 163 138 … … 241 216 startrun.get(5000); 242 217 218 function reconnect(list, txt) 219 { /* 220 var reset = [ ]; 221 222 for (var i=0; i<list.length; i++) 223 { 224 console.out(" FAD %2d".$(list[i])+" lost during "+txt); 225 reset.push(parseInt(list[i]/10)); 226 } 227 228 reset = reset.filter(function(elem,pos){return reset.indexOf(elem)==pos;}); 229 230 console.out(""); 231 console.out(" FADs belong to crate(s): "+reset); 232 console.out(""); 233 */ 234 console.out(""); 235 console.out("Trying automatic reconnect ["+txt+"]..."); 236 237 for (var i=0; i<list.length; i++) 238 { 239 console.out(" ...disconnect "+list[i]); 240 dim.send("FAD_CONTROL/DISCONNECT", list[i]); 241 } 242 243 console.out(" ...waiting for 5s"); 244 v8.sleep(5000); 245 246 for (var i=0; i<list.length; i++) 247 { 248 console.out(" ...reconnect "+list[i]); 249 dim.send("FAD_CONTROL/CONNECT", list[i]); 250 } 251 252 console.out(" ...waiting for 1s"); 253 v8.sleep(1000); 254 console.out(""); 255 } 256 243 257 function takeRun(type, count, time) 244 258 { … … 251 265 console.out(" Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+type+"]"); 252 266 267 incomplete = 0; 253 268 dim.send("MCP/START", time?time:-1, count?count:-1, type); 254 269 … … 291 306 292 307 // Here we could check and handle fad losses 308 293 309 try 294 310 { … … 320 336 dim.wait("MCP", "Idle", 3000); 321 337 338 /*** FOR REMOVE ***/ 322 339 var reset = [ ]; 323 340 … … 337 354 console.out(""); 338 355 } 339 340 console.out(""); 341 console.out("Trying automatic reconnect..."); 342 356 /**** FOR REMOVE ****/ 357 358 var list = []; 343 359 for (var i=0; i<40; i++) 344 360 if (stat[i]!=0x43) 345 { 346 console.out(" ...disconnect "+i); 347 dim.send("FAD_CONTROL/DISCONNECT", i); 348 } 349 350 console.out(" ...waiting for 5s"); 351 v8.sleep(5000); 352 353 for (var i=0; i<40; i++) 354 if (stat[i]!=0x43) 355 { 356 console.out(" ...reconnect "+i); 357 dim.send("FAD_CONTROL/CONNECT", i); 358 } 359 360 console.out(" ...waiting for 1s"); 361 v8.sleep(1000); 361 list.push(i); 362 363 reconnect(list, "configuration"); 364 365 throw e; 366 } 367 368 dim.wait("MCP", "Idle", time>0 ? time*1250 : undefined); // run time plus 25% 369 370 if (incomplete) 371 { 372 console.out("Incomplete: "+incomplete); 373 362 374 console.out(""); 363 364 throw e; 365 } 366 367 dim.wait("MCP", "Idle", time>0 ? time*1250 : undefined); // run time plus 25% 368 369 console.out("debug: "+incomplete); 370 371 if (incomplete) 372 { 375 console.out("MCP: "+dim.state("MCP").name); 376 console.out("FAD_CONTROL: "+dim.state("FAD_CONTROL").name); 377 console.out("FTM_CONTROL: "+dim.state("FTM_CONTROL").name); 373 378 console.out(""); 374 console.out("Trying automatic reconnect..."); 375 379 380 dim.wait("MCP", "Idle", 3000); 381 dim.wait("FTM_CONTROL", "Idle", 3000); 382 383 // Necessary to allow the disconnect, reconnect 384 dim.send("FAD_CONTROL/CLOSE_OPEN_FILES"); 385 dim.wait("FAD_CONTROL", "Connected", 3000); 386 387 var list = []; 376 388 for (var i=0; i<40; i++) 377 389 if (incomplete&(1<<i)) 378 { 379 console.out(" ...disconnect "+i); 380 dim.send("FAD_CONTROL/DISCONNECT", i); 381 } 382 383 console.out(" ...waiting for 5s"); 384 v8.sleep(5000); 385 386 for (var i=0; i<40; i++) 387 if (incomplete&(1<<i)) 388 { 389 console.out(" ...reconnect "+i); 390 dim.send("FAD_CONTROL/CONNECT", i); 391 } 392 393 console.out(" ...waiting for 1s"); 394 v8.sleep(1000); 395 console.out(""); 396 397 incomplete = 0; 390 list.push(i); 391 392 reconnect(list, "data taking"); 398 393 399 394 throw new Error("In-run FAD loss detected."); … … 425 420 if (!takeRun("drs-pedestal", 1000)) // 40 / 20s (50Hz) 426 421 continue; 422 423 // Does that fix the runopen before runclose problem? 424 //dim.wait("FAD_CONTROL", "Connected", 3000); 425 //v8.sleep(1000); 426 427 427 if (!takeRun("drs-gain", 1000)) // 40 / 20s (50Hz) 428 428 continue; 429 430 // Does that fix the runopen before runclose problem? 431 //dim.wait("FAD_CONTROL", "Connected", 3000); 432 //v8.sleep(1000); 433 429 434 if (!takeRun("drs-pedestal", 1000)) // 40 / 20s (50Hz) 430 435 continue; … … 513 518 514 519 this.voltageStep = null; 515 if (!evt. obj)520 if (!evt.data) 516 521 return; 517 522 … … 726 731 727 732 // ================================================================ 733 // Check datalogger subscriptions 734 // ================================================================ 735 736 var datalogger_subscriptions = new Subscription("DATA_LOGGER/SUBSCRIPTIONS"); 737 datalogger_subscriptions.get(3000, false); 738 739 datalogger_subscriptions.check = function() 740 { 741 var obj = this.get(); 742 if (!obj.data) 743 throw new Error("DATA_LOGGER/SUBSCRIPTIONS not available."); 744 745 var expected = 746 [ 747 "BIAS_CONTROL/CURRENT", 748 "BIAS_CONTROL/DAC", 749 "BIAS_CONTROL/NOMINAL", 750 "BIAS_CONTROL/VOLTAGE", 751 "DRIVE_CONTROL/POINTING_POSITION", 752 "DRIVE_CONTROL/SOURCE_POSITION", 753 "DRIVE_CONTROL/STATUS", 754 "DRIVE_CONTROL/TRACKING_POSITION", 755 "FAD_CONTROL/CONNECTIONS", 756 "FAD_CONTROL/DAC", 757 "FAD_CONTROL/DNA", 758 "FAD_CONTROL/DRS_RUNS", 759 "FAD_CONTROL/EVENTS", 760 "FAD_CONTROL/FEEDBACK_DATA", 761 "FAD_CONTROL/FILE_FORMAT", 762 "FAD_CONTROL/FIRMWARE_VERSION", 763 "FAD_CONTROL/INCOMPLETE", 764 "FAD_CONTROL/PRESCALER", 765 "FAD_CONTROL/REFERENCE_CLOCK", 766 "FAD_CONTROL/REGION_OF_INTEREST", 767 "FAD_CONTROL/RUNS", 768 "FAD_CONTROL/RUN_NUMBER", 769 "FAD_CONTROL/START_RUN", 770 "FAD_CONTROL/STATISTICS1", 771 "FAD_CONTROL/STATISTICS2", 772 "FAD_CONTROL/STATS", 773 "FAD_CONTROL/STATUS", 774 "FAD_CONTROL/TEMPERATURE", 775 "FEEDBACK/CALIBRATED_CURRENTS", 776 "FEEDBACK/CALIBRATION", 777 "FEEDBACK/DEVIATION", 778 "FEEDBACK/REFERENCE", 779 "FSC_CONTROL/CURRENT", 780 "FSC_CONTROL/HUMIDITY", 781 "FSC_CONTROL/TEMPERATURE", 782 "FSC_CONTROL/VOLTAGE", 783 "FTM_CONTROL/COUNTER", 784 "FTM_CONTROL/DYNAMIC_DATA", 785 "FTM_CONTROL/ERROR", 786 "FTM_CONTROL/FTU_LIST", 787 "FTM_CONTROL/PASSPORT", 788 "FTM_CONTROL/STATIC_DATA", 789 "FTM_CONTROL/TRIGGER_RATES", 790 "LID_CONTROL/DATA", 791 "MAGIC_LIDAR/DATA", 792 "MAGIC_WEATHER/DATA", 793 "MCP/CONFIGURATION", 794 "PWR_CONTROL/DATA", 795 "RATE_CONTROL/THRESHOLD", 796 "RATE_SCAN/DATA", 797 "RATE_SCAN/PROCESS_DATA", 798 "TEMPERATURE/DATA", 799 "TIME_CHECK/OFFSET", 800 "TNG_WEATHER/DATA", 801 "TNG_WEATHER/DUST", 802 ]; 803 804 function map(entry) 805 { 806 if (entry.length==0) 807 return undefined; 808 809 var rc = entry.split(','); 810 if (rc.length!=2) 811 throw new Error("Subscription list entry '"+entry+"' has wrong number of elements."); 812 return rc; 813 } 814 815 var list = obj.data.split('\n').map(map); 816 817 function check(name) 818 { 819 if (list.every(function(el){return el[0]!=name;})) 820 throw new Error("Subscription to '"+name+"' not available."); 821 } 822 823 expected.forEach(check); 824 } 825 826 827 828 // ================================================================ 728 829 // Crosscheck all states 729 830 // ================================================================ … … 835 936 if (!was_up && sun.isUp) 836 937 { 837 console.out(" Sun rise detected.... automatic shutdown initiated!");938 console.out("", "Sun rise detected.... automatic shutdown initiated!"); 838 939 // FIXME: State check? 839 940 Shutdown(); … … 887 988 } 888 989 990 if (system_on===false && task!="STARTUP") 991 { 992 v8.sleep(1000); 993 continue; 994 } 995 889 996 // Check if sun is still up... only DATA and RATESCAN must be suppressed 890 997 if ((obs[sub].task=="DATA" || obs[sub].task=="RATESCAN") && sun.isUp) … … 897 1004 } 898 1005 899 if (system_on===false && task!="STARTUP") 900 { 901 v8.sleep(1000); 902 continue; 903 } 1006 console.out("\n"+(new Date()).toUTCString()+": Current measurement: "+obs[sub]); 904 1007 905 1008 var power_states = sun.isUp || system_on===false ? [ "DriveOff" ] : [ "SystemOn" ]; 906 907 var drive_states = sun.isUp || system_on===false ? [ ] : [ "Armed", "Tracking", "OnTrack" ]; 1009 var drive_states = sun.isUp || system_on===false ? undefined : [ "Armed", "Tracking", "OnTrack" ]; 908 1010 909 1011 // A scheduled task was found, lets check if all servers are … … 917 1019 [ "CHAT" ], 918 1020 [ "SMART_FACT" ], 1021 [ "TEMPERATURE" ], 919 1022 [ "DATA_LOGGER", [ "NightlyFileOpen", "WaitForRun", "Logging" ] ], 920 1023 [ "FSC_CONTROL", [ "Connected" ] ], … … 922 1025 [ "TIME_CHECK", [ "Valid" ] ], 923 1026 [ "PWR_CONTROL", power_states/*[ "SystemOn" ]*/ ], 924 [ "AGILENT_CONTROL", [ "VoltageOn" ] ],1027 // [ "AGILENT_CONTROL", [ "VoltageOn" ] ], 925 1028 [ "BIAS_CONTROL", [ "VoltageOff", "VoltageOn", "Ramping" ] ], 926 1029 [ "FEEDBACK", [ "CurrentControl", "CurrentCtrlIdle" ] ], … … 941 1044 } 942 1045 943 console.out("\n"+(new Date()).toUTCString()+": Current measurement: "+obs[sub]);1046 datalogger_subscriptions.check(); 944 1047 945 1048 // Check if obs.task is one of the one-time-tasks -
trunk/FACT++/scripts/MainClassic.js
r15290 r15354 102 102 { 103 103 if (!evt.data) 104 {105 this.last_inc = 0;106 104 return; 107 }108 105 109 106 var inc = evt.obj['incomplete']; 110 if (!inc) 111 { 112 this.last_inc = 0; 107 if (!inc || inc>0xffffffffff) 113 108 return; 114 } 115 116 if (this.last_inc==inc) 109 110 if (incomplete>0) 117 111 return; 118 112 113 if (dim.state("MCP").name!="TakingData") 114 return; 115 119 116 incomplete = inc; 120 117 121 var reset = [ ]; 122 123 for (var i=0; i<40; i++) 124 if (inc&(1<<i)) 125 { 126 console.out(" FAD %2d".$(i)+" lost during data taking."); 127 reset.push(parseInt(i/10)); 128 } 129 130 if (reset.length>10) 131 return; 132 133 dim.send("MCP/RESET"); 134 135 reset = reset.filter(function(elem,pos){return reset.indexOf(elem)==pos;}); 136 137 if (reset.length>0) 138 { 139 console.out(""); 140 console.out(" FADs belong to crate(s): "+reset); 141 console.out(""); 142 } 143 144 this.last_inc = inc; 118 console.out("Sending MCP/STOP"); 119 dim.send("MCP/STOP"); 145 120 } 146 121 … … 224 199 startrun.get(5000); 225 200 201 function reconnect(list, txt) 202 { /* 203 var reset = [ ]; 204 205 for (var i=0; i<list.length; i++) 206 { 207 console.out(" FAD %2d".$(list[i])+" lost during "+txt); 208 reset.push(parseInt(list[i]/10)); 209 } 210 211 reset = reset.filter(function(elem,pos){return reset.indexOf(elem)==pos;}); 212 213 console.out(""); 214 console.out(" FADs belong to crate(s): "+reset); 215 console.out(""); 216 */ 217 console.out(""); 218 console.out("Trying automatic reconnect ["+txt+"]..."); 219 220 for (var i=0; i<list.length; i++) 221 { 222 console.out(" ...disconnect "+list[i]); 223 dim.send("FAD_CONTROL/DISCONNECT", list[i]); 224 } 225 226 console.out(" ...waiting for 5s"); 227 v8.sleep(5000); 228 229 for (var i=0; i<list.length; i++) 230 { 231 console.out(" ...reconnect "+list[i]); 232 dim.send("FAD_CONTROL/CONNECT", list[i]); 233 } 234 235 console.out(" ...waiting for 1s"); 236 v8.sleep(1000); 237 console.out(""); 238 } 239 226 240 function takeRun(type, count, time) 227 241 { … … 234 248 console.out(" Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+type+"]"); 235 249 250 incomplete = 0; 236 251 dim.send("MCP/START", time?time:-1, count?count:-1, type); 237 252 … … 274 289 275 290 // Here we could check and handle fad losses 291 276 292 try 277 293 { … … 303 319 dim.wait("MCP", "Idle", 3000); 304 320 321 /*** FOR REMOVE ***/ 305 322 var reset = [ ]; 306 323 … … 320 337 console.out(""); 321 338 } 322 323 console.out(""); 324 console.out("Trying automatic reconnect..."); 325 339 /**** FOR REMOVE ****/ 340 341 var list = []; 326 342 for (var i=0; i<40; i++) 327 343 if (stat[i]!=0x43) 328 { 329 console.out(" ...disconnect "+i); 330 dim.send("FAD_CONTROL/DISCONNECT", i); 331 } 332 333 console.out(" ...waiting for 5s"); 334 v8.sleep(5000); 335 336 for (var i=0; i<40; i++) 337 if (stat[i]!=0x43) 338 { 339 console.out(" ...reconnect "+i); 340 dim.send("FAD_CONTROL/CONNECT", i); 341 } 342 343 console.out(" ...waiting for 1s"); 344 v8.sleep(1000); 344 list.push(i); 345 346 reconnect(list, "configuration"); 347 348 throw e; 349 } 350 351 dim.wait("MCP", "Idle", time>0 ? time*1250 : undefined); // run time plus 25% 352 353 if (incomplete) 354 { 355 console.out("Incomplete: "+incomplete); 356 345 357 console.out(""); 346 347 throw e; 348 } 349 350 dim.wait("MCP", "Idle", time>0 ? time*1250 : undefined); // run time plus 25% 351 352 if (incomplete) 353 { 358 console.out("MCP: "+dim.state("MCP").name); 359 console.out("FAD_CONTROL: "+dim.state("FAD_CONTROL").name); 360 console.out("FTM_CONTROL: "+dim.state("FTM_CONTROL").name); 354 361 console.out(""); 355 console.out("Trying automatic reconnect..."); 356 362 363 dim.wait("MCP", "Idle", 3000); 364 dim.wait("FTM_CONTROL", "Idle", 3000); 365 366 // Necessary to allow the disconnect, reconnect 367 dim.send("FAD_CONTROL/CLOSE_OPEN_FILES"); 368 dim.wait("FAD_CONTROL", "Connected", 3000); 369 370 var list = []; 357 371 for (var i=0; i<40; i++) 358 372 if (incomplete&(1<<i)) 359 { 360 console.out(" ...disconnect "+i); 361 dim.send("FAD_CONTROL/DISCONNECT", i); 362 } 363 364 console.out(" ...waiting for 5s"); 365 v8.sleep(5000); 366 367 for (var i=0; i<40; i++) 368 if (incomplete&(1<<i)) 369 { 370 console.out(" ...reconnect "+i); 371 dim.send("FAD_CONTROL/CONNECT", i); 372 } 373 374 console.out(" ...waiting for 1s"); 375 v8.sleep(1000); 376 console.out(""); 377 378 incomplete = 0; 373 list.push(i); 374 375 reconnect(list, "data taking"); 379 376 380 377 throw new Error("In-run FAD loss detected."); … … 406 403 if (!takeRun("drs-pedestal", 1000)) // 40 / 20s (50Hz) 407 404 continue; 405 406 // Does that fix the runopen before runclose problem? 407 //dim.wait("FAD_CONTROL", "Connected", 3000); 408 //v8.sleep(1000); 409 408 410 if (!takeRun("drs-gain", 1000)) // 40 / 20s (50Hz) 409 411 continue; 412 413 // Does that fix the runopen before runclose problem? 414 //dim.wait("FAD_CONTROL", "Connected", 3000); 415 //v8.sleep(1000); 416 410 417 if (!takeRun("drs-pedestal", 1000)) // 40 / 20s (50Hz) 411 418 continue; … … 494 501 495 502 this.voltageStep = null; 496 if (!evt. obj)503 if (!evt.data) 497 504 return; 498 505 … … 707 714 708 715 // ================================================================ 716 // Check datalogger subscriptions 717 // ================================================================ 718 719 var datalogger_subscriptions = new Subscription("DATA_LOGGER/SUBSCRIPTIONS"); 720 datalogger_subscriptions.get(3000, false); 721 722 datalogger_subscriptions.check = function() 723 { 724 var obj = this.get(); 725 if (!obj.data) 726 throw new Error("DATA_LOGGER/SUBSCRIPTIONS not available."); 727 728 var expected = 729 [ 730 "BIAS_CONTROL/CURRENT", 731 "BIAS_CONTROL/DAC", 732 "BIAS_CONTROL/NOMINAL", 733 "BIAS_CONTROL/VOLTAGE", 734 "DRIVE_CONTROL/POINTING_POSITION", 735 "DRIVE_CONTROL/SOURCE_POSITION", 736 "DRIVE_CONTROL/STATUS", 737 "DRIVE_CONTROL/TRACKING_POSITION", 738 "FAD_CONTROL/CONNECTIONS", 739 "FAD_CONTROL/DAC", 740 "FAD_CONTROL/DNA", 741 "FAD_CONTROL/DRS_RUNS", 742 "FAD_CONTROL/EVENTS", 743 "FAD_CONTROL/FEEDBACK_DATA", 744 "FAD_CONTROL/FILE_FORMAT", 745 "FAD_CONTROL/FIRMWARE_VERSION", 746 "FAD_CONTROL/INCOMPLETE", 747 "FAD_CONTROL/PRESCALER", 748 "FAD_CONTROL/REFERENCE_CLOCK", 749 "FAD_CONTROL/REGION_OF_INTEREST", 750 "FAD_CONTROL/RUNS", 751 "FAD_CONTROL/RUN_NUMBER", 752 "FAD_CONTROL/START_RUN", 753 "FAD_CONTROL/STATISTICS1", 754 "FAD_CONTROL/STATISTICS2", 755 "FAD_CONTROL/STATS", 756 "FAD_CONTROL/STATUS", 757 "FAD_CONTROL/TEMPERATURE", 758 "FEEDBACK/CALIBRATED_CURRENTS", 759 "FEEDBACK/CALIBRATION", 760 "FEEDBACK/DEVIATION", 761 "FEEDBACK/REFERENCE", 762 "FSC_CONTROL/CURRENT", 763 "FSC_CONTROL/HUMIDITY", 764 "FSC_CONTROL/TEMPERATURE", 765 "FSC_CONTROL/VOLTAGE", 766 "FTM_CONTROL/COUNTER", 767 "FTM_CONTROL/DYNAMIC_DATA", 768 "FTM_CONTROL/ERROR", 769 "FTM_CONTROL/FTU_LIST", 770 "FTM_CONTROL/PASSPORT", 771 "FTM_CONTROL/STATIC_DATA", 772 "FTM_CONTROL/TRIGGER_RATES", 773 "LID_CONTROL/DATA", 774 "MAGIC_LIDAR/DATA", 775 "MAGIC_WEATHER/DATA", 776 "MCP/CONFIGURATION", 777 "PWR_CONTROL/DATA", 778 "RATE_CONTROL/THRESHOLD", 779 "RATE_SCAN/DATA", 780 "RATE_SCAN/PROCESS_DATA", 781 "TEMPERATURE/DATA", 782 "TIME_CHECK/OFFSET", 783 "TNG_WEATHER/DATA", 784 "TNG_WEATHER/DUST", 785 ]; 786 787 function map(entry) 788 { 789 if (entry.length==0) 790 return undefined; 791 792 var rc = entry.split(','); 793 if (rc.length!=2) 794 throw new Error("Subscription list entry '"+entry+"' has wrong number of elements."); 795 return rc; 796 } 797 798 var list = obj.data.split('\n').map(map); 799 800 function check(name) 801 { 802 if (list.every(function(el){return el[0]!=name;})) 803 throw new Error("Subscription to '"+name+"' not available."); 804 } 805 806 expected.forEach(check); 807 } 808 809 810 811 // ================================================================ 709 812 // Crosscheck all states 710 813 // ================================================================ … … 816 919 if (!was_up && sun.isUp) 817 920 { 818 console.out(" Sun rise detected.... automatic shutdown initiated!");921 console.out("", "Sun rise detected.... automatic shutdown initiated!"); 819 922 // FIXME: State check? 820 923 Shutdown(); … … 870 973 var task = obs[sub].task; 871 974 975 if (system_on===false && task!="STARTUP") 976 { 977 v8.sleep(1000); 978 continue; 979 } 980 872 981 // Check if sun is still up... only DATA and RATESCAN must be suppressed 873 982 if ((task=="DATA" || task=="RATESCAN") && sun.isUp) … … 880 989 } 881 990 882 if (system_on===false && task!="STARTUP") 883 { 884 v8.sleep(1000); 885 continue; 886 } 991 console.out("\n"+(new Date()).toUTCString()+": Current measurement: "+obs[sub]); 887 992 888 993 var power_states = sun.isUp || system_on===false ? [ "DriveOff" ] : [ "SystemOn" ]; 889 890 var drive_states = sun.isUp || system_on===false ? [ ] : [ "Armed", "Tracking", "OnTrack" ]; 994 var drive_states = sun.isUp || system_on===false ? undefined : [ "Armed", "Tracking", "OnTrack" ]; 891 995 892 996 // A scheduled task was found, lets check if all servers are … … 900 1004 [ "CHAT" ], 901 1005 [ "SMART_FACT" ], 1006 [ "TEMPERATURE" ], 902 1007 [ "DATA_LOGGER", [ "NightlyFileOpen", "WaitForRun", "Logging" ] ], 903 1008 [ "FSC_CONTROL", [ "Connected" ] ], … … 905 1010 [ "TIME_CHECK", [ "Valid" ] ], 906 1011 [ "PWR_CONTROL", power_states/*[ "SystemOn" ]*/ ], 907 [ "AGILENT_CONTROL", [ "VoltageOn" ] ],1012 // [ "AGILENT_CONTROL", [ "VoltageOn" ] ], 908 1013 [ "BIAS_CONTROL", [ "VoltageOff", "VoltageOn", "Ramping" ] ], 909 1014 [ "FEEDBACK", [ "CurrentControl", "CurrentCtrlIdle" ] ], … … 923 1028 } 924 1029 925 console.out("\n"+(new Date()).toUTCString()+": Current measurement: "+obs[sub]);1030 datalogger_subscriptions.check(); 926 1031 927 1032 // Check if obs.task is one of the one-time-tasks
Note:
See TracChangeset
for help on using the changeset viewer.