Detailed Procedure to Create EPICS Databases using GDCT
10JUL98
P. Sichta
Revision 1.2 21OCT98 P. Sichta Added Scan Phase section.
Revision 1.1 19SEP98 P. Sichta
Revision 1.0 10SEP98 P. Sichta
Table of Contents
=================================================================
1.0 Introduction
This procedure provides a detailed description of how the use the Graphical Database Configuration Tool (GDCT) to create and manage EPICS databases for NSTX. GDCT is one of several tools used in the EPICS community for working with databases.
2. 0 References
3. 0 Aliases, Environmental Variables, Paths, and Permissions
Aliases used :
Environmental Variables : None
Paths : The Unix user’s search path must include : /epics/system/epics/epicsExtensions/bin/solaris
Permissions : Anyone can run GDCT but only Unix accounts in the group ‘staff’ will have write permission in the online directories.
4. 0 Creating EPICS Databases
GDCT can be started from any directory :
/nstx : gdbase
/nstx/epicapps/ceApp/Db/dbd/ceApp.dbd
4.0 Scan Phase
EPICS records which are on a periodic scan interval, such as "2 second" use a record field "PHAS", which is the phase field. Within a scan-period group, all records with PHAS=0 will process before those records with PHAS=1. This model continues up to PHAS=255. Note that the default standard EPICS scan phase is PHAS=0. It is the resposibility of the application developer to enter an appropriately higher value (to specify a lesser priority).
The following conventions apply :
On the IOC, function scanppl lists all records in each periodic scan group.
On the IOC, function dbgrep "pattern" lists record names which match the specified pattern.
5.0 Duplicate PV Names
In EPICS, Process Variable names (PV) must be unique across IOC’s on the same network. The IOC will not generate an error if it encounters a duplicate name, and the databases will not operate as designed.
The use of the system’s digraph in the PV name is used to help avoid name duplication. To check for duplicate records in all files in a single ‘Db’ directory :
/nstx/epicapps/xxApp/Db : pvCheck
Duplicate instances of identical PV names will be displayed.
The script behind the alias pvCheck is :
6.0 Bugs & Hints
Recovery :These unusual character sequences can be manually corrected using a text editor. All instances must be corrected identically in both the .db file and the GDCT graphics file.
For non-passive scanned hardware I/O use Scan Phase 10 for high priority items, 20 for medium priority, and 30 for low priority. Other phases may be used following these guidelines.