IncentiveAPI control via C#, C++ or VB.Net

Motion Control and I/O Control via IncentiveAPI

IncentiveAPI provides a high-level programming interface giving you complete access to interact with motion control and I/O control processes. Through this API, you can:

  • Bidirectional information exchange with a running automation program in IncentivePLC.
  • Query detailed information about any axis of motion or I/O point being controlled on an EtherCAT network via IncentiveECAT.
  • Override or directly control motion and I/O via IncentiveECAT.

Classes and methods available through this API are shown below. For full documentation, including accessible properties and programming examples in C#, C++ and VB.Net, download the IncentiveAPI help file using the link below (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).

Class Controller::Axis

Used to interact with EtherCAT Core directly.

API Connection and Resource Methods:

  • openConnection – opens a connection to the EtherCAT Master runtime
  • closeConnection – closes a connection to the EtherCAT Master runtime
  • get_drive_properties – get drive properties, reads COMMAND_EXT_RESULTS drive properties all at once versus individually
  • getResources – gets resources, num axes, and Digital/Analog channels
  • sdo_read – read an object property of a device over EtherCAT
  • sdo_write – write an object property to device over EtherCAT
  • restartEtherCAT – restart the EtherCAT network

Motion Axis Methods:

  • move_at_for() – commence a relative trapezoidal move
  • move_at_to() – commence an absolute trapezoidal move
  • move_for() – commence a triangular move
  • move_in_for() – commence a relative trapezoidal move in time requested
  • move_in_to() – commence an absolute trapezoidal move in time requested
  • move_to() – commence an absolute triangular move
  • move_trap_for – commence a relative, trapezoidal move 1/3 acc, 1/3 constant, 1/3 dec
  • move_trap_to – commence an absolute, trapezoidal move 1/3 acc, 1/3 constant, 1/3 dec
  • new_endposition – modifies the end point of an active move command to an absolute position
  • new_endposition_relative – modifies the end point of an active move command relative to current position
  • offset_position – modifies the target and feedback positions simultaneously by adding the offset to both
  • offset_position_counts – modifies the target and feedback positions simultaneously by adding the offset to both
  • offset_slave_by – offsets the position of the axis such that a correction occurs over a period of time
  • segmove_accdec_to_for – adds an acc/dec segment from the current velocity to the new velocity over some displacement
  • segmove_accdec_to_using – adds an acc/dec segment from the current velocity to the new velocity at the specified rate
  • segmove_clear – clears the specified segment table
  • segmove_slew_until_position – adds a constant velocity segment until reaching some specified absolute position
  • segmove_start_relative – starts a relative segmented move
  • segmove_stop_at – stops motion at the specified position, with a given rate
  • gear_at – changes the gear ratio of a slaved axis to the specified values
  • gear_at_in – changes the gear ratio of a slaved axis to the specified values over some number of master counts
  • gear_at_in_after – changes the gear ratio of a slaved axis to the specified values over some number of master counts
  • gear_for_in – temporarily changes the gear ratio of a slaved axis such that a slave_counts correction (offset) occurs over a master-feedback displacement of master_counts
  • gear_for_in_after – temporarily changes the gear ratio of a slaved axis such that a slave_counts correction (offset) occurs over a master-feedback displacement of master_counts
  • wait_master – waits until the specified number of master encoder counts has been generated
  • wait_slave – waits until the specified number of slave (target position) counts has been generated
  • master – feedback displacement of master_counts after certain number of counts
  • table_clear – clear the specified CAM table of all entries
  • table_continue – continues a CAM table that was stopped by the table_stop command
  • table_precompute – readies a CAM table for use by a spline/CAM motion
  • table_start – starts spline motion using the specified CAM table
  • table_start_cam – starts CAM motion using the specified table
  • table_stop – stops spline or CAM motion
  • slew_at_in – alters the current slew velocity, changing smoothly over the specified time
  • slew_begin – changes the operating mode of the axis to slewing
  • slew_end – changes the operating mode of the axis to positioning from slewing
  • slew_for – alters the current slew velocity, over time, to a slew velocity of 0.0 such that some displacement is consumed
  • set_capture() – initializes the parameters to be used for all registration captures on this axis
  • set_capwin_range – initializes a window to be monitored for valid registration captures to occur
  • wait_capture – waits for registration capture and arms the registration capture input
  • stop() – stops the axis, either quickly or at specified slew rate
  • wait_for_in_pos – wait for motion in position (inpos == 1) or timeout
  • zero_counters – zero temporary master or slave counters
  • zero_feedback_position – zeros the feedback position, but maintains the following error
  • zero_following_error – zeros the feedback position and target position, thereby removing any following error
  • zero_target_position – zeros the target position, but maintains the following error
  • drive_disable – disable the drive
  • drive_enable – enables the axis, if not already
  • dc_sync – requests DC Sync mode with the drive attached to this axis
  • _fpos – read feedback position for a specific axis
  • _tpos – Read target position for specific axis
  • set_feedback_position – sets the feedback position to the specified value
  • set_master – sets the source of the master axis encoder
  • set_mode – set desired operating mode of the axis, positioning or tracking
  • set_simulated_feedback – set simulated feedback position mode
  • set_target_position – set target position to the specified value
  • clrout – clear drive outputs
  • setout – set drive outputs to the specified value
  • pulse – pulse the specified output for the desired number of milliseconds

