Sample Program

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

Folder structure

The sample program folder is configured as follows in the location where API-SMC(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\SMCWDM\

     |

     |________ Sample\
     |         |
     |         |________ Inc\            Include files for each language
     |         |
     |         |________ Lib_amd64\      Library files for each language (64bit)
     |         |
     |         |________ Lib_i386\       Library files for each language (32bit)
     |         |
     |         |
     |         |________ VB\
     |         |         |________ DotNetFramework4\      Samples for Visual Basic.Net (.NET Framework)
     |         |         |________ DotNet8\               Samples for Visual Basic.Net (.NET)
     |         |
     |         |________ VC\
     |         |         |________ Vc2015\                Samples for Visual C++ (MFC)
     |         |
     |         |________ VC#\
     |         |         |________ DotNetFramework4\      Samples for Visual C# (.NET Framework)
     |         |         |________ DotNet8\               Samples for Visual C# (.NET)
     |         |
     |         |________ Python\
     |                   |________ Python3\               Samples for Python
     |
     |
     |________ 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

The following sample programs of each language other than python are prepared.

Initialization sample

Setting

It initializes it by using the initialization function.

Basic Motion Setting sample

BaseMove

The motion operation and the operation change are done by using the basic operation setting function.

Control I/O sample

CtlIo

The confirmation and the output of the control I/O signal are done by using the control signal function.

Status acquisition sample

Status

The operation status function is used, and the operation status is confirmed and Priset of the pulse.

Event sample

Event

Operation by the event is observed by using the event function.

Syhchronize sample

SyncMove

Synchronizes by using the basic operation setting function.

Bank operates sample

BankSpd

The bank (continuousness) operates by using the enhancing operation setting function.

Interpolation operation sample

BankMlt

The interpolation operation of two or more axes is done by using the enhancing operation setting function.

Circular arc interpolation operation sample

BankArc

The circular arc interpolation operation of two axes is done by using the enhancing operation setting function.

Counter latch FIFO sample

CounterLTC

Using the counter latch FIFO function, and performs counter latch FIFO operation.

Count match trigger output FIFO sample

FifoTrgOut

Using a count coincidence trigger output FIFO function, count coincidence trigger output FIFO operation is performed.

Manual pulser sample

Pulser

Use the manual pulser function, to perform a manual pulsar behavior.

The following sample programs of python language are prepared.

Initialization sample

setting

It initializes it by using the initialization function.

Basic Motion Setting sample

basemove

The motion operation and the operation change are done by using the basic operation setting function.

Control I/O sample

ctlio

The confirmation and the output of the control I/O signal are done by using the control signal function.

Status acquisition sample

status

The operation status function is used, and the operation status is confirmed and Priset of the pulse.

Syhchronize sample

syncmove

Synchronizes by using the basic operation setting function.

Bank operates sample

bankspd

The bank (continuousness) operates by using the enhancing operation setting function.

Interpolation operation sample

bankmlt

The interpolation operation of two or more axes is done by using the enhancing operation setting function.

Circular arc interpolation operation sample

bankarc

The circular arc interpolation operation of two axes is done by using the enhancing operation setting function.