Copied from Controls Software Operations Group's page by Tasha Summers
Running your first database
For this section, and the following Operator Interface Tools, you will copy a set of example files into your own directory to follow along.
Step 1: Copy the example files into your home directory (on lcls-dev3)
cd ~
mkdir training
cd training
cp $TOOLS /pydm/eed-examples/training/ * .
ll (or ls )
|
Step 2: Explore and run the EPICS record database
Open the basics.db file with gedit and set the highlighting to 'sh' for readability. Take a look through the comments and records to get an idea of what they are and what they should do. Notice the use of macro variable $(USER). We often use many of these macros, E.g. $(SYS), $(AREA), $(INST) so we can treat the database files like templates. In full IOCs these macros are defined either through 'substitution' files that are expanded as part of the build (make) process, or in the IOC's startup file - but these methods are beyond the scope of this introduction. Instead, we will define the macro when we run this file using the 'softIoc' command.
ssh lcls-dev3
cd training
softIoc -m USER=USERNAME -d basics.db
|
Now you will be in the EPICS IOC shell, and see 'epics>' as the prompt. Two useful commands to run are 'dbl' and 'dbcar':
Note that we don't generally do much in the IOC shell - when IOCs are deployed on the controls servers they run in background processes and we only log onto them for debugging and troubleshooting.
Congratulations! Your PVs are now live on the development network!
Step 3: Use command line tools to read and write to your PVs
EPICS comes with simple command line tools to interact with your PVs.
caget MYPV
caget MYPV.SEVR
camonitor MYPV
caput MYPV 12
caput MYPV "Here is my string"
|