Subsections

Common Arguments and Return Values

PV Argument

All labCA calls take a PV argument identifying the EPICS process variables the user wants to connect to. PVs are plain ASCII strings. labCA is capable of handling multiple PVs in a single call; they are simply passed as a column vector:
pvs = [ 'PVa'; 'b'; 'anotherone' ]
Because matlab doesn't allow the rows of a string vector to be of different size, the matlab wrapper expects a cell- array of strings:
pvs = { 'PVa'; 'b'; 'anotherone' }

All channel access activities for the PVs passed to a single labCA call are batched together and completion of the batch is awaited before returning from the labCA call. Consider the following example:5

lcaPut( 'trigger', 1 ) \\
data=lcaGet( ['sensor1' ; 'sens2'] );


Timestamp Format

Channel access timestamps are ``POSIX struct timespec'' compliant, i.e. they provide the number of nanoseconds expired since 00:00:00 UTC, January 1, 1970. labCA translates the timestamps into complex numbers with the seconds (tv_sec member) and nanoseconds (tv_nsec) in the real and imaginary parts, respectively. This makes it easy to extract the seconds while still maintaining full accuracy.



Footnotes

...5
In matlab, the square brackets (``[]'') must be replaced by curly braces (``{}'').
...6
If the remote sensors have finite processing time, the subsequent CA read may still get old data -- depending on the device support etc.; this is beyond the scope of channel access, however.
till 2015-09-08