Overview of the APM/XPM Function Blocks

This topic explains the APM and XPM function blocks that can be use for the motion control programming.

Position Control function blocks

While you are writing a Ladder Diagram (LD) or Structured Text (ST) program, you can open the Function/Function Block window by pressing the F10 key or selecting Function/FB from the Edit pull-down menu.

APM function blocks

These are older function blocks. Only the APM_PWM function block can be used with the motion controller (XBF-PO02E or XBF-PO06E) built in the XEM CPU modules.

 

XPM function blocks

These are newer function blocks. Many of them can be used with the motion controller (XBF-PO02E or XBF-PO06E) built in the XEM CPU modules.

 

Available Function Blocks

The following APM and XPM function blocks work with the motion controller (XBF-PO02E or XBF-PO06E) built in the XEM CPU modules.

Type Function Block Description in XG5000 Function
Module information read XPM_CRD Read run info Read the current status of the axis.
XPM_SRD Read run state Read the Boolean type status of the axis and copy into arrays.
XPM_ENCRDB Read encoder value (Only XEM) Read the current value from the encoder connected to the XEM CPU module.
Parameter/Operation Data Teaching XPM_SBP Basic parameter setting Set the Basic Parameters of the axis.
XPM_SEP Extension parameter setting Set the Extended Parameters of the axis.
XPM_SMP Manual operation parameter setting Set the Manual Operation Parameters of the axis.
XPM_SIP External signal parameter settings Set the I/O Signal Parameters of the axis.
XPM_SCP Common parameter setting Set the Common Parameters of the motion controller XBF-PO02E/6E.
XPM_SMD Operation data settings Set the parameters of a step in the Position Data table of the axis.
XPM_ATEA Plural teaching Set up to 16 position/speed parameters in the Position Data table of the axis.
XPM_VRD Variable data read Read up to 128 variable data of the axis.
XPM_VWR Variable data write Set up to 128 variable data of the axis.
XPM_WRT Save parameter/run data Save the configuration parameters and position data of the selected axes into ROM.
XPM_SHP Origin return parameter setting Set the Homing Parameters of the axis.
Start/Stop XPM_ORG Origin return run Start homing according to the Homing Parameter setup.
XPM_DST Direct run Output pulses directly without using the Position Data table.
XPM_IST Indirect run Output pulses by using the Position Data table.
XPM_ELIN Ellipse interpolation Execute an ellipse interpolation with 2 axes by using the Position Data table.
XPM_SST Simultaneous run Start running the selected axes simultaneously by using the Position Data table.
XPM_PST Point run Execute up to 20 steps in the Position Data table of the axis continuously. These steps are not necessary in series.
XPM_STP Decelerating stop Stop the axis with deceleration.
XPM_EMG Emergency stop Stop the axis in the deceleration time specified in the Basic Parameter. The default deceleration time is 0.
XPM_RSTR Restart Restart the operation after the axis was stopped by the XPM_STP function block.
Manual Operation XPM_JOG Jog run Execute the JOG operation according to the Manual Operation Parameter setup.
XPM_INC Inching run Execute the inching operation according to the Manual Operation Parameter setup.
XPM_RTP Return to the position before manual run Return to the position before the manual operation (JOG or inching) started.
Synchronization Start XPM_SSP Position synchronization Execute a step in the Position Data table of the slave axis after the master axis reached the defined position.
XPM_SSS Speed synchronization Control the speed of the slave axis according to the ratio setup with the master axis.
XPM_SSSP Positioning speed sync Control the speed of the slave axis according to the ratio setup with the master axis until the slave axis reaches the defined position.
XPM_CAM CAM run Execute a predefined CAM block with the slave axis according to the movement of the master axis.
XPM_CAMO CAM run with master offset Execute a predefined CAM block with the slave axis after the master axis moved the distance defined as the offset.
Modification XPM_POR Position override Change the target position while the axis is operating.
XPM_SOR Speed override Change the speed while the axis is operating.
XPM_PSO Positioning speed override Change the speed after the axis reached the defined position.
XPM_PTV Position/Speed control conversion Switch from the position control mode to the speed control mode.
XPM_VTP Speed/Position control conversion Switch from the speed control mode to the position control mode.
XPM_VTPP Speed/Position control conversion with position Switch from the speed control mode to the position control mode and move the defined distance.
XPM_SKP Skip run Stop executing the current step in the Position Data table and move to the next step.
XPM_NMV Continuous run Move to the next step in the Position Data table without stopping.
XPM_SNS Run step number change Change the current step number of the Position Data table.
XPM_SRS Repeat step number change Change the repeat step number of the Position Data table.
XPM_PRS Current position preset Change the current position value.
XPM_EPREB Encoder value preset Change the current value of the encoder.
Error XPM_RST Error reset Reset the error.
XPM_HRST Error-history reset Reset the error history.
Other XPM_FLT Floating origin setting Set the current position as the origin.
XPM_MOF M code off Reset the M code.
APM_PWM N/A Pulse with modulation (PWM) output from an axis.

 

 

 

 

 

 

 

LP510