Differences between revisions 4 and 5
Revision 4 as of 2010-04-14 15:23:15
Size: 1552
Editor: YoichiAso
Comment:
Revision 5 as of 2010-04-14 15:29:15
Size: 1942
Editor: YoichiAso
Comment:
Deletions are marked like this. Additions are marked like this.
Line 45: Line 45:

Modify {{{db/*.db}}} file. Then go to {{{iocBoot/iock1pico}}} and run {{{st.cmd}}}.

Now, for the PicoMotor controller, we have to put {{{pmepics.db}}} in the {{{db/}}} directory. This file is automatically generated by {{{pmGenDbMedm.py}}} script. Then you have to add a line like the following to {{{iocBoot/iock1pico/st.cmd}}}.
{{{
dbLoadRecords("db/pmepics.db", "site=K1")
}}}

PicoMotor control system using EPICS and Python

Installation

We assume that EPICS base is installed in /opt/epics/base.

EpicsCA

Download EpicsCA version 2 (not 3 yet) from below:

http://cars9.uchicago.edu/~newville/Epics/Python/

Extract it in /opt/epics/.

Set appropriate environmental variables (these are actually set by .cshrc, so you shouldn't have to be bothered).

LD_LIBRARY_PATH=/opt/epics/base/lib/linux-x86_64
EPICS_BASE=/opt/epics/base
EPICS_EXTENSIONS=/opt/epics/extensions
EPICS_HOST_ARCH=linux-x86_64

Run

python setup.py build

You may need to install development files for python, if these are not installed yet.

Run

python setup.py install

as root. Be sure to source /home/controls/.cshrc to set the environmental variables.

EPICS IOC

We want to have a dedicated IOC for the PicoMotor controller. Actually, this section gives you a general procedure to make a generic IOC.

Make a directory in /cvs/cds/kami/target. In this example, we create /cvs/cds/kami/target/k1pico.
Run the following commands in the created directory:

/opt/epics/base/bin/linux-x86_64/makeBaseApp.pl -t example k1pico
/opt/epics/base/bin/linux-x86_64/makeBaseApp.pl -i -t example k1pico

example is the name of a template. example is a good template to start. k1pico is the name of your IOC. Usually, we want to start it with k1.

Type make in the directory. The EPICS build system will compile an IOC.

Modify db/*.db file. Then go to iocBoot/iock1pico and run st.cmd.

Now, for the PicoMotor controller, we have to put pmepics.db in the db/ directory. This file is automatically generated by pmGenDbMedm.py script. Then you have to add a line like the following to iocBoot/iock1pico/st.cmd.

dbLoadRecords("db/pmepics.db", "site=K1")

CLIO/Technicals/PMEPICS (last edited 2010-04-15 22:51:13 by YoichiAso)