Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ O.*/
*~
*.swp
sandbox
opis/
adls/
uis/
9 changes: 9 additions & 0 deletions build_xspress3.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@

IOCNAME=ioc_{nelem:d}Channel
SCRIPT=st.cmd
READOUT_MODE="frames"

# Use default frames if XSP3READOUT is not set
if [ -z "$XSP3READOUT" ]; then
echo "XSP3READOUT not set. Using default: '$READOUT_MODE'"
export XSP3READOUT="$READOUT_MODE"
else
echo "XSP3READOUT is set to: '$XSP3READOUT' — leaving unchanged"
fi

APPNAME=$TOPDIR/xspress3/iocs/xspress3IOC/bin/linux-x86_64/xspress3App
IOCDIR=$TOPDIR/xspress3/iocs/xspress3IOC/iocBoot/$IOCNAME
Expand Down
4 changes: 2 additions & 2 deletions iocs/xspress3IOC/iocBoot/common/SetMainValues.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
dbpf("$(PREFIX)det1:RUN_FLAGS", "0")
dbpf("$(PREFIX)det1:NUM_CHANNELS", "$(NUM_CHANNELS)")
dbpf("$(PREFIX)det1:NumImages", 16000)
dbpf("$(PREFIX)det1:AcquireTime", 0.25)
dbpf("$(PREFIX)det1:NumImages", 1000)
dbpf("$(PREFIX)det1:AcquireTime", 1)
Comment on lines +4 to +5

This comment was marked as resolved.

dbpf("$(PREFIX)det1:CONNECT", "1")
dbpf("$(PREFIX)det1:CTRL_DTC", "Disable")
dbpf("$(PREFIX)det1:TriggerMode", "Internal")
Expand Down
2 changes: 1 addition & 1 deletion iocs/xspress3IOC/iocBoot/ioc_14Channel/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ epicsEnvSet("PREFIX", "XSP3_14Chan:")
epicsEnvSet("NUM_CHANNELS", "14")

# Number of xspress3 cards and IP ADDR
epicsEnvSet("XSP3CARDS", "2")
epicsEnvSet("XSP3CARDS", "7")
epicsEnvSet("XSP3ADDR", "192.168.0.1")

# Max Number of Frames for data collection
Expand Down
2 changes: 1 addition & 1 deletion iocs/xspress3IOC/iocBoot/ioc_16Channel/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ epicsEnvSet("PREFIX", "XSP3_16Chan:")
epicsEnvSet("NUM_CHANNELS", "16")

# Number of xspress3 cards and IP ADDR
epicsEnvSet("XSP3CARDS", "2")
epicsEnvSet("XSP3CARDS", "8")
epicsEnvSet("XSP3ADDR", "192.168.0.1")

# Max Number of Frames for data collection
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion iocs/xspress3IOC/iocBoot/ioc_2Channel/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ iocInit
# The "CONFIG_PATH" value points to the calibration folder with files:
# card0_clocks.dat, chan1_reion0.dat, etc
# dbpf("$(PREFIX)det1:CONFIG_PATH", "/etc/xspress3/calibration/initial")
dbpf("$(PREFIX)det1:CONFIG_PATH", "$(SUPPORT)/../xspress3_settings/current/")
dbpf("$(PREFIX)det1:CONFIG_PATH", "$(SUPPORT)/../xspress3_settings/current")

< ../common/SetMainValues.cmd

Expand Down
Empty file.
7 changes: 6 additions & 1 deletion iocs/xspress3IOC/iocBoot/ioc_4Channel/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ epicsEnvSet("PREFIX", "XSP3_4Chan:")
epicsEnvSet("NUM_CHANNELS", "4")

# Number of xspress3 cards and IP ADDR
epicsEnvSet("XSP3CARDS", "1")
epicsEnvSet("XSP3CARDS", "2")

This comment was marked as resolved.

epicsEnvSet("XSP3ADDR", "192.168.0.1")

# Max Number of Frames for data collection
Expand Down Expand Up @@ -64,6 +64,11 @@ dbpf("$(PREFIX)det1:CONFIG_PATH", "$(SUPPORT)/../xspress3_settings/current/")

< ../common/SetMainValues.cmd


# Uncomment for debug tracing
# asynSetTraceMask("XSP3",-1, 0x100)
# asynSetTraceIOMask("XSP3",-1, 0x100)

###############################
# SET UP CHANNELS
#Channel 1
Expand Down
2 changes: 1 addition & 1 deletion iocs/xspress3IOC/iocBoot/ioc_7Channel/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ epicsEnvSet("PREFIX", "XSP3_7Chan:")
epicsEnvSet("NUM_CHANNELS", "7")

# Number of xspress3 cards and IP ADDR
epicsEnvSet("XSP3CARDS", "1")
epicsEnvSet("XSP3CARDS", "4")
epicsEnvSet("XSP3ADDR", "192.168.0.1")

