MLCamInit
Description
The Cam Pipe Block is used to generate motion profiles of any shape. These profiles are created and initiated separately and the shape is modified with the Cam Editor. With the Editor profiles can be changed graphically or by manually changing values in a numeric table relating input and output values with specific slopes. The Cam Editor software tool provides the capability to visualize, analyze, edit, and smooth profiles.
With the PipeNetwork (PN) Cam block:
- the Cam block’s profile is in reference to the input positions coming into the PN Cam block (Master Absolute)
- the PN Cam block output positions are in reference to PN Cam block’s output position at the end of the last cam cycle (Slave Relative)
Profile switching can be done on the fly, without losing synchronization and without dead time. In addition, the offsets and ratios of Cam Profiles can be changed on the fly. See Cam Profile Switching for more information.
-
-
CAM objects are normally created in the Pipe Network using the graphical engine. Then you do not have to add MLCamInit function blocks to their programs. Parameters are entered directly in pop-up windows, and the code is then automatically added to the current project.
Arguments
Input
BlockID | Description | ID number of a created Pipe Block |
Data type | DINT | |
Range | [-2147483648, 2147483648] | |
Unit | N/A | |
Default | CAM | |
ProfileName | Description | Name of the current profile assigned to the cam. It must be a declared profile object |
Data type | STRING | |
Range | — | |
Unit | N/A | |
Default | — | |
ModuloPosition | Description | Value of the period of the cam output values expressed in user units, for a cyclic system |
Data type | LREAL | |
Range | — | |
Unit | User unit | |
Default | 360.0 |
Output
Default (.Q) |
Description | Returns TRUE if the CAM Pipe Block is initialized See more details here. |
Data type | BOOL | |
Unit | N/A |
Return Type
BOOL
Related Functions
Example
Structured Text
//Initialize a Pipe Network block named “CAM” with a profile named “Profile_A”, set the cam modulo position to 360
CAM := MLBlkCreate( 'CAM', 'CAM' );
MLCamInit( CAM, 'Profile_A', 360.0 );
Ladder Diagram
Function Block Diagram