Changeset 149


Ignore:
Timestamp:
Jan 18, 2010, 9:41:13 AM (11 years ago)
Author:
daqct3
Message:
Changes to two .py files
Location:
trigger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trigger/CommunicateWithVME.py

    r115 r149  
    44#  CommunicateWithVME.py
    55#  Handles the communication with the VME crate
    6 can send commands to the VME crate
     6Sends commands to the VME crate
    77#
    88
     
    5656        #GlobalVariables.ServerMessage = str(beginCounter[i])
    5757    #GlobalVariables.ServerMessage = "Evaluating rates..."
    58     time.sleep(1)
     58    time.sleep(2)
    5959    for i in range(0,16):
    6060        endCounter[i] = _VME. V560_Read_Counter( module,  i)
    6161        #GlobalVariables.ServerMessage = str(endCounter[i])
    62         rates[i+1] =(endCounter[i]-beginCounter[i])/1000.
     62        rates[i+1] =(endCounter[i]-beginCounter[i])/2000.
    6363    return rates
    6464
  • trigger/ReadTemperatures.py

    r115 r149  
    44import time
    55import datetime
     6
     7
    68class ReadTemperatures(threading.Thread):
    79
    810   
    911
     12    filename=""
    1013   
    1114    def run(self):
    1215        time.sleep(0.01)
    1316        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')
    1636            #ArduinoMessage = self.ser.readline()
    1737            Lines= file.readlines()
     
    2343            GlobalVariables.ServerMessage   = Message
    2444            #print Message
    25             time.sleep(5)
     45            time.sleep(15)
    2646
    2747
Note: See TracChangeset for help on using the changeset viewer.