Difference between revisions of "UserControl"

From Ug11bm
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 30: Line 30:
     device == 4: "Hot Gas Blower"
     device == 4: "Hot Gas Blower"
         Temp = GetHotAirBlowerSettings()[1]+273.
         Temp = GetHotAirBlowerSettings()[1]+273.
   
   
     device == 5: "Helium Cryostat"
     device == 5: "Helium Cryostat"
         Temp = GetCryostatT()[2]  #'0'=sensor1, '1'=sensor2, '2'=sensor3
         Temp = GetCryostatT()[2]  #'0'=sensor1, '1'=sensor2, '2'=sensor3
Line 36: Line 36:
     device == 6: "Omega Thermocouple Meter"
     device == 6: "Omega Thermocouple Meter"
         Temp = ReadOmegaTempMeter() + 273. #reads Omega temp
         Temp = ReadOmegaTempMeter() + 273. #reads Omega temp
 
 
    device == 7:
 
        devicename = "Stanford PTC-10"
 
        Temp = round(float(QPID_QueryValue(value=1)), 1) + 273.
 
        # assumes PTC units are set in C, convert to K (Not Safe, need way to get units!)


===SetUserControlTemp():===
===SetUserControlTemp():===
Line 62: Line 62:
     if device == 6:
     if device == 6:
         devicename = "Omega Thermocouple Meter"
         devicename = "Omega Thermocouple Meter"
    if device == 7:
        devicename = "Stanford PTC-10"

Latest revision as of 01:08, 15 February 2013

UserControl Icon UserControl is launched from the UserToolBar by clicking on the icon.


Tasks Menu

COMMAND functions

QueryUserControlTemp()

Reads active temperature device selection (default, = "-1"). Or use option to read temp of non-active device by specifying device number as below. NOTE: No error checking to confirm that selected device is active.

   device == 0: "Custom User Value"
       Temp = ca_util.caget("11bmb:userHolder5.VAL") #read current slew scan temp record PV string
   
   device == 1: "Ambient"
       Temp = 298.
   
   device == 2: "N2 Cryostream (static)"  #Always use cryostat temp, regardless of in/out position
       Temp = Read11BMCryoStreamT()[1]
   
   device == 3: "N2 cryostream (autoload)"
       if Test11BMCryoStream():  #True if not OUT (then assumed at sample)
           Temp = Read11BMCryoStreamT()[1]
       else:  #False, at OUT position, RT assumed for sample
           Temp = 298.
   
   device == 4: "Hot Gas Blower"
       Temp = GetHotAirBlowerSettings()[1]+273.
    
   device == 5: "Helium Cryostat"
       Temp = GetCryostatT()[2]  #'0'=sensor1, '1'=sensor2, '2'=sensor3
   
   device == 6: "Omega Thermocouple Meter"
       Temp = ReadOmegaTempMeter() + 273. #reads Omega temp

   device == 7:
       devicename = "Stanford PTC-10"
       Temp = round(float(QPID_QueryValue(value=1)), 1) + 273. 
       # assumes PTC units are set in C, convert to K (Not Safe, need way to get units!)

SetUserControlTemp():

Override active temperature device selection, changes which device temperature value is reported in the log and file header.

NOTE: No error checking to confirm that selected device is active.

def SetUserControlTemp(device):    
   if device == 0:
       devicename = "Custom User Value" # returns whatever is in the 11bmb:userHolder5.VAL PV field
   if device == 1:
       devicename = "Ambient"
   if device == 2:
       devicename = "N2 Cryostream (static)"
   if device == 3:
       devicename = "N2 cryostream (autoload)"
   if device == 4:
       devicename = "Hot Air Blower"
   if device == 5:
       devicename = "Helium Cryostat"
   if device == 6:
       devicename = "Omega Thermocouple Meter"
   if device == 7:
       devicename = "Stanford PTC-10"