XGB EtherCAT Linear Interpolation
Linear interpolation is used to move two axes in a linear path based on the target position of both the main and sub axes. The XEM-DxxxHP CPUs can support up to 6 axes in linear interpolation. The XPM_IST function block is used to execute the linear interpolation from the Position data table.
-
The axes being controlled must already be configured using the XG-PM software before using XPM_IST.
-
XPM_ECON and XPM_SVON must be executed before any linear interpolation moves.
-
This example is in scan program LP631_LinearInterpolation_Example in OnlineHelp_ECAT_Example.

Element Name | Element Type | Description |
---|---|---|
REQ | Input | Edge detected request to execute the function block. |
BASE | Input | Base number of the motion controller. Set to 0. |
SLOT | Input | Slot number of the motion controller. Set to the slot number of the XBF-PN04B or XBF-PN08B module. |
AXIS | Input | Axis number of the main axis for the linear interpolation move. XBF-PN04B:1~4, XBF-PN08B:1~8 |
STEP | Input | Step to execute in the position table.Must be a value between 0 – 400. If value is set to 0, then the current step is executed. This can be a constant or variable. |
DONE | Output | Status that function block is done. |
STAT | Output | Current status of the function block. Non-zero numbers will be an error or warning. |
Visual Representation of Linear Interpolation Triangle

The Position table is setup in the XG-PM software.
Step | Action |
---|---|
1 |
Open the XG5000 project for the application. Go to Tools menu è Position Control to open XG-PM software.
|
2 |
Open the XG-PM project or Connect to PLC and select Project è Open from PLC.
|
3 |
Open the Position data table in the Workspace for the axis that is being configured. This example shows Axis #1.
|

-
The same step number needs to be used for both the main and sub axes.
-
Steps 10 thru 12 for Axis 1 and 2 will perform 3 linear interpolation moves to draw a triangle.
-
Axis 1 is the main axis and Axis 2 is the sub axis.
-
Axis 1 control type for steps 10 thru 12 is set to ABS, (LIN)INT for absolute linear interpolation.
-
Operation type for Steps 10 and 11 are set to SNG, CONT to continue to the next step after completion. This allows the interpolation moves to be executed with one call to XPM_IST.
-
Axis 2 control type can be default for this example.
-
Starting point is (0,0).
-
Axes must be homed before performing an absolute positioning move.
XPM_IST Code for Example 1
XG-PM Trend of Example
LP631