Skip to content
Snippets Groups Projects
Commit 551606a6 authored by mwyman's avatar mwyman
Browse files

Updated README, caqtdm startup scripts. Added slit testing PVs

parent cf66e2e3
No related branches found
No related tags found
No related merge requests found
......@@ -23,3 +23,4 @@
05/01/2024 - 15:09:31 - ravioli
05/02/2024 - 05:57:36 - ravioli
05/07/2024 - 06:21:41 - ravioli
08/20/2024 - 05:54:55 - ravioli
$(P)$(MONOE).VAL
$(P)$(IDENERGY).VAL
record(ao,"$(P)$(SLITH)") {
field(DESC,"Horizontal Slit Size")
field(PREC, "4")
field(EGU, "mm")
}
record(ao,"$(P)$(SLITV)") {
field(DESC,"Vertical Slit Size")
field(PREC, "4")
field(EGU, "mm")
}
$(P)$(SLITH).VAL
$(P)$(SLITV).VAL
......@@ -18,8 +18,6 @@ Uses xraylib python module.
integrates Shadow3 model of a beamline with simulated motors and Area Detector NDSA plugin to produce a simulated beamline.
### 100idPyCRL
<upcoming...>
Integrate code for transfocator calculations with lens actuation. Uses xraylib
python module
......@@ -33,7 +31,7 @@ Create a source script for activating the environment (e.g. 100idPyFilter_startu
### Startup script changes
xxx.pl --> 100idPyFilters.pl
xxx.pl --> 100idPyFilters.pl, 100idPyCRL.pl, etc
Added definitions:
PYDEV_STARTUP —> file to be sourced that includes conda activation and updates to LD_LIBRARY_PATH
PYDEV_IOC_CMD —> combined source and IOC_CMD for use in screen call
......@@ -48,6 +46,16 @@ pystart.pl — And in 6-3 looks like:
```
system("$SCREEN -dm -S $IOC_NAME -h 5000 -L -Logfile $LOG_FILE bash -c \"$PYDEV_IOC_CMD\"");
```
### caQtDM script changes
start_caQtDM_100idPyCRL and start_caQtDM_100idPyFilters bring up the main screen
for their respective devices (not the default xxx tabbed menu screen). To customize for
a new IOC, the UI_FILE_MACROS line needs updating, e.g. the original line is:
```
export UI_FILE_MACROS=${2:-"P=100idPyCRL:,TF=CRL,N=1"}
```
P, TF, and N need to be updated for the new IOC (i.e. match those set in the settings.iocsh and st.cmd).
## Running
Should be able run like any other xxx-based (synApps) IOC i.e. by running the xxx.pl file (or as in one the new examples in this IOC 100idPyFilters.pl)
......
......@@ -5,14 +5,16 @@
# Set CRL number
epicsEnvSet("_N","1")
# Setting some variables beamline-dependent PVs
epicsEnvSet('_SLITH',"") # Horizontal size of slit PV before CRL
epicsEnvSet('_SLITV',"") # Vertical size of slit PV before CRL
epicsEnvSet("BLE","") # Beam energy PV at CRL
# Next two lines set up some testing tools for energy -- can be commented out
# Next two lines set up some testing tools for energy and slits
epicsEnvSet("MONOE","testMonoE")
dbLoadRecords("${TOP}/db/energyTestTools.db","P=$(PREFIX), MONOE=$(MONOE), IDENERGY=testIDE")
epicsEnvSet("IDENERGY","testIDE")
dbLoadRecords("${TOP}/db/energyTestTools.db","P=$(PREFIX), MONOE=$(MONOE), IDENERGY=$(IDENERGY)")
dbLoadRecords("${TOP}/db/slitTestTools.db","P=$(PREFIX), SLITH=testSSH, SLITV=testSSV")
# Setting some variables beamline-dependent PVs
epicsEnvSet('_SLITH',"$(PREFIX)testSSH") # Horizontal size of slit PV before CRL
epicsEnvSet('_SLITV',"$(PREFIX)testSSV") # Vertical size of slit PV before CRL
epicsEnvSet("BLE","$(PREFIX)$(MONOE)") # Beam energy PV at CRL
# CRL DBs and defining substitution file to get stack properties
dbLoadTemplate("substitutions/pyDeviceTfor.substitutions","P=$(PREFIX)")
......
#!/bin/bash
export EPICS_APP=`dirname ${BASH_SOURCE:-$0}`
export EPICS_APP_UI_DIR=${EPICS_APP}/100idPyApp/op/ui
export DEFAULT_UI_FILE=${1:-${DEFAULT_UI_FILE:-pydev_transfocator_10.ui}}
export UI_FILE_MACROS=${2:-"P=100idPyCRL:,TF=CRL,N=1"}
source ${EPICS_APP}/setup_epics_common caqtdm
# #######################################
# # optional: add support directories not associated with environment variables
if [ -z "/APSshare/caqtdm" ]; then
CAQTDM_DISPLAY_PATH=$CAQTDM_DISPLAY_PATH:/APSshare/uisys/sr/id
fi
# #######################################
# # optional: support for PVs with large data sizes, such as areaDetector
# # This should agree with the environment variable set by the ioc
# # see 'putenv "EPICS_CA_MAX_ARRAY_BYTES=64008"' in iocBoot/ioc<target>/st.cmd
if [ "" == "${EPICS_CA_MAX_ARRAY_BYTES}" ]; then
#export EPICS_CA_MAX_ARRAY_BYTES=64008
export EPICS_CA_MAX_ARRAY_BYTES=8000100
fi
#######################################
# optional: override system default environment variables for Qt and Qwt
# These override system defaults for Qt, Qwt
# Because I'm using a local copy of Qt/Qwt, and not the system
# copy, I need to set some environment variables
#OVERRIDE_QT_BASE=/home/oxygen/MOONEY/Download/Qt
#export QTDIR=${OVERRIDE_QT_BASE}/qt-4.8.4
#export QT_PLUGIN_PATH=
#export QT_PLUGIN_PATH=${QT_PLUGIN_PATH}:${OVERRIDE_QT_BASE}/qt-4.8.4/plugins
#export QT_PLUGIN_PATH=${QT_PLUGIN_PATH}:${OVERRIDE_QT_BASE}/qwt-6.0/designer/plugins/designer
#######################################
# optional: other environment variables that may need local definitions
# these are copied from caQtDM's source for startDM_Local
#export QTCONTROLS_LIBS=`pwd`/caQtDM_Binaries
#export QTBASE=${QTCONTROLS_LIBS}
#export QT_PLUGIN_PATH=${QTBASE}
#export CAQTDM_DISPLAY_PATH=`pwd`/caQtDM_Tests
# For drag-and-drop workaround at APS, need /APSshare/bin/xclip
export CAQTDM_EXEC_LIST='Probe;probe &P &:UI File;echo &A:PV Name(s);echo &P:Copy PV name; echo -n &P| xclip -i -sel clip:Paste PV name;caput &P `xclip -o -sel clip`'
export START_PUTRECORDER=${EPICS_APP}/start_putrecorder
export MACROS_PY=${EPICS_APP_UI_DIR}/../python/macros.py
export EDITOR=nedit
if [ -z "/APSshare/caqtdm" ]; then
export PATH=${PATH}:/APSshare/bin
export QT_PLUGIN_PATH=/APSshare/caqtdm/plugins
export LD_LIBRARY_PATH=/APSshare/caqtdm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/linux-x86_64
else
export QT_PLUGIN_PATH=/usr/local/epics/extensions/lib/linux-x86_64
fi
#######################################
# optional: access to ioctim and bcdapc15
#export EPICS_CA_ADDR_LIST="164.54.53.99 164.54.54.88"
#######################################
# start caQtDM
/APSshare/bin/caQtDM -style plastique -noMsg -macro ${UI_FILE_MACROS} ${DEFAULT_UI_FILE} &
......@@ -2,8 +2,8 @@
export EPICS_APP=`dirname ${BASH_SOURCE:-$0}`
export EPICS_APP_UI_DIR=${EPICS_APP}/100idPyApp/op/ui
export DEFAULT_UI_FILE=${1:-${DEFAULT_UI_FILE:-100idPyFilters.ui}}
export UI_FILE_MACROS=${2:-"P=100idPy:"}
export DEFAULT_UI_FILE=${1:-${DEFAULT_UI_FILE:-pydev_filter_12.ui}}
export UI_FILE_MACROS=${2:-"P=100idPyFilter:,F=Filter,N=1"}
source ${EPICS_APP}/setup_epics_common caqtdm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment