Subsections
Using labCA
labCA consists of a set of shared libraries which in turn reference
other shared libraries (most notably the channel access client libraries
from EPICS BASE). It is of crucial importance that the operating
system locates the correct versions at run-time (i.e. the same versions
labCA was linked against). Otherwise, the run-time linker/loader
could fail to load the required objects — leaving the user (expecially
in matlab) at the prompt with obscure error messages.
Under linux or solaris, the LD_LIBRARY_PATH environment
variable or the ld.so.conf / ldconfig facility are used to point
to the executable shared libraries (located in lib/<arch>).
The PATH variable also should point
to bin/<arch> so that the CA repeater executable is found.
If you build from source using your own EPICS base installation then
we assume that locating the CA repeater has already been taken
care of.
Under win32/64, the PATH environment variable must point to the
correct EPICS BASE and labCA DLLs (located in bin/<arch>).
Note that the paths to the correct EPICS BASE and labCA shared libraries
must be set up prior to starting the scilab or matlab application.
It is usually not possible to change the system search
path from within an application.
Possible problems could occur because
- third party setup scripts modify LD_LIBRARY_PATH / PATH.
- your EPICS BASE was not built with shared libraries but shared libraries
of a different release are found somewhere.
- a “innocent-looking” directory present in LD_LIBRARY_PATH
before EPICS BASE actually contains shared libraries of an older release.
- Note that the system search path is not identical with the
matlab path — changing the matlab path (from withing matlab)
has no influence on the system search path.
Set up the shared library search path (as described above) and start
scilab. Run the labCA.sce script which was generated by the build process
(<labCA-top>/bin/<arch>/labCA.sce) to load the labCA interface.
The script also adds to the %helps variable making on-line
help available13.
The script can be installed at any convenient location — the lines
setting up the %helps path (or add_help_chapter(), respectively)
need to be adapted in this case.
It is also possible to permanently link labCA to scilab. Consult
the scilab documentation for more information.
Every entry point / lcaXXX routine
is contained in a separate
shared object (AKA “mex-”) file in the <labCA-top>/bin/<arch>/labca14 directory
which must be added to the matlab search path.
Note that this is in addition
to setting the system library search path which must be performed prior
to starting matlab (see previous section).
All necessary objects and libraries are transparently loaded simply
by invoking any of the entry point routines. Note that on-line help
files are also installed to be located automatically.
Footnotes
- 13
-
Under scilab-5 %helps is no longer relevant
but add_help_chapter() is used insted.
- 14
-
the extra subdirectory was added in order for the matlab help command
to easily locate the Contents.m file when the user types help labca.