FunctionMLSmpConPLCAxisPipe Network motion icon

Description

This function connects a sampler block to a specific variable from a PLCOpen Axis.

Figure 7-107: MLSmpConPLCAxis function

Arguments

Input

BlockID Description ID Name of the SMP function block in the Pipe Network
  Data type DINT
  Range [-2147483648, 2147483648]
  Unit n/a
  Default
AxisID Description Name of a declared instance of the AXIS_REF library function (for more details, Modify PLCopen Axis.)
  Data Type AXIS_REF
  Range [1,256]
  Unit n/a
  Default
Variable Description

Variable to be connected to. You need to use one of the following Internal Defines:

  • MC_ACTUAL_POSITION
  • MC_COMMAND_POSITION
  • MC_NORMAL_COMMAND_POSITION
  • MC_SUPERIMPOSED_COMMAND_POSITION
  • MC_PHASE_COMMAND_POSITION
  Data Type UINT
  Range n/a (use available macros)
  Unit n/a
  Default

Output

Default (.Q)

Description

FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. block is operational

See more details here

  Data type BOOL
  Unit n/a

Return Type

BOOL

Example

Structured Text

//Connect a Sampler pipe block named “SAMPLER” to a variable named “MC_ACTUAL_POSITION” from a PLCOpen Axis named Axis1.
MLSmpConPLCAxis( PipeNetwork.SAMPLER, Axis1, MC_ACTUAL_POSITION);

Ladder Diagram

Function Block Diagram

Go back to the top of the page [Top]