<?xml version="1.0" encoding="UTF-8"?>

<!--
 * 
 * This help file was generated from lcaPut.sci using help_from_sci().
 * 
 -->

<refentry version="5.0-subset Scilab" xml:id="lcaPut" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">

  <info>
    <pubdate>$LastChangedDate: 13-Jan-2012 $</pubdate>
  </info>

  <refnamediv>
    <refname>lcaPut</refname><refpurpose>Write a number of PVs (waiting for completion)</refpurpose>
  </refnamediv>



<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   lcaPut(pvs, value, type)
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Description</title>
   <para>
Write to a number of PVs which may be scalars or arrays of different
dimensions. It is possible to write the same value to a collection of
PVs.
</para>
</refsection>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>pvs:</term>
      <listitem><para> Column vector (in matlab: m x 1 cell- matrix) of m strings.</para></listitem></varlistentry>
   <varlistentry><term>value:</term>
      <listitem><para> m x n matrix or 1 x n row vector of values to be written to the PVs. If there is only a single row in value it is written to all m PVs. value may be a matrix of ``double'' precision numbers or a (matlab: cell-) matrix of strings (in which case the values are transferred as strings and converted by the CA server to the native type -- this is particularly useful for DBF_ENUM / ``menu'' type PVs).  <para> It is possible to write less than n elements -- labCA scans all rows for NaN values and only transfers up to the last non-NaN element in each row.  </para></para></listitem></varlistentry>
   <varlistentry><term>type:</term>
      <listitem><para> (optional argument) A string specifying the data type to be used for the channel access data transfer. <note>labCA always converts numerical data from ``double'' locally.</note>  <para> It can be desirable, to use a different data type for the transfer because by default CA transfers are limited to ~ 16kB.  Legal values for type are byte, short, long, float, double, char or native. There should rarely be a need for using anything other than native, the default, which directs CA to use the same type for transfer as the data are stored on the server. If value is a string matrix, type is automatically set to char.  </para> <note> While 'native' might result in different types being used for different PVs, it is currently not possible to explicitly request different types for individual PVs (i.e.  <emphasis>type</emphasis> cannot be a vector).  </note></para></listitem></varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[

// write a PV
lcaPut( 'thepv', 1.234 )

// write as a string (server converts)
lcaPut( 'thepv', '1.234' )

// write/transfer as a short integer (server converts)
lcaPut( 'thepv', 12, 'short' )

// write multiple PVs (use { } on matlab)
lcaPut( [ 'pvA'; 'pvB' ], [ 'a'; 'b' ] );

// write array PV
lcaPut( 'thepv' , [ 1, 2, 3, 4 ] )

// write same value to a group of PVs (string
// concatenation differs on matlab)
lcaPut( [ 'pvA'; 'pvB' ] + '.SCAN', '1 second' )

// write array and scalar PV (using NaN as a delimiter)
tab = [ 1, 2, 3, 4 ;   5, %nan, 0, 0 ]
lcaPut( [ 'arrayPV'; 'scalarPV' ], tab )
   ]]></programlisting>
</refsection>
</refentry>
