Changeset 149
- Timestamp:
- 01/18/10 09:41:13 (15 years ago)
- Location:
- trigger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trigger/CommunicateWithVME.py
r115 r149 4 4 # CommunicateWithVME.py 5 5 # Handles the communication with the VME crate 6 # can sendcommands to the VME crate6 # Sends commands to the VME crate 7 7 # 8 8 # … … 56 56 #GlobalVariables.ServerMessage = str(beginCounter[i]) 57 57 #GlobalVariables.ServerMessage = "Evaluating rates..." 58 time.sleep( 1)58 time.sleep(2) 59 59 for i in range(0,16): 60 60 endCounter[i] = _VME. V560_Read_Counter( module, i) 61 61 #GlobalVariables.ServerMessage = str(endCounter[i]) 62 rates[i+1] =(endCounter[i]-beginCounter[i])/ 1000.62 rates[i+1] =(endCounter[i]-beginCounter[i])/2000. 63 63 return rates 64 64 -
trigger/ReadTemperatures.py
r115 r149 4 4 import time 5 5 import datetime 6 7 6 8 class ReadTemperatures(threading.Thread): 7 9 8 10 9 11 12 filename="" 10 13 11 14 def run(self): 12 15 time.sleep(0.01) 13 16 while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"): 14 filename="/ct3data/SlowData/CLIM_20090924.slow" 15 file = open(filename, 'r') 17 MyTime = time.time() 18 hour = time.gmtime(MyTime)[3] 19 if(hour>=13): 20 MyTime+=12*60*60 21 year = time.gmtime(MyTime)[0] 22 month =time.gmtime(MyTime)[1] 23 day = time.gmtime(MyTime)[2] 24 date=str(year) 25 #if (hour>=12): 26 # day = day+1 27 28 29 date+="%(month)02d" % {"month":month} 30 date+="%(day)02d" % {"day":day} 31 #date+="_" 32 #date+="%(hour)02d" % {"hour":hour} 33 #date+="%(minute)02d" % {"minute":minute} 34 self.filename="/ct3data/SlowData/CLIM_"+date+".slow" 35 file = open(self.filename, 'r') 16 36 #ArduinoMessage = self.ser.readline() 17 37 Lines= file.readlines() … … 23 43 GlobalVariables.ServerMessage = Message 24 44 #print Message 25 time.sleep( 5)45 time.sleep(15) 26 46 27 47
Note:
See TracChangeset
for help on using the changeset viewer.