Use Motion Function Block for Pipe Network

Use motion library function blocks in your PLCClosed"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events application program to interface to the Pipe Network (to see the procedure Design Motion with Pipe Network).

ML function blocks are used to:

  1. Create and initialize the Pipe Network
  2. Perform motion at a single-axis or multi-axis level
  3. Read information from points in the Pipe Network

    For example:

    • Read a high-speed input position from a Trigger Pipe Block
    • Read Command or Reference position from an Axis Pipe Block
    • Determine when a position has been reached in a Comparator Pipe Block
  4. Modify how the blocks work in the Pipe Network

    For example:

    • Change the phase offset of Phaser Pipe Block
    • Change the amplitude or offset of a CAM profile
    • Change the speed of a Master Pipe Block

Buffer Mode 

With the Pipe Network engine, when a motion function block is executed while another one is presently executing, there is an immediate change. That means the previous function block is aborted and the new one immediately becomes the active move and begins executing.

Motion Init

During initialization, the IECClosed"International Electrotechnical Commission" IEC is a not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies 61131-3 application can create (by means of the MLMotionInit function) the different motion objects it needs (pipes, blocks, axes):

  • Pipe Create
  • Profile Create

  • When the state machine leaves the Init state, the creation of new motion objects is no longer allowed, in order to avoid memory allocation problems while running the application.

Motion Start

The Start method (MLMotionStart function) initializes the motion engine, motion bus driver, and initializes EtherCATClosed***EtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs network to operational mode. MLMotionStopbus driver deactivates the execution of the motion engine.

The function blocks MLMotionStart, MLMotionStop and MLMotionRstErr can be used by the IEC 61131-3 applications to navigate between states: i.e. Not initialized, Running, Stopped and Error.

Using the Q output of ML Function Blocks for the Pipe Network

There is a Q output on most ML function blocks. The operation of the Q output is different for different ML function blocks. The Q output can be useful in PLC application programs.

Examples:

  • MLAxisRel.Q is set when function block successfully executes
  • MLAxisStop.Q is set when motion is stopped (zero speed)
  • MLPrfWriteIOffset.Q is set if cam offset has been changed to the new value

For more details on Q output, refer to What is the difference between Q and OK?

To access the functions that manage the Pipe Network, refer to Motion Library - Pipe Network