Sample Programs

Basic usage and frequently used techniques are provided as sample programs with source code.
The sample program has been created as simple as possible, so please use it when programming.

Folder structure

The sample program folder is configured as follows in the location where API-CNT(WDM) is installed.
The folder structure is the same for both 32-bit and 64-bit OS environments

C:\Users\Public\Documents\CONTEC\API-TOOL\CNTWDM\

     |

     |________ Sample\
     |         |
     |         |________ Inc\            Include file for each language
     |         |
     |         |________ Lib_amd64\      Library files for each language (64bit)
     |         |
     |         |________ Lib_i386\       Library files for each language (32bit)
     |         |
     |         |
     |         |________ VB\
     |         |         |________ DotNetFramework4\      Visual Basic.Net (.NET Framework) Sample
     |         |         |________ DotNet8\               Visual Basic.Net (.NET) Sample
     |         |
     |         |________ VC\
     |         |         |________ Vc2015\                Visual C++ (MFC) Sample
     |         |
     |         |________ VC#\
     |         |         |________ DotNetFramework4\      Visual C# (.NET Framework) Sample
     |         |         |________ DotNet8\               Visual C# (.NET) Sample
     |         |
     |         |________ Python\
     |                   |________ Python3\               Python Sample
     |
     |
     |________ SampleExe\
               |________ 64bit\          Sample EXE file (64bit)
               |________ 32bit\          Sample EXE file (32bit)

 

 

Note: The underlined part is the default folder name of the API-TOOL installer.
      If the default folder name is changed during API-TOOL installation, it will be changed.

 

List of sample programs

In the folder of each language, sample programs are stored with the following configuration.

Development Language: VB, VC#, VC++

Function Category

Subfolder Name

Project Name

Sample Name

Usual Counter
(For devices without sampling function)

CntDevice\

Counter

Counter Sample

High-performance Counter
(For devices with sampling function)

CntSamplingDevice\

Counter

High-performance Version Counter Sample

CounterCallback

High-performance Version Counter Callback Sample

Sampling

Sampling Sample

Infinite

Infinite Sampling Sample

Sync

Sync Sampling Sample

 

Development Language: Python

Function Category

Subfolder Name

Project Name

Sample Name

Usual Counter
(For devices without sampling function)

CntDevice\

counter

Counter Sample

High-performance Counter
(For devices with sampling function)

CntSamplingDevice\

countercallback

High-performance Version Counter Callback Sample

sampling

Sampling Sample

infinite

Infinite Sampling Sample

sync

Sync Sampling Sample