CA Lab


What is CA Lab?

CA Lab is a user-friendly, lightweight and high performance interface between LabVIEW™ and EPICS .
This project uses proven EPICS BASE libraries (V3.14.12), a CA Lab -library and polymorphic VIs to access EPICS variables.
Creating, reading and writing of EPICS variables is very simple now. Also user events with EPICS variables can be implemented easily.
EPICS time stamp, status, severity and optional PV fields (properties) are bound to resulting value. You avoid inconsistent data sets.
It's easy to create an executable of your VI because it doesn't depend on any external service.
CA Lab works with Windows® and Linux .
This interface requires only LabVIEW™ and any EPICS IOC shell of local host (included in package) or over network.
To use this interface it's not necessary to create a LabVIEW™ project nor to use external services. CA Lab can be used directly.
It is free! No additional licenses are required.
CA Lab is open source and works with all LabVIEW™ versions from 7.0 to 2013 (32bit/64bit).
It has been tested under Windows XP®, Windows 7®, Windows 8.1® and Ubuntu®12.04 LTS .

Presentation for EPICS Collaboration Meeting 2013

Current version: 2014)

How does CA Lab work?

interface structure of CA Lab
Any VI can use to read or to write EPICS variables. Use to create user events for any EPICS variables. These CA Lab VIs call interface library 'caLab', which uses EPICS base libraries 'ca' and 'Com' to provide Channel Access functions. CA Lab -library also builds an internal PV cache and monitors PVs to improve read and write access and reduce network traffic.
Since V1.5.0.0 you can also create and terminate EPICS variables out of LabVIEW™. (Polymorphic VI)

This is a polymorphic VI for reading values of EPICS variables.
INPUT: show details

OUTPUT: show details (Polymorphic VI)

This is a polymorphic VI for writing values to EPICS variables.
INPUT: show details

OUTPUT: show details

This is a VI for creating user events of EPICS variables.
INPUT: show details

OUTPUT: show details

This VI shows the current EPICS context.
OUTPUT: show details

This is a VI for creating user events of EPICS variables.
INPUT: show details

OUTPUT: show details

All created EPICS variables will be destroyed if CaLabSoftIOC will be stopped.

 Configuration Set

Cluster array of configurations of all EPICS variables.
PV Name Description Data type Number of elements (waveform only) Element size (waveform only) Array of field definitions

PV Info

PV Info ControlCluster of all PV info


CA Lab performance

What Ca Lab library (binaries) does

Expand me to see the answer! show details

caLab.dll (interface between LabVIEW™ and EPICS)

  • Handles Channel Access activities
  • Administrates list of used EPICS variables
  • Monitores used EPICS variables
  • Buffers Channel Access requests
  • Works with
    • more info


  • Checks / terminates running Soft IOC instances ("softIoc.exe")

CA tools (included in CA Lab)

Expand me for additional command line tools. show details
  • caGet (Read and print value for PVs.)
  • caPut (Write value to a PV.)
  • caMonitor (Set up monitor and continuously print incoming values for PVs.)
  • caInfo (Print channel access info data for a PV.)
  • caRepeater (Kind of proxy for Channel Access)
  • softIoc (Soft IOC)
  • DemoIOC (Simple test ioc shell)
  • Read more


Expand me to see how simple you can read, write and create EPICS PVs. show details

caget example


camonitor example


caput example


event example

move mouse over image to see more


Soft IOC example

Soft IOC example

Soft IOC example

click tab in image to see more

Soft IOC Demo - Configuration
Soft IOC Demo - Blockdiagramm


Click to open all FAQs. show details
If you upgrade existing VIs with CA Lab V1.3.2.1 and older please exchange: and click right on greyed out CA Lab VIs and use "Relink to SubVI" to update type of Polymorphic VI. Watch out! LabVIEW™ may result in a misalignment of connectors!!

Q: How can I do a quick check that CA Lab -installation works properly?
A: Use the full installion and run "start Demo" from Start menu.

Q: I get a lot of warnings on first start of your VI. What's the problem?
A: The CA Lab -VIs need the absolute path to caLab.dll. This absolute path varies from computer to computer. LabVIEW™ looks for the right path at first run and reports that library paths have been changed. You should save these changes.

Q: CA Lab -VIs aren't executable, what can I do?
A: Check following:
  • Search your system for ca.dll, com.dll and carepeater.exe. If you can find several versions of them, then rename all outside of your installation path.
  • Check whether msvcp100.dll and msvcr100.dll are in "windows/system32" folder.
  • Open a command line and type "carepeater". You should get no error message. Terminate it with CTRL-C. If you get any error message you should reinstall CA Lab .
  • Open and search for text "calab.dll". Double click on founds and check if text field "Library name or path" has same content as "path.txt" in your installation path.

Q: What is the maximum number of PVs monitored, tested up to now?
A: We have simultaneously monitored up to 1.000 PVs. But we're sure the limit is higher. A large number of PVs takes significant time to initialize when a PV is passed to the other. It's better to pass the PVs as an array. Reading, writing and monitoring after initialisation is no problem.

