Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 02e7bc50735df2e365110343fbf39739 > files > 92

comedilib-devel-0.8.1-7.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>comedi_apply_calibration</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="    Comedi
  "
HREF="index.html"><LINK
REL="UP"
TITLE="    Comedi Function Reference
  "
HREF="x4629.html#FUNCTIONREFERENCE"><LINK
REL="PREVIOUS"
TITLE="comedi_set_global_oor_behavior"
HREF="r6412.html"><LINK
REL="NEXT"
TITLE="comedi_apply_parsed_calibration"
HREF="r6475.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Comedi: The <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Control and Measurement Device Interface</I
></SPAN
>
handbook
  </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="r6412.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="r6475.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="FUNC-REF-COMEDI-APPLY-CALIBRATION"
></A
>comedi_apply_calibration</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN6439"
></A
><H2
>Name</H2
>comedi_apply_calibration&nbsp;--&nbsp;set hardware calibration from file</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN6442"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN6443"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;comedilib.h&gt;</PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>int comedi_apply_calibration</CODE
>(comedi_t *device, unsigned int subdevice, unsigned int channel, unsigned int range, unsigned int aref, const char *file_path);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6460"
></A
><H2
>      Status
    </H2
><P
>	  alpha
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6463"
></A
><H2
>      Description
    </H2
><P
>This function sets the calibration of the specified subdevice
so that it is in proper calibration when using the specified
channel, range and aref.  It does so by performing writes
to the appropriate channels of the board's calibration
subdevice(s).  Depending on the hardware, the
calibration settings used may or may not depend on the channel,
range, or aref.  Furthermore, the calibrations appropriate
for different channel, range, and aref parameters
may not be able to be applied simultaneously.
For example, some boards cannot have their analog inputs calibrated
for more than one input range simultaneously.  Applying a calibration for range 1 may
blow away a previously applied calibration for range 0.  Or, applying
a calibration for analog input channel 0 may cause the same
calibration to be applied to all the
other analog input channels as well.
Your only guarantee is that calls to comedi_apply_calibration()
on different subdevices will not interfere with each other.</P
><P
>In practice, their are some rules of thumb on how
calibrations behave.  No calibrations depend on the aref.
A multiplexed analog input will have calibration settings that
do not depend on the channel, and applying a setting for one
channel will affect
all channels equally.  Analog outputs, and analog inputs
with independent a/d converters for each input channel, will have
calibrations settings which do depend on the channel, and the
settings for each channel will be independent of the other
channels.</P
><P
>If you wish to investigate exactly what comedi_apply_calibration()
is doing, you can perform reads on your board's calibration
subdevice to see which calibration channels it is changing.
You can also try to decipher the calibration file directly (it's a
text file).</P
><P
>The file_path parameter can be used
to specify the file which contains the calibration information.
If <CODE
CLASS="PARAMETER"
>file_path</CODE
> is NULL, then comedilib
will use a default
file location.  The calibration information used by this function
is generated by the comedi_calibrate program (see its man page).</P
><P
>The functions comedi_parse_calibration_file(),
comedi_apply_parsed_calibration(), and comedi_cleanup_calibration()
provide the same functionality at a slightly lower level.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN6471"
></A
><H2
>      Return value
    </H2
><P
>Zero on success, a negative number on failure.</P
><P
>    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="r6412.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="r6475.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>comedi_set_global_oor_behavior</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x4629.html#FUNCTIONREFERENCE"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>comedi_apply_parsed_calibration</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>