MLTrigInit
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 Trigger object for use in a PLC "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 program.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
BlockID |
DINT |
-2147483648 to 2147483647 |
N/A |
No default |
ID number of an initiated Trigger object. |
Input_Axis |
STRING |
No range |
N/A |
No default |
|
InputID |
DINT |
-2147483648 to 2147483647 |
N/A |
No default |
ID number of the Fast Input. InputID INT Range = 0, 1
|
EdgeID |
DINT |
0, 2 |
N/A |
The edge to trigger on.
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Default (.Q) |
BOOL |
No range |
N/A |
Returns TRUE if the function block is executed. See Pipe Network - General Rules for more information. |
Remarks
- This function block is automatically called if a Trigger Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.
- The Trigger object monitors a selected Fast Input and captures the time of a rising or falling edge event.
- With the time and pipe position information, the Trigger object extrapolates the axis position when the Fast Input event occurred.
- Parameters to enter include:
- The name of the Pipe Block.
- The Axis where the Fast Input is located.
- The number of the desired Fast Input.
- Whether to trigger on the rising or falling edge of the input.
-
-
Trigger objects are normally created in the Pipe Network using the graphical engine.
You do not have to add MLTrigInit function blocks to their programs.
Parameters are entered directly in pop-up windows and the code is automatically added to the current project.
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
//Create and Initiate a Trigger Pipe Block named “Trigger” and set it up to receive the trigger signal from Axis1, capture engine 0, and the rising edge of the signal
TRIGGER := MLBlkCreate( 'TRIGGER', 'TRIGGER' );
MLTrigInit( TRIGGER, 'Axis1', 0, 1 );
See Also