MLSmpInit
Function A 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. - Initializes a sampler object.
Inputs
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Default (.Q) |
BOOL |
|
N/A |
SMP Block successfully initiated. |
Remarks
- This sampler block is used to periodically sample and place into a pipe some output of a source object.
- The sampled output can be the POSITION or SPEED of a source object measured by a resolver, an encoder Generates an output signal directly proportional to the movement of the motor shaft. This signal is fed into the control circuitry to control the shaft position and speed. The most common types are: Incremental/Serial encoders, Hall effect sensors, Resolvers, Tachometer Generators See: Optical encoders., or some other types of sensor 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).
- One or more pipes.
- It performs the function of periodically sampling the source and placing the sampled values into the pipe.
- This function block is automatically called by the Function 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.
- This function can be programmed The act of performing a sequence of instructions or commands. from within the Pipe Network block.
Right-click the block and click Properties. - To offset the Sampler Block Output Position in the Pipe Network either:
- Place a Phaser Block (and write MLPhaWritePhase in the application code).
- Place a Gear Block (and write MLGearWriteOff ) after the Sampler Block.
Use AKD Secondary Feedback |
Use AKD2G Additional Feedback |
---|---|
|
|
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//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);
See Also