MLTrigReadPos
Function - Returns the position of the block at the moment when it was triggered.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
BlockID |
DINT |
-2147483648 to 2147483647 |
N/A |
No default |
ID number of an initiated Trigger object. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Position |
LREAL |
No range |
User units |
Returns the position of the selected block's Axis at the moment when it was triggered. |
Remarks
-
-
This function or function block returns cached data.
See Program a Multi-Core Controller.
- Returns the modulo-applied position of the pipe at the moment it is triggered by the Trigger Block's selected Fast Input.
- This value is only valid when TrigIsTrigged() returns TRUE.
- The Trigger block extrapolates the output value based on the timestamp of the Fast Input event to provide an accurate position even if the event occurs in the middle of a program cycle.
- Once triggered, a block has to be reset before it can be triggered again.
- Modulo Calculation: MLTrigReadPos uses the Output Modulo Position value of the previous block in the pipe, even if the previous pipe is configured for No Modulo mode.
- The previous block must specify a 0 (zero) value for Output Modulo Position before setting the Mode to No Modulo to prevent a modulo operation for MLTrigReadPosPipe.
- Previous Function Name: MLTrigGetPos
Fast Homing - Inputs
See these topics for more information:
- Fast Homing Example with the Pipe Network Motion Engine Axis Pipe Block
- Fast Homing Example with the PLCopen Motion Engine
- Fast Inputs with Pipe Network Motion
- Pipe Network Registration and Fast Homing
- Registration Position Capture Example with Pipe Network Trigger Block
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//Save position of Axis when Fast Input event occurs
Trig_Position := MLTrigReadPos( PipeNetwork.TRIGGER );
See Also