FunctionMLSmpInitPipe Network motion icon

Description

The purpose of the sampler block is to periodically sample and place into a pipe some output of a source object. The sampled output can typically be the POSITION or SPEED of a source object measured by a resolver, an encoder or some other types of sensorA sensor is a type of transducer that converts one type of energy into another for various purposes including measurement or information transfer.

The sampler implements the logical connection between an encoder on a physical master axis (the source object) and one or more pipes and performs the function of periodically sampling the source and placing the sampled values into the pipe.

This function block is automatically called by the FunctionA 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. PipeNetwork(MLPN_CREATE_OBJECTS) if a Smp Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.

The Smp Pipe Block is assigned a Name, SAMPLING_PERIOD, MODE, INPUT_VALUE_PERIOD and OUTPUT_VALUE_PERIOD.

Using AKD Secondary Feedback

The Sampler can be connected to the secondary feedback on the AKD using MLSmpConPNAxis. The scaling for the AKD Secondary Feedback is setup using AKD Parameters: DRV.HANDWHEEL and FB2.ENCRES . The feedback signal comes through Ethercat in object 0x2050.

The scaling for this position signal is 0 to 4294967296 = 0 to FB2.ENCRES. Object 0x2050 rollovers to 0 when reaching 4294967296. One way to handle this rollover is in the Sampler block setup parameters set up INPUT_MODULO_POSITION for LREAL#4294967296 and OUTPUT_MODULO_POSITION to the modulo of the application.

Place a Phaser Block (and write MLPhaWritePhase in the application code) or Gear Block (and write MLGearWriteOff ) after the Sampler Block to offset the Sampler Block Output Position in the pipe Network.

Related Function Blocks

MLSmpConnect, MLSmpConECAT, MLSmpConPLCAxis, MLSmpConPNAxis

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
SamplingPeriod Description period that the device is sampled
  Data type LREAL
  Range 0.25 to ?
  Unit millisecond
  Default 1.0
Mode Description Sampled output can be either position or velocity
  Data type DINT
  Range [1 , 2] Position or Speed
  Unit n/a
  Default position
InputModuloPosition Description Period of the input signal. This should be set equal to 232 (4294967296).
  Data type LREAL
  Range
  Unit User unit
  Default 360.0
OutputModuloPosition Description Period of the output signal
  Data type LREAL
  Range
  Unit User unit
  Default 360.0

Output

Default (.Q)

Description Smp Block successfully initiated

See more details here

  Data type BOOL
  Unit n/a

Example

Structured Text

//Initialize  a Sampler Pipe Block named “EncoderMaster1” to a Sample Period of 1 millisec, Mode of Operation to 2(Velocity), Input Modulo of 4294967296, and Output Modulo of 720
MLSmpInit( PipeNetwork.EncoderMaster1, 1.0,2,4294967296,720);

Ladder Diagram

MLSmpInit: LD example

Function Block Diagram

MLSmpInit: FBD example

Go back to the top of the page [Top]

 


Stay Connected with Kollmorgen

Copyright © 2015 Kollmorgen™