Sample program

We provide the basic usage and the skill as the sample program with the source code.
Because the sample programs are made as simply as possible, you need to make good use of these for programming.

File structure

The following figure shows the structure of the directory in which API-AIO(LNX) sample programs are installed.

User Directory/contec/caio
      |
      |________samples
                 |
                 |_______en
                              |_______inc                              include files
                              |_______gcc                             Gcc version
                              |              |_______console        console samples
                              |_______python                        Python version
                                             |_______console        console samples
 

List of sample programs

In the console folder, sample programs are stored with the following configuration.

Function Category

Project Name

Sample Name

Analog Input

ai_simple

Simple Analog Input

ai_sampling_once_dev

Finite Sampling Using Device Buffer

ai_sampling_infinite_dev

Infinite Sampling Using Device Buffer

ai_sampling_once_user

Finite Sampling Using User Buffer

ai_sampling_infinite_user

Infinite Sampling Using User Buffer

ai_sampling_attached_data

Finite Sampling Using Attached Data

Analog Output

ao_simple

Simple Analog Output

ao_generating_once_dev

Finite Generating Using Device Buffer

ao_generating_infinite_dev

Infinite Generating Using Device Buffer

ao_generating_ring_memory

Infinite Generating Using RING Memory

ao_generating_once_user

Finite Generating Using User Buffer

ao_generating_infinite_user

Infinite Generating Using User Buffer

Digital I/O

digital_io

Digital General Purpose Input and Output

Counter Input

counter

Counter

Timer

timer

Timer

Event Controller

internal_sync_generating_sampling

Device Internal Synchronization (Generating/Sampling)

ecu_sync_sampling

Sampling Synchronization Between 2 Devices Using Synchronization Bus

internal_sync_counter_sampling

Device Internal Synchronization (Count Comparison Match/Sampling)

Demo Device

aiodemoctrl

Demo Device Operation Sample