EPICS is a set of tools, normally used in a UNIX environment, that

Configuring a PC as an EPICS Client
Christiana Grenoble
6-08-05
Abstract: Instruction on how to configure a PC as an EPICS CAClient using ActiveX
software.
EPICS is a set of tools, typically used in a UNIX environment, that provide data acquisition, supervisory
control, data logging and alarm management for instruments typically connected to a network. EPICS tools
use channel access (CA) for network communication between CAclients and CAservers. 1
LabVIEW is a graphical programming interface application based in C. A programmer using LabVIEW
writes code by wiring icons together. Each icon is a program instruction or a set of instructions. This
paper describes how to configure a Windows pc to be a Channel Access Client and a Channel Access
Server over a TCIP network. Once the computer is configured, a simple LabView program will be used to
acquire data from an IOC.
Configuring a Windows NT PC to be a EPICS CAClient or CAServer 2
1. Download LV_to_EPICS.zip from http://www.jlab.org/~grenoble/downloads.html
2. Unzip the files and place the unzipped files in a folder on the hard drive.
For the purposes of this paper, the folder containing all of the unzipped files will be called
…\LV_to_EPICS.
3. Run …\LV_to_EPICS \RegisterNT_2000.bat. The computer will beep indicating that the
software was installed and the registration was successful.
4. Check the register to ensure software was installed correctly.
a. Click the Start button.
b. Select Run…
c. Type regedit.
d. Look under HKEY_CLASSES_ROOT for EpicsCAServer.ProcessVariable and
EpicsCAClient.ProcessVariable . Please note, in the instructions that come with the
download, under the ActiveX Interface COM Registration, the instructions state ‘ Check
e.g. the “EpicsCAServer.ProcessVariable/CLSID”, it looks like{5F190F33-E77D-11D28F1D-00105AC8D47C}.’ The previous class id number was listed under
EpicsCAClient.ProcessVariable/CLSID/ when I installed the software on my pc and the
software works correctly.
e.
Look under HKEY_CLASSES_ROOT/CLSID/ for
{5F190F33-E77D-11D2-8F1D-00105AC8D47C}. Double click the ID to open the
folder. The entry for “LocalServer32” should point to the location of the
EpicsCAServer.exe.
f.
Close regedit.
5.
Set the Environment Variable of the OS to connect to the IOC providing data.
a. Go to Control Panel.
b. Double click the System icon.
c. Select the Environment tab.
d. In the Variable box type in EPICS_CA_ADDR_LIST
e. In the Value box type in the IP address or addresses. If more than one address is needed,
separate the addresses with a space. At JLAB there is a name server that connects to all
accelerator IOC’s, CHL IOC’s and the CTF. The IP is 129.57.255.19. If this does not
work, than contact the owner of the IOC for the IP address. At JLAB Matt Bickley can
help.
f. Click on set to set the environment variable. Put it in the system variables for all users to
access IOC’s. Put it in the user variables for a single user to access IOC’s.
g. Click on OK to exit.
6.
Run …LV_to_EPICS\EpicsCAClient.exe and …LV_to_EPICS\EpicsCAServer.exe that came
with the CAServer60.llb download.
7.
Check in task manager under the processes tab to verify that the EpicsCAClient and
EpicsCAServer are running when launched. This only needs to be done once when you install the
ActiveX EpicsCA services. When your application, such as LabView or Visual Basic, requires
the EpicsCAclient, the ActiveX process will start automatically If the EpicsCAClient process is
not being used, it times out and closes.
8.
9.
Start LabView. Go to …\LV_to_EPICS\ClientTests and run getval.vi. Type in the name of the
Process Variable (a.k.a. PV, signal name or tag) you wish to read. Run the vi. If everything is set
up correctly, you should get data back.
The most common problem with LabView to EPICS interface is not connecting to the EPICS
server that is actively serving data. Verify the IOC or server IP address with the system owner and
use the ping utility to ensure the IOC or server is on the network. Modify the environment variable
as explained in step 4 with the correct IP address of the IOC. Also, verify the PVnames with the
system owner.
References
1
Active X CA, Kasemir, Kay-Uwe,
http://lansce.lanl.gov/organization/EPICSdata/ActiveXCAServer/default.htm
2
ActiveX Interface COM Registration, Kasemir Kay-Uwe,
http://lansce.lanl.gov/organization/EPICSdata/ActiveXCAServer/activex.htm