예제 #1
0
from cdb._coolingchannel_supermouse import CoolingChannelSuperMouse

######### PREPROD TEST
#_TEST_CDB = "http://preprodcdb.mice.rl.ac.uk"
#cc = CoolingChannelSuperMouse(_TEST_CDB)
#########

######## MASTER
_MASTER_CDB = "http://172.16.246.25:8080"
cc = CoolingChannelSuperMouse(_MASTER_CDB)

print help(cc), cc.get_name(), cc.get_server_host_name(), cc.get_version()

############################################################################

abs_data = [\
        {'name':'primary','material':'LH2','shape':'empty','temperature':'0','pressure':'0','comment':'Empty lh2 absorber'},\
        {'name':'secondary1','material':'solid','shape':'empty','temperature':'0','pressure':'0','comment':'Empty solid absorber'},\
        {'name':'secondary2','material':'solid','shape':'empty','temperature':'0','pressure':'0','comment':'Empty solid absorber'}\
        ]

_ABS_TAG = 'ABS-LH2-EMPTY'
xml = ("<tag name='" + str(_ABS_TAG) + "'>")
for absorber in abs_data:
    xml = xml + "<absorber name='" + str(absorber['name']) + "' "
    xml = xml + "material='" + str(absorber['material']) + "' "
    xml = xml + "shape='" + str(absorber['shape']) + "' "
    xml = xml + "temperature='" + str(absorber['temperature']) + "' "
    xml = xml + "pressure='" + str(absorber['pressure']) + "' "
    xml = xml + "comment='" + str(absorber['comment']) + "'/> "
xml = xml + "</tag>"
예제 #2
0
	_CC_TAG defines the name of the tag for the currents

To switch between Preprod and Master, change the argument to the handle on Line:16
e.g. 
     cc = CoolingChannelSuperMouse(_PROD_CDB)
"""

from cdb._coolingchannel_supermouse import CoolingChannelSuperMouse

########### PREPROD CDB
#_TEST_CDB = "http://preprodcdb.mice.rl.ac.uk"
#cc = CoolingChannelSuperMouse(_TEST_CDB)

########### PRODUCTION CDB
_PROD_CDB = "http://172.16.246.25:8080"
cc = CoolingChannelSuperMouse(_PROD_CDB)

############################################################################
### The rates, and limits are NOT used by Run Control, only meaningful for ramping
_calib = '0.0'
_rate = '0.0'
_stab = '0.0'
_vlim = '0.0'
_ilim = '0.0'

############## TAG
##### MUST Provide a tag for the current settings
_CC_TAG = "StepIV-3T"

############## SSU, SSD, FCU, FCD currents
ssu_currents = {}
from cdb._coolingchannel_supermouse import CoolingChannelSuperMouse

######### PREPROD TEST
#_TEST_CDB = "http://preprodcdb.mice.rl.ac.uk"
#cc = CoolingChannelSuperMouse(_TEST_CDB)
#########

######## MASTER
_MASTER_CDB = "http://172.16.246.25:8080"
cc = CoolingChannelSuperMouse(_MASTER_CDB)

#print help(cc), cc.get_name(), cc.get_server_host_name(), cc.get_version()

############################################################################
#
# ABS-SOLID-LiH    basorber tag as defined by Pierrick on 18/10/2016 (JM)
#
###########################################################################
abs_data = [\
        {'name':'primary','material':'LiH','shape':'disk','temperature':'0','pressure':'0','comment':'preset'},\
        {'name':'secondary1','material':'solid','shape':'empty','temperature':'0','pressure':'0','comment':'Empty solid absorber'},\
        {'name':'secondary2','material':'solid','shape':'empty','temperature':'0','pressure':'0','comment':'Empty solid absorber'}\
        ]

_ABS_TAG = 'ABS-SOLID-LiH'
xml = ("<tag name='" + str(_ABS_TAG) + "'>")
for absorber in abs_data:
    xml = xml + "<absorber name='" + str(absorber['name']) + "' "
    xml = xml + "material='" + str(absorber['material']) + "' "
    xml = xml + "shape='" + str(absorber['shape']) + "' "
    xml = xml + "temperature='" + str(absorber['temperature']) + "' "