Exemplo n.º 1
0
                      default='daq-xpp-mon03',
                      help="host that runs the ami proxy",
                      metavar="PHOST")

    (options, args) = parser.parse_args()

    #    pyami.connect(0xefff2a00,0xac150ab2,0xac1508b2)
    #    pyami.connect(0xefff2301,0xac152636,0xac151636) # xpp-daq
    #    pyami.connect(0xefff2301,0xac152647,0xac151647) # xpp-control
    #    pyami.connect(0xac150a17)  # Lab2
    #    pyami.connect(0xac15265e)  # XPP
    #    pyami.connect(0xac152b6b)  # XCS
    pname = socket.gethostbyname(options.proxy)
    paddr = struct.unpack('>I', socket.inet_aton(pname))[0]
    print[pname, paddr]
    pyami.connect(paddr)

    daq = pydaq.Control(options.host, options.platform)

    for iter in range(options.iterations):

        #
        #  Send the structure the first time to put the control variables
        #    in the file header
        #

        #    daq.configure(events=options.events,
        #                  controls=[('EXAMPLEPV1',0),('EXAMPLEPV2',0)],
        #                  monitors=[('BEAM:LCLS:ELEC:Q',options.qbeam,1.)])

        do_record = False
Exemplo n.º 2
0
#!/reg/g/pcds/package/python-2.5.2/bin/python
#
import pyami

class AmiScalar(pyami.Entry):
    def __init__(self,name):
        pyami.Entry.__init__(self,name)
    
class AmiAcqiris(pyami.Entry):
    def __init__(self,detid,channel):
        pyami.Entry.__init__(self,detid,channel)

eth_lo = 0x7f000001
eth_mc = 0xefff63e5
CxiAcq = 0x18000200
AmoETof = 0x03000200

pyami.connect(eth_mc,eth_lo,eth_lo)

x = pyami.Entry("ProcTime","Scan","EventId",20)
print x.get()

name_list = [("ProcLatency",),("ProcTime",),("ProcTimeAcc","Scan","EventId",20)]
x = pyami.EntryList(name_list)
print x.get()
print 'Again'
print x.get()

x = AmiAcqiris(AmoETof,1)
x.get()
Exemplo n.º 3
0
class AmiScalar(pyami.Entry):
    def __init__(self, name):
        pyami.Entry.__init__(self, name)


class AmiAcqiris(pyami.Entry):
    def __init__(self, detid, channel):
        pyami.Entry.__init__(self, detid, channel)


eth_lo = 0x7f000001
eth_mc = 0xefff63e5
CxiAcq = 0x18000200
AmoETof = 0x03000200

pyami.connect(eth_mc, eth_lo, eth_lo)

x = pyami.Entry("ProcTime", "Scan", "EventId", 20)
print x.get()

name_list = [("ProcLatency", ), ("ProcTime", ),
             ("ProcTimeAcc", "Scan", "EventId", 20)]
x = pyami.EntryList(name_list)
print x.get()
print 'Again'
print x.get()

x = AmiAcqiris(AmoETof, 1)
x.get()
Exemplo n.º 4
0
from common.detectors_pyami import IPIMBDetector as detector
import pyami
import os
PYPS_INTERACTIVE = os.getenv('PYPS_INTERACTIVE', "FALSE").lower() == 'true'
if PYPS_INTERACTIVE:
    sxrgroup = 0xefff2400
    pyami.connect(sxrgroup)
else:
    print "WARNING: sxrdetectors.py, not interactive mode, not connecting ami"
    pass


class SxrDetectors(object):
    def __init__(self):
        #     self.gas1   = detector("GDET:FEE1:241:ENRC","gas1",kind="gas")
        #     self.gas2   = detector("GDET:FEE1:242:ENRC","gas1",kind="gas")
        #     self.gas3   = detector("GDET:FEE1:361:ENRC","gas1",kind="gas")
        #     self.gas4   = detector("GDET:FEE1:362:ENRC","gas1",kind="gas")
        self.neh2 = detector("NH2-SB1-IPM-01:FEX", "neh2", kind="ipm")
        self.ipm1 = detector("SXR-IPM-01:FEX", "ipm1", kind="ipm")
        self.dio1 = detector("SXR-DIO-01:FEX", "dio1", kind="pim")
        self.ipm2 = detector("SXR-IPM-02:FEX", "ipm2", kind="ipm")
        self.dio2 = detector("SXR-DIO-02:FEX", "dio2", kind="pim")
        self.decmono = detector("SXR-DEC-mono:FEX", "dec-mono", kind="ipm")
        self.diomono = detector("SXR-DIO-mono:FEX", "dio-mono", kind="pim")
        self.ipmmono = detector("SXR-IPM-mono:FEX", "ipm-mono", kind="ipm")
        #     self.ipm3m  = detector("SXR-IPM-03m:FEX","ipm3m",kind="ipm")
        self.dio3m = detector("SXR-DIO-03m:FEX", "dio3m", kind="pim")
        self.ipm3 = detector("SXR-IPM-03:FEX", "ipm3", kind="ipm")
        self.dio3 = detector("SXR-DIO-03:FEX", "dio3", kind="pim")
        self.ipm4 = detector("SxrBeamline-1|Ipimb-4", "ipm4", kind="ipm")
Exemplo n.º 5
0
        dest="wait",
        default=False,
        help="wait for key input before 1st cycle and after last cycle",
        metavar="W")
    parser.add_option("-N",
                      "--iterations",
                      dest="iterations",
                      type='int',
                      default=1,
                      help="Execute N iterations of this scan",
                      metavar="Q")

    (options, args) = parser.parse_args()

    #    pyami.connect(0xefff2a00,0xac150ab2,0xac1508b2)
    pyami.connect(0xac150a17)  # Lab2
    #    pyami.connect(0xac15263e)  # XPP
    #    pyami.connect(0xac152b6b)  # XCS

    daq = pydaq.Control(options.host, options.platform)

    for iter in range(options.iterations):

        #
        #  Send the structure the first time to put the control variables
        #    in the file header
        #

        #    daq.configure(events=options.events,
        #                  controls=[('EXAMPLEPV1',0),('EXAMPLEPV2',0)],
        #                  monitors=[('BEAM:LCLS:ELEC:Q',options.qbeam,1.)])