Analog I/O Library


This analog I/O library defines a common interface for reading analog input values and writing analog output values.


The way how you include the library functions in your own windows program, depends on the compiler and on the programming language you use. In order to access the analog I/O API, you have to include the library labbCAN_AnalogIO_API.dll to your programming environment. You have to copy this file to the working directory of your system or to the application directory that contains your application EXE file. Use the calling convention __stdcall for this library. This convention is managing how the parameters are put on the stack and who is responsible to clean the stack after the function execution.

The interface of the library, constant definitions and declarations of the library functions, is defined in the header file interface/labbCAN_AnalogIO_API.h

Analog I/O API Usage

Retrieve device handle

To work with an analog I/O channel, you need a valid channel handle. A channel handle is simply an opaque pointer to the internal channel object created by the labbCAN environment. So the first thing you need do to is obtaining a valid analog I/O channel handle.

You can get a valid output channel handle with the function LCAIO_LookupOutChanByName() and a valid input channel handle with the function LCAIO_LookupInChanByName():

dev_hdl hAnalogIn;
Result = LCAIO_LookupInChanByName("neMAXYS1_AnIN2", &hAnalogIn);
dev_hdl hAnalogOut;
Result = LCAIO_LookupOutChanByName("neMESYS_AnOUT1", &hAnalogOut);
You can get the channel names from the device configuration files (see Device Configuration Files). Simply search in the channel list for Lcl::CAnalogInChannel or Lcl::CAnalogOutChannel channels.
<Channel Name="neMAXYS1_AnIN1">
<Scaling Factor="1" Offset="0"/>
<Channel Name="neMAXYS1_AnIN2">
<Scaling Factor="1" Offset="0"/>


See the labbCAN Analog I/O API module for a detailed reference of all analog I/O control, status and configuration functions.

Programming Interface - API

See the labbCAN Analog I/O API module for a detailed reference of the Analog I/O library application programming interface