- Timestamp:
- 03/22/13 17:12:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/CheckUnderflow.js
r15116 r15136 58 58 59 59 var runs = service_drs.get(5000, false); 60 if (!runs)61 throw new Error("Could not connect to FAD_CONTROL/DRS_RUNS");60 //if (!runs) 61 // throw new Error("Could not connect to FAD_CONTROL/DRS_RUNS"); 62 62 63 63 var power = dim.state("AGILENT_CONTROL").time; … … 90 90 // events. Thus there is no real guarantee that we do not receive 91 91 // data of the previous run after we have started a new one. 92 dim.wait("FAD_CONTROL", "Connected", 10000); 92 if (dim.state("FAD_CONTROL").name=="WritingData") 93 { 94 dim.send("FAD_CONTROL/CLOSE_OPEN_FILES"); 95 dim.wait("FAD_CONTROL", "Connected", 3000); 96 } 93 97 v8.sleep(1000); // Let 'timeout' in SendRawData pass 94 98 95 var event = service_event.get(5000, false); 96 var event_counter = event.counter; 99 var event_counter = service_event.get(5000, false).counter; 97 100 98 101 console.out("Starting drs-gain"); … … 102 105 103 106 var d = new Date(); 104 v8.timeout(10000, function() { if (service_event.get(0, false).counter>event_counter) return true; });105 //while (service_event.get(0, false).counter<=event_counter)106 //v8.sleep();107 //v8.timeout(10000, function() { if (service_event.get(0, false).counter>event_counter) return true; }); 108 while (service_event.get(0, false).counter<=event_counter) 109 v8.sleep(); 107 110 108 111 console.out("Event received: "+(new Date()-d)+"ms"); … … 110 113 dim.send("MCP/STOP"); 111 114 112 event = service_event.get(0, false);115 var event = service_event.get(0, false); 113 116 service_event.close(); 114 117 … … 131 134 132 135 // FIXME: Timeout 133 var drs_counter = service_drs.get(0, false) ;136 var drs_counter = service_drs.get(0, false).counter; 134 137 dim.send("FAD_CONTROL/LOAD_DRS_CALIBRATION", filefmt.$(yy, mm, dd, yy, mm, dd, nn)); 138 //v8.timeout(5000, function() { if (service_drs.get(0, false).counter>drs_counter) return true; }); 135 139 while (drs_counter == service_drs.get(0, false).counter) 136 140 v8.sleep();
Note:
See TracChangeset
for help on using the changeset viewer.