48 lines
1.7 KiB
Python
48 lines
1.7 KiB
Python
###################################################################################################
|
|
# Deployment specific global definitions - executed after startup.py
|
|
###################################################################################################
|
|
import ch.psi.fda.ProcessorFDA as ProcessorFDA
|
|
import ch.psi.pshell.crlogic.CrlogicPositioner as CrlogicPositioner
|
|
import ch.psi.pshell.crlogic.CrlogicSensor as CrlogicSensor
|
|
|
|
import ch.psi.pshell.epics.ChannelDouble as ChannelDouble
|
|
import ch.psi.pshell.epics.ChannelDoubleArray as ChannelDoubleArray
|
|
import ch.psi.pshell.epics.ChannelInteger as ChannelInteger
|
|
import ch.psi.pshell.epics.ChannelIntegerArray as ChannelIntegerArray
|
|
|
|
|
|
crlogic_config = {}
|
|
crlogic_config["class"] = "ch.psi.pshell.crlogic.CrlogicScan"
|
|
#crlogic_config["prefix"] = "X10DA-ES1-CRL"
|
|
#crlogic_config["ioc"] = "X10DA-VME-ES1"
|
|
#crlogic_config["integrationTime"] = 0.2
|
|
#crlogic_config["additionalBacklash"] = 0.01
|
|
|
|
|
|
run("CPython/wrapper")
|
|
|
|
###################################################################################################
|
|
# EPICS utilities
|
|
###################################################################################################
|
|
|
|
|
|
def caget_str(ch):
|
|
return ''.join((chr(i) if i else "") for i in caget(ch))
|
|
|
|
def caput_str(ch, val):
|
|
ret = [ord(c) for c in val]
|
|
ret = ret + ([0] * (256-len(ret)))
|
|
ret = to_array(ret, 'b')
|
|
caput(ch, ret)
|
|
|
|
###################################################################################################
|
|
# FDA utilities
|
|
###################################################################################################
|
|
|
|
|
|
def run_fda(file_name, arguments={}):
|
|
"""
|
|
Run FDA loop
|
|
"""
|
|
ProcessorFDA().execute(file_name,arguments)
|