EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: time delayed using express3
From: lynn via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 20 Jun 2023 20:39:21 +0800 (CST)
Hi,
     I met some question about the expess3.
     1) There is time delay(about 4000ms) except the first run start.
     2) Usually, acquires could not stop automatic when time arrived, including the first run. And i did use internal mode.
     I think both of the reason was about time delay. because the message from st.cmd(the bottom of the mail).
     Could someone do me a favor.
     And answer was appreciate.
    
Too mayn message, so I marked some place red which i think important.
[xspress3@xspress3 ~]$ xspress3-ioc.sh
# This file was automatically generated on Mon 15 Dec 2014 18:37:13 GMT from
# source: /home/npr78/diamond/support/xspress3/etc/makeIocs/example1Channel.xml
# *** Please do not edit this file: edit the source file instead. ***
cd "/usr/lib/epics/iocBoot/xspress3/example1Channel"
epicsEnvSet "EPICS_CA_MAX_ARRAY_BYTES", '6000000'
epicsEnvSet "EPICS_TS_MIN_WEST", '0'
# Loading libraries
# -----------------
# Device initialisation
# ---------------------
cd "/usr/lib/epics/iocBoot/xspress3/example1Channel"
dbLoadDatabase "dbd/example1Channel.dbd"
example1Channel_registerRecordDeviceDriver(pdbbase)
callbackSetQueueSize(4000)
##################################################
# Start Xspress3 driver
# Parameters
# portName The Asyn port name to use
# numChannels The max number of channels (eg. 8)
# numCards The number of Xspress3 systems (normally 1)
# baseIP The base address used by the Xspress3 1Gig and 10Gig interfaces (eg. "192.168.0.1")
# Max Frames Used for XSPRESS3 API Configuration (depends on Xspress3 firmware config).
# Max Driver Frames Used to limit how big EPICS driver arrays are). Needs to match database MAX_FRAMES_DRIVER_RBV.
# maxSpectra The maximum size of each spectra (eg. 4096)
# maxBuffers Used by asynPortDriver (set to -1 for unlimited)
# maxMemory Used by asynPortDriver (set to -1 for unlimited)
# debug This debug flag is passed to xsp3_config in the Xspress API (0 or 1)
# simTest 0 or 1. Set to 1 to run up this driver in simulation mode.
xspress3Config("XSP3", 1, 1, "192.168.0.1", 16384, 16384, 4096, 4096, 0, 0, 0 )
Simulation: 0
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA0", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA0" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA1", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA1" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA2", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA2" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA3", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA3" )
Data readout thread PID: 31234
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA4", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA4" )
Data readout thread TID syscall(SYS_gettid): 31242
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA5", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA5" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA6", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA6" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_SCA7", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1SCA7" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI1", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI1" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI2", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI2" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI3", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI3" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI4", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI4" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI5", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI5" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI6", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI6" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI7", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI7" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI8", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI8" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI9", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI9" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI10", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI10" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI11", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI11" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI12", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI12" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI13", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI13" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI14", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI14" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI15", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI15" )
# NDAttrConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxTimeSeries, attrName)
NDAttrConfigure("XSP3.C1_ROI16", 4096, 0, "XSP3", 0,  -1, -1, 0,0, 16384, "CHAN1ROI16" )
# NDROIConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory)
NDROIConfigure("XSP3.ROI1", 4096, 0, "XSP3", 0, -1, -1)
# NDROIConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory)
NDROIConfigure("XSP3.ROISUM1", 4096, 0, "XSP3.PROC", 0, -1, -1)
2023/06/20 13:07:14.408 NDPluginDriver::connectToArrayPort Error calling pasynManager->connectDevice to array port XSP3.PROC address 0, status=3, error=asynManager:connectDevice port XSP3.PROC not found
# I do not know whether the red error is important.
# NDStdArraysConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxMemory)
NDStdArraysConfigure("XSP3.ARR1", 4096, 0, "XSP3.ROI1", 0, -1)
# NDStdArraysConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxMemory)
NDStdArraysConfigure("XSP3.ARRSUM1", 4096, 0, "XSP3.ROISUM1", 0, -1)
# NDProcessConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory)
NDProcessConfigure("XSP3.PROC", 16, 0, "XSP3", 0, 50, 0)
# NDROIConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory)
NDROIConfigure("XSP3.ROIDATA", 16, 0, "XSP3", 0, 50, 0)
# NDFileHDF5Configure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr)
NDFileHDF5Configure("XSP3.HDF5", 16, 0, "XSP3.ROIDATA", 0)
# Final ioc initialisation
# ------------------------
cd "/usr/lib/epics/iocBoot/xspress3/example1Channel"
dbLoadRecords('db/example1Channel_expanded.db', "XSPRESS3_PREFIX=XSPRESS3-EXAMPLE,TODFORMAT=%d.%m.%Y %H:%M:%S")
# there is some error here, then i added the red part, error gone.
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.3 $Date: Sun 2015-11-22 17:54:12 +0100$
## EPICS Base built Jan 11 2018
############################################################################
iocRun: All initialization complete
#Set up some of the more complicated HDF PVs
dbpf("XSPRESS3-EXAMPLE:HDF5:FileTemplate", "%s%s%d.hdf5")
DBR_CHAR[12]:        "%s%s%d.hdf5"      
dbpf("XSPRESS3-EXAMPLE:HDF5:FileWriteMode", "Stream")
DBR_STRING:          "Stream"
dbpf("XSPRESS3-EXAMPLE:HDF5:EnableCallbacks", "Enable")
DBR_STRING:          "Enable"
#Set up the PROC plugin spectra summing
dbpf("XSPRESS3-EXAMPLE:PROC:EnableFilter", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:PROC:FilterType", "Sum")
DBR_STRING:          "Sum"    
dbpf("XSPRESS3-EXAMPLE:PROC:EnableCallbacks", "Enable")
DBR_STRING:          "Enable"
# Enable spectra for channel 1
dbpf("XSPRESS3-EXAMPLE:C1_PluginControlVal", "Enabled")
DBR_STRING:          "Enabled"          
#Set up the ROI parameters
dbpf("XSPRESS3-EXAMPLE:ROIDATA:EnableX", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROIDATA:EnableY", "Enable")
DBR_STRING:          "Enable"
#Set the default energy and channel range for the ROIDATA plugin.
dbpf("XSPRESS3-EXAMPLE:ROIDATA:SizeX", "4096")
DBR_LONG:           4096      0x1000              
dbpf("XSPRESS3-EXAMPLE:ROIDATA:SizeY", "1")
DBR_LONG:           1         0x1                 
# Xspress 3 configuration
dbpf("XSPRESS3-EXAMPLE:CONFIG_PATH", "/etc/epics/xspress3/settings/1channel")
DBR_CHAR[38]:        "/etc/epics/xspress3/settings/1channel"          
dbpf("XSPRESS3-EXAMPLE:RUN_FLAGS","0")
DBR_STRING:          "SCALERS & HIST"   
dbpf("XSPRESS3-EXAMPLE:NUM_CHANNELS","1")
DBR_LONG:           1         0x1                 
dbpf("XSPRESS3-EXAMPLE:NumImages", "1")
DBR_LONG:           1         0x1                 
# hdf5 output
dbpf("XSPRESS3-EXAMPLE:HDF5:FilePath","/home/xspress3/data")
DBR_CHAR[20]:        "/home/xspress3/data"        
dbpf("XSPRESS3-EXAMPLE:HDF5:FileName","test")
DBR_CHAR[5]:         "test"   
dbpf("XSPRESS3-EXAMPLE:ArrayCallbacks","Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROIDATA:EnableCallbacks","Enable")
DBR_STRING:          "Enable"
# connect to Xspress3
dbpf("XSPRESS3-EXAMPLE:CONNECT","1")
DBR_STRING:          "Connect"          
# set TTL trigger
# dbpf("XSPRESS3-EXAMPLE:TriggerMode","TTL Veto Only")
dbpf("XSPRESS3-EXAMPLE:TriggerMode","Internal")
DBR_STRING:          "Internal"         
dbpf("XSPRESS3-EXAMPLE:ROI1:EnableX", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROI1:EnableY", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROI1:MinY", "0")
DBR_LONG:           0         0x0                 
dbpf("XSPRESS3-EXAMPLE:ROI1:SizeY", "1")
DBR_LONG:           1         0x1                 
dbpf("XSPRESS3-EXAMPLE:ROISUM1:EnableX", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROISUM1:EnableY", "Enable")
DBR_STRING:          "Enable"
dbpf("XSPRESS3-EXAMPLE:ROISUM1:MinY", "0")
DBR_LONG:           0         0x0                 
dbpf("XSPRESS3-EXAMPLE:ROISUM1:SizeY", "1")
DBR_LONG:           1         0x1                 
dbpf("XSPRESS3-EXAMPLE:C1_PluginControlValExtraROI", "0")
debug level 0, dummy_system=0
DBR_STRING:          "Disabled"         
dbpf XSPRESS3-EXAMPLE:NDAttributesFile, data/XSP3.xml
DBR_CHAR[14]:        "data/XSP3.xml"    
dbpf("XSPRESS3-EXAMPLE:C1_PluginControlValExtraROI", "0")
DBR_STRING:          "Disabled"         
# disable DTC by default
dbpf("XSPRESS3-EXAMPLE:CTRL_DTC", "0")
DBR_STRING:          "Disable"          
Calculating generation from Revision 0x01021017, major=33, minor=23 => determined generation=2
xsp3_scope_mod_create(name='xsp3_scope0')
Initialising hardware registers
Initialising hardware BRAM
xsp3_format_run: nbins_eng=4096, nbins_aux1=1, nbins_aux2=1, max_num_dets=1
xsp3_format_run: Determined num_tf=16385
config with init: After xsp3_format_run, mem_layout = 01C1C000, numtf_hist=0, scaler_num_tf=16384, scaler_num_tf_fw=2097152
Calling xsp3_get_dma_status_block()
Finished xsp3_config_scaler with num_tf=16384
xsp3_clocks_setup_int: Called with card=0, clk_src=16, flags=0x0003
xsp3m_clocks_setup_int: write adc_cont=0x80000000
xsp3_clocks_setup: Measured frequency 80.00 MHz
Making null roi as file '/etc/epics/xspress3/settings/1channel/chan0_region4.dat' is Zero length
xsp3_read_format: Xspress3mini diag/soft hist buffer size=0 lwords
xsp3_read_format: diag_hist=0, nbins_eng=4096, nbins_aux1=1, nbins_aux2=1, num_tf=16384
xsp3_format_run: nbins_eng=4096, nbins_aux1=1, nbins_aux2=1, max_num_dets=1
xsp3_format_run: Determined num_tf=16385
xsp_get_trigger_b status: 0 event width: 6
epics> xsp4_system_start_count_enb: Xsp3Sys[path].run_flags=0xC
WARNING : xsp3m_flush_readout_tcp: Timeout after 50 attempts checking for TCP threads busy
xsp4_system_start_count_enb: Xsp3Sys[path].run_flags=0xC
WARNING : xsp3m_flush_readout_tcp: Timeout after 50 attempts checking for TCP threads busy
WARNING : xsp3m_flush_readout_tcp: Timeout after 50 attempts checking for TCP threads busy
xsp4_system_start_count_enb: Xsp3Sys[path].run_flags=0xC
WARNING : xsp3m_flush_readout_tcp: Timeout after 50 attempts checking for TCP threads busy
WARNING : xsp3m_flush_readout_tcp: Timeout after 50 attempts checking for TCP threads busy
# i acquire 3 times, first time i stop, the second it stop auto, the last one it fail to stop
Regards,
Lynn





Replies:
Re: time delayed using express3 Matt Newville via Tech-talk

Navigate by Date:
Prev: autosave Command xxx not found. 周逸媚 via Tech-talk
Next: Re: autosave Command xxx not found. Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: autosave Command xxx not found. Mark Rivers via Tech-talk
Next: Re: time delayed using express3 Matt Newville via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 20 Jun 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·