The sequencer is distributed as an EPICS R3.14 makeBaseApp application. This chapter describes how to obtain, unpack, build, install, verify and use the distribution.
The distribution should be obtained via the sequencer home page which is, at the time of writing, at URL http://www2.keck.hawaii.edu:3636/realpublic/epics/seq (what a mouthful). This describes the available versions and will point you to a gzipped tar file with a name of the form seq-n.m.p.tar.gz ( n.m.p is the version number, e.g. 2.0.0 ).
Select and download the appropriate version. In what follows, we will assume that you downloaded v2.0.0. However, the instructions will apply to this or any later version.
Note that, from v2.0.0, the third digit is the patch level and will be incremented each time a new version is released, no matter how minor the changes. The second digit is the minor version number and will be incremented each time functional changes are made. The first digit is the major version number and will be incremented only when major changes are made.
cd to the directory that you wish to be the parent of the sequencer tree. Then unpack and untar the file. For example (these steps can be combined by clever use of pipes using syntax that I can never remember, or else if you have GNU tar, its -z option will decompress on the fly).
This creates a directory tree with the following general structure (this is part of the file in the top-level directory).
README This file (general notes at the top, followed
It will be necessary to edit the files configure/RELEASE and configure/CONFIG before building. Here are copies of these files, with the lines that you are likely to have change highlit:
#RELEASE Location of external products
EPICS_BASE=/home/wlupton/epics/anl/base
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
include $(TOP)/configure/CONFIG_APP
# Add any changes to make rules here
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
# shareable library version (from CONFIG_BASE)
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
# sequencer version number (replaces old Version file)
# override to use snc from SEQ
SNC = $(SEQ)/bin/$(EPICS_HOST_ARCH)/snc
# which message systems to support (comment to disable)
In RELEASE , you should select EPICS base via the EPICS_BASE macro and the top of the sequencer tree via the SEQ macro.
In CONFIG , you should select the target architectures for which to build via the CROSS_COMPILER_TARGET_ARCHS macro (a subset of those for which EPICS has been built), and the message systems to support via the PVXXX macros.
Ensure that your environment is configured for building EPICS applications. The only EPICS requirement is that the EPICS_HOST_ARCH environment variable be set correctly (you can use the $EPICS_BASE/startup/EpicsHostArch script to set it). However, if you built EPICS with shareable library support, your LD_LIBRARY_PATH environment variable will have to include $EPICS_BASE/lib/$EPICS_HOST_ARCH , and if you are using gcc with shareable library support, it will have to include the directory that contains libstdc++.so . These notes are written from a Solaris standpoint; details may vary slightly under other architectures.
cd to the top of the sequencer tree and run GNU make. The tree should build without incident. Please feed back any build problems (and their resolutions!) to me. My e-mail address is on the front cover of this manual.
Note that make builds in the configure directory, then the src tree, and finally the test tree. A failure in the test tree will not impact your ability to write sequences.
Under Solaris, the -R loader option will have been used to link executables, so LD_LIBRARY_PATH should need no further additions. Under other operating systems, it may be necessary to append $SUPPORT/lib/$EPICS_HOST_ARCH , where SUPPORT has the value that you gave it in configure/RELEASE .
cd to $SUPPORT/bin/$EPICS_HOST_ARCH . It should look like this:
demo sncDelay sncEntryVar sncExample sncOpttVar
demo.vws sncEntry sncExEntry sncExitOptx
snc sncEntryOpte sncExOpt sncOptt
Try running demo. This includes its own CA server, so no IOC or portable CA server is needed. It should look something like this:
##################################################################
### @(#)EPICS IOC CORE built on Mar 22 2000
### @(#)Version R3.14.0.alpha $$Date: 2000/04/04 03:21:38 $$
### @(#)Built date Mar 22 2000
##################################################################
db_attach_pvAdapter I dont know what to call
iocInit: All initialization complete
@(#)SEQ Version 2.0.0: Fri Mar 31 16:50:09 HST 2000
osiSockDiscoverInterfaces(): ignoring loopback interface: lo0
osiSockDiscoverInterfaces(): net intf hme0 found
osiSockDiscoverInterfaces(): ignoring loopback interface: lo0
osiSockDiscoverInterfaces(): net intf hme0 found
Spawning thread 0xa54c0: "demo_1"
Spawning thread 0xa5580: "demo_2"
Spawning state program "demo", thread 0x98240: "demo"
demo_1 2000/03/31 17:14:24: start -> ramp_up
demo 2000/03/31 17:14:31: light_off -> light_on
demo_1 2000/03/31 17:14:35: ramp_up -> ramp_down
If you see the " start -> ramp_up " etc. messages, things are good. If not, some channels haven't connected (use the " - " to command to find out which).
Issue the " i " command. You should something like this:
Finally, go to an xterm and do the following:
This illustrates the very basic "sequencer device support" in this release. These records are returning the names of the first two state-sets of the above sequence.
Most (maybe all) of the other test programs do not connect to control system variables and can be run without an IOC. For example:
@(#)SEQ Version 2.0.0: Fri Mar 31 16:50:09 HST 2000
Spawning state program "sncexitoptx", thread 0x30868: "sncexitoptx"
low, delay timeout, incr v and now reenter low
Pause on each exit of low, including 'iterations'
low, delay timeout, incr v and now reenter low
Pause on each exit of low, including 'iterations'
low, delay timeout, incr v and now reenter low
This section assumes that you are working in a makeBaseApp environment. The more general information in See Using makeBaseApp should help if this is not the case.
You need to edit your own configure/RELEASE and configure/CONFIG files to reference the correct sequencer version. The necessary changes are similar to those that were made to build the sequencer (See Preparing to build). Here are versions of the files with the lines that must be added for the sequencer highlit:
#RELEASE Location of external products
include $(TOP)/configure/CONFIG_APP
# Add any changes to make rules here
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
SNC = $(SEQ)/bin/$(EPICS_HOST_ARCH)/snc
You can refer to the various Makefile s in the test tree to see how to write your own sequences. For example, here is the Makefile for the above sncExitOptx program ( test/validate/Makefile ):
include $(TOP)/configure/CONFIG
SEQS = sncDelay sncEntry sncEntryOpte sncEntryVar sncExitOptx \
include $(TOP)/test/Makefile.pv
include $(TOP)/configure/RULES
This Makefile includes test/Makefile.pv but you will probably want to look at that and bring what you need inline (it handles all the possible message systems and you will likely be using only a single message system). For example, to use CA, the following would be fine.
include $(TOP)/configure/CONFIG
SEQS = sncDelay sncEntry sncEntryOpte sncEntryVar sncExitOptx \
PROD_LIBS += seq pv pvCa ca Com
include $(TOP)/configure/RULES
The only real requirements here are that SEQ is defined to point to the head of the tree in which the sequencer has been installed (see configure/RELEASE ; SEQ_LIB is automatically defined by a make rule in configure ), and that SNC is defined like this (see configure/CONFIG ):