Connecting your code to your process

IncentiveAPI provides a convenient, comprehensive code interface letting your software written in C#, C++ or VB.Net interact with a running instance of IncentivePLC, or directly with drives and other I/O devices via the IncentiveECAT EtherCAT master controller.

Your code directly controlling an EtherCAT network

In this example, you can be running your custom code in a Windows environment in one core of a multicore CPU system. Alternatively, you can use a vision processing application or other software, but in either case the IncentiveAPI library provides you with a convenient interface to external control and sensing devices.

A second core of the CPU is then dedicated to the IncentiveECAT EtherCAT master controller. The API sends commands via IncentiveECAT to motor drives and remote I/O, and provides any desired feedback to your application environment.

Your code interacting with an independent automation controller

Another option is to use an IncentivePLC automation controller and the IncentiveECAT EtherCAT master controller on two cores of a multicore CPU system, leaving any additional cores to run Windows-based applications and the IncentiveAPI library. With this approach, there is a high-speed automation controller directly controlling your process, while other applications (including, possibly, your own custom code) run in the Windows world.

In such a system, the IncentivePLC controller communicates natively with IncentiveECAT, but your Windows-based applications still have the ability to interact with the controller’s resources, as well as the ability to communicate directly with EtherCAT-based devices, through the use of the IncentiveAPI library.

Communication with IncentiveAPI is accomplished though two major classes of objects: Controller::Axis for motion control operations, and Controller::PLCLogic for I/O and register interaction. These are supported through a large suite of methods, for example:

  • move_at_for
  • segmove_slew_until_position
  • gear_at_in_after
  • set_master
  • get_register
  • input32

…among nearly 100 others.

Use the button below to download the Help File for IncentiveAPI, which has complete documentation for all supported methods, along with usage examples for C#, C++ and VB.Net. Note: you will need Microsoft HTML Help or a similar program to view this file.  To see the content of the help file, you may have to right click on its icon after downloading, display the file properties, and select “unblock” from the properties dialog.  If you have difficulty downloading the file due to your browser’s security restrictions, try right-clicking on the button using a desktop-based browser and saving the target file; otherwise, contact CTC for assistance.

Download our Product Guide