FunctionMLProfileInitPLCopen motion iconPipe Network motion icon

Description

Initializes a previously created CAM Profile object for use in a PLCClosed "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 or Pipe Network CAM block. This function block is automatically called if a Profile is created in the Project Explorer, with user-defined settings then entered in the CAM Profile Properties screen.

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.

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.


  • Profile objects are normally initiated in the Project Explorer. Then you do not have to add MLCamInit function blocks to their programs. By right clicking the Profiles folder under the PLC->Motion Tree, you can select Add new profile. Parameters are entered directly in a pop-up window, and the code is then automatically added to the current project.


  • Loading a Profile Editor-generated profile into a ProfileID released by MLProfileRelease should be done with care. The MLProfileInit () function call can take in excess of 4 milliseconds to execute. Application execution is suspended during this time until the function call is completed.

Arguments

Input

ProfileID Description

ID number of a created CAM Profile

Data type

DINT

Range

[-2147483648, 2147483648]

Unit

N/A

Default

FileName Description

Filename used to save Profile on the computer's hard disk

Data type

STRING

Range

Unit

N/A

Default

InputScale Description

The input amplitude or x-axis multiplier applied to the CAM Profile

Data type

LREAL

Range

Positive

Unit

N/A

Default

OutputScale Description

The output amplitude or y-axis multiplier applied to the CAM Profile

Data type

LREAL

Range

Unit

N/A

Default

InputOffset Description

The input offset or x-axis shift applied to the CAM Profile.

Data type

LREAL

Range

Unit

N/A

Default

OutputOffset Description

The output offset or y-axis shift applied to the CAM Profile

Data type

LREAL

Range

Unit

N/A

Default

Output

Default (.Q)

Description

Returns TRUE if a new CAM Profile is initialized

See more details here.

Data type

BOOL

Unit

N/A

Return Type

BOOL

Related Functions

MLProfileCreate

MLCamInit

Example

Structured Text

 

//Initialize a previously created CAM Profile

MLProfileCreate( Profile_A , 'Profile_A.5op' , 360, 360, 0, 0 );

 

Ladder Diagram

MLProfileInit: LD example

Function Block Diagram

MLProfileInit: FBD example

Go back to the top of the page [Top]