Shared resources when local programs are running on EtherCAT core loaded by the PLC core – Motion Sequence Blocks (MSB):

  • getVar – gets the variable
  • setVar – sets the variable to the specified value
  • set_common_bit – sets a common bit to the specified value
  • set_common_var – sets a common variable to the specified value
  • wait_common_bit – wait for a common bit to be true or false
  • wait_common_var() – wait for a common var to be a certain value or in a certain range
  • delayMSB – delays the specified milliseconds using an MSB delay loop

Class Controller::Axis::cbit

Common bit index.

Class Controller::Axis::ctr

Counter.

Class Controller::Axis::cvar

Common variable index.

Class Controller::Axis::IncentiveAxisException

Error Handler.

Methods:

  • GetBaseException – error handling
  • GetObjectData – error handling

Class Controller

Methods inherited by all child objects.

Methods:

  • Equals() – Indicates whether this instance and a specified object are equal.
  • Finalize – Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
  • GetHashCode – Returns the hash code for this instance.
  • GetType – Gets the Type of the current instance.
  • MemberwiseClone – Creates a shallow copy of the current Object.
  • ToString – Returns the fully qualified type name of this instance.

Class Controller::PLCLogic

Access to PLC core (QuickBuilder) controller registers.

Methods:

  • closeConnection – closes an open connection to the PLC runtime
  • openConnection – opens a connection to the PLC runtime for register access
  • getRegister – reads a PLC register value
  • getResources – gets PLC resources
  • getSymbol – gets symbol information from QuickBuilder program
  • getSymbolTableCount – gets the QuickBuilder program symbol table count
  • getvector – gets the requested vector table block from the PLC
  • input – read a PLC input
  • input16 – read a block of 16 PLC inputs
  • input32 – read a block of 32 PLC inputs
  • output – read a PLC output
  • output – writes a PLC output or block of outputs
  • output16 – read a block of 16 PLC outputs
  • output32 – read a block of 32 PLC outputs
  • loadSymbols – loads all the symbols from the currently active QuickBuilder program
  • maxLimitforBlockType – get maximum Variant Block Storage size available for transfer
  • putRegister – writes a PLC register value
  • restartController – restart the PLC and EtherCAT program
  • shutdownQuickBuilder – shuts down a QuickBuilder program and removes it from memory

Class Controller::PLCLogic::IncentivePLCException

Error Handler.

Methods:

  • GetBaseException – error handling
  • GetObjectData – error handling

Class Controller::PLCLogic::SimpleStringComparer

Binary search comparison for PLC symbols.

Class Controller::Symbol

QuickBuilder symbol structure stored within a running program.

Class Variant

Define the different data types and limitations.

Download our Product Guide