CA Lab (32 bit / 64 bit)

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 3 polymorphic VIs to access EPICS variables.
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 or over network( OPC , Shared Memory Variables , Network variables , NI IO Service ).
It's not necessary to create a LabVIEW™ project to use this interface.
It is free! No additional licenses are required.
CA Lab is open source and works with all LabVIEW™ versions from 7.0 to 2012 (32bit/64bit).
It has been tested under Windows XP®, Windows 7®, Windows 8® and Ubuntu®12.04 LTS .

Presentation for EPICS Collaboration Meeting 2013

Current version: 1.4.1.0 (FEB 2013)


How does CA Lab work?

interface structure of CA Lab
Any VI can use caLabGet.vi to read or caLabPut.vi to write EPICS variables. Use caLabEvent.vi 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.

caLabGet.vi (Polymorphic VI)

This is a polymorphic VI for reading values of EPICS variables.
caLabGet.vi
 
INPUT:

 
OUTPUT:

caLabPut.vi (Polymorphic VI)

This is a polymorphic VI for writing values to EPICS variables.
caLabPut.vi
 
INPUT:


 
OUTPUT:

caLabEvent.vi

This is a VI for creating user events of EPICS variables. caLabEvent.vi
 
INPUT:

 
OUTPUT:

PV Info

Cluster of all PV info

Performance

What Ca Lab library does

caLab.dll (interface between LabVIEW™ and EPICS)

Functions:

CA tools (included in CA Lab)

Additional command line tools for alternative EPICS access:

Examples

Simple VIs to read and write EPICS values:

caget example

caGet

camonitor example

caMonitor

caput example

caPut

event example

 

move mouse over image to see more


FAQ

Note:
If you upgrade existing VIs with CA Lab 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!!
Open all FAQs

Q: How can I do a quick check that CA Lab -installation works properly?
A: Use the full installion and run "startDemo.bat".

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:

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.

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 caLabPut.vi, timeout defines how long CA Lab waits for response.

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.
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.

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.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
Distribution of "caLabSetup_1410" contains:

setup More Distributions
archive CA Lab archive - sources and VIs only (Linux and Windows®)V1.4.1.0
FEB 2013
setup Setup for Windows® and LabVIEW™ 2010 64 bit and higher (source code included) V1.3.2.0
JUL 2012
setup Setup for Windows® and LabVIEW™ 8.5 32 bit and higher (source code included) V1.3.2.0
JUL 2012
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


Authors

Carsten Winkler and Tobias Höft
FEB 2013

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]

Status
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)

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

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

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

EPICS is Open Source software.
http://www.aps.anl.gov/epics/

LabVIEW™ is a trademark of National Instruments Corp.
http://www.ni.com

Ubuntu® is a registered trademark of Canonical Ltd.
http://www.ubuntu.com

Windows® is a registered trademark of Microsoft Cooperation
http://www.microsoft.com