# Max Number of Frames for data collection
Expand Down
4 changes: 4 additions & 0 deletions xspress3App/Db/xspress3.template
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ record(mbbo, "$(P)$(R)TriggerMode")
field(SXVL, "6")
field(SVST, "Software + Internal")
field(SVVL, "7")
field(EIST, "TTL + Internal")
field(EIVL, "8")
field(VAL, "0")
field(PINI, "NO")
}
Expand Down Expand Up @@ -165,6 +167,8 @@ record(mbbi, "$(P)$(R)TriggerMode_RBV")
field(SXVL, "6")
field(SVST, "Software + Internal")
field(SVVL, "7")
field(EIST, "TTL + Internal")
field(EIVL, "8")
field(SCAN, "I/O Intr")
}

Expand Down
2 changes: 1 addition & 1 deletion xspress3App/opi/adl/xspress3_mcarois.adl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ text {
"basic attribute" {
clr=14
}
textix="SCAs, Timing Info: (80MHz clock)"
textix="SCAs, Timing Info: "
}
text {
object {
Expand Down
2 changes: 1 addition & 1 deletion xspress3App/opi/edl/autoconvert/xspress3_mcarois.edl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fgColor rgb 0 0 0
bgColor index 3
useDisplayBg
value {
"SCAs, Timing Info: (80MHz clock)"
"SCAs, Timing Info:"
}
endObjectProperties

Expand Down
11 changes: 11 additions & 0 deletions xspress3App/src/xsp3Api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ xsp3Api::xsp3Api( asynUser * user ) :
xsp3Api::~xsp3Api()
{
}
int xsp3Api::set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card)
{
int status;
asynPrint(this->pasynUser, XSP3IF_DEBUG, "xsp3_set_sync_mode( %i, %i, %i, %i ) = ", path, sync_mode, enb_global_reset, gr_card );

status = xsp3Api_set_sync_mode(path, sync_mode, enb_global_reset, gr_card);

asynPrint(this->pasynUser, XSP3IF_DEBUG, "%d\n", status );

return status;
}

int xsp3Api::clocks_setup(int path, int card, int clk_src, int flags, int tp_type)
{
Expand Down
2 changes: 2 additions & 0 deletions xspress3App/src/xsp3Api.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class xsp3Api {
virtual int xsp3Api_get_trigger_b(int path, unsigned chan, Xspress3_TriggerB *trig_b) = 0;
virtual int xsp3Api_get_dtcfactor(int path, u_int32_t *scaData, double *dtcFactor, double *dtcAllEvent, unsigned chan) = 0;
virtual int xsp3Api_get_generation(int path, int card) = 0;
virtual int xsp3Api_set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card) = 0;

public:
int clocks_setup(int path, int card, int clk_src, int flags, int tp_type);
Expand Down Expand Up @@ -110,6 +111,7 @@ class xsp3Api {
int get_trigger_b(int path, unsigned card, Xspress3_TriggerB *trig_b);
int get_dtcfactor(int path, u_int32_t *scaData, double *dtcFactor, double *dtcAllEvent, unsigned chan);
int get_generation(int path, int card);
int set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card);

private:
asynUser * pasynUser;
Expand Down
7 changes: 7 additions & 0 deletions xspress3App/src/xsp3Detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,10 @@ int xsp3Detector::xsp3Api_get_generation(int path, int card)
return xsp3_get_generation(path, card);
}

int xsp3Detector::xsp3Api_set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card)
{
int status;
status = xsp3_set_sync_mode(path, sync_mode, enb_global_reset, gr_card);

return status;
}
1 change: 1 addition & 0 deletions xspress3App/src/xsp3Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class xsp3Detector: public xsp3Api {
virtual int xsp3Api_get_trigger_b(int path, unsigned chan, Xspress3_TriggerB *trig_b);
virtual int xsp3Api_get_dtcfactor(int path, u_int32_t *scaData, double *dtcFactor, double *dtcAllEvent, unsigned chan);
virtual int xsp3Api_get_generation(int path, int card);
virtual int xsp3Api_set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card);
};

#endif /* XSP3DETECTOR_H */
4 changes: 4 additions & 0 deletions xspress3App/src/xsp3Simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,7 @@ int xsp3Simulator::xsp3Api_get_generation(int path, int card)
{
return 0;
}
int xsp3Simulator::xsp3Api_set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card)
{
return XSP3_OK;
}
1 change: 1 addition & 0 deletions xspress3App/src/xsp3Simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class xsp3Simulator: public xsp3Api {
virtual int xsp3Api_get_trigger_b(int path, unsigned chan, Xspress3_TriggerB *trig_b);
virtual int xsp3Api_get_dtcfactor(int path, u_int32_t *scaData, double *dtcFactor, double *dtcAllEvent, unsigned chan);
virtual int xsp3Api_get_generation(int path, int card);
virtual int xsp3Api_set_sync_mode(int path, int sync_mode, int enb_global_reset, int gr_card);

private:
std::vector<xsp3SimElement> detectors;
Expand Down
Loading