Q: Can CA Lab generate its own EPICS channels, or only connect to already defined channels?
A: CA Lab is a pure client application. If you want to generate your own channels, you can use "softIoc.exe". You can find an example in the demo application of caLab. Look at \DemoIOC\db\demo.db for variable definitions.
Install CA Lab or later.

Q: Will caLab work with any version of LabVIEW™ 64bit?
A: Yes, CA Lab does since V1.3.0.3. Please be sure to download the 64 bit version.

Q: I'm wondering what the timeout parameter does.
A: The timeout is the timeout for initializing and for retrieving the value for the FIRST call. After first call of any PV a background task monitors PVs and every call will be served by cached values from this task.
If you're using "synchronous" for, timeout defines how long CA Lab waits for response.
CA Lab schema

Q: I use caLabPut. When should I set the parameter "synchronious" to TRUE?
A: If it is necessary to wait til all record processing of written PV has been finished before next value can be set then you should set the connector of caLabPut "synchronious"=TRUE. Motor records are a good example.
Please check, your timeout is long as needed for response.

Q: There is a 'Debugging window' with the message "Error: xxx has been configured with different optional fields". What can I do?
A: This message will appear if there are several views of a PV with different field names. Please use the same count and order of field names for same PV name.

Q: When I run a VI with CA Lab it takes a long time to stop it. What can I do?
A: The most common reason is you run your VI few than 10 seconds. In this case CA Lab waits 5 seconds on closing to avoid interface problems.
Install CA Lab or later.

Q: When I comile VIs with CA Lab I get errors.
A: Please set your destination folder of executable outside of "user.lib" and check, you have all needed binaries included. needed binaries

Q: VIs with CA Lab user events are not working at Linux. Why?
A: National Instruments confirmed problems with user events via external libraries. They're working on a fix.
(NI 2014-02-24: "The problem is expected to be fixed with the version LV 2014.")

Q: The network and memory load does not decrease as expected when I stop a VI with CA Lab. Is there a memory leak?
A: There is no memory leak. The CA Lab library keeps all PV connections until all instances of CA Lab are closed. This prevents problems of rebuilding Channel Access connections we had in past. If you want to unload all EPICS PVs you have to close all VIs with CA Lab.

Q: How can I add an access security file to CaLabSoftIOC?
A: This quickest solution is to directly add the parameter in

Soft IOC Demo - Blockdiagramm
Any other questions are welcome! Please send me a mail.

Downloads of CA Lab

setup Setup for Windows® and LabVIEW™ 2010 64 bit and higher (source code included) V1.5.0.5
FEB 2013
setup Setup for Windows® and LabVIEW™ 8.5 32 bit and higher (source code included) V1.5.0.5
FEB 2013
Distribution of "caLabSetup_1505" contains: show details

setup More Distributions show details
archive CA Lab archive - sources and VIs only (Linux and Windows®)V1.5.0.5
FEB 2014
setup Setup for Windows® and LabVIEW™ 2010 64 bit and higher (source code included) V1.4.1.0
FEB 2013
setup Setup for Windows® and LabVIEW™ 8.5 32 bit and higher (source code included) V1.4.1.0
FEB 2013
archive CA Lab archive - sources and VIs only (Linux and Windows®)V1.4.1.0
FEB 2013
setup Setup for Windows® and LabVIEW™ 7.0 and higher (source code included) V1.2.1.5
AUG 2011
archive CA Lab archive - sources and VIs only (Linux and Windows®)V1.2.1.5
AUG 2011

Change Log


Carsten Winkler and Tobias Höft
AUG 2014

Copyright, definition and license of CA Lab

Copyright (C) 2010 Helmholtz-Zentrum Berlin für Materialien und Energie GmbH , Berlin, Germany (HZB).
This software is distributed under the terms of the EPICS Open License .
PV Name
EPICS variable name = char[40]

Field Name/Value
EPICS field name / field value = char[40]

EPICS status = "NO_ALARM"(0) || "READ"(1) || "WRITE"(2) || "HIHI"(3)

|| "HIGH"(4) || "LOLO"(5) || "LOW"(6) || "STATE"(7) || "COS"(8) || "COMM"(9)

|| "TIMEOUT"(10) || "HWLIMIT"(11) || "CALC"(12) || "SCAN"(13) || "LINK"(14)

|| "SOFT"(15) || "BAD_SUB"(16) || "UDF"(17) || "DISABLE"(18) || "SIMM"(19)

|| "READ_ACCESS"(20) || "WRITE_ACCESS"(21)

EPICS severity = "NO_ALARM"(0) || "MINOR"(1) || "MAJOR"(2) || "INVALID"(3)

EPICS timestamp = seconds since January 1, 1990 (double)

EPICS timestamp = "yyyy-mm-dd hh:mm:ss.SSSSSS" (string)

EPICS is Open Source software.

LabVIEW™ is a trademark of National Instruments Corp.

Ubuntu® is a registered trademark of Canonical Ltd.

Windows® is a registered trademark of Microsoft Cooperation