MLProfileRelease

PLCopen motion icon Pipe Network motion icon

 FunctionClosed 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. - Removes a Profile so the ProfileID can be used by a different or new Profile.

Inputs

Input

Data Type

Range

Unit

Default

Description

EnableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive.

BOOL

0, 1

N/A

0

Enables execution.

  • Successful completion results in a profile ID no longer assigned to a specific profile and can be reused for a different/new Profile.
  • Prior to reusing this Profile ID, it must be re-initialized by either an MLProfileInit function call or by calling MLProfileBuild.

ProfileID

DINT

1, 256

N/A

0

Specify a Profile ID that has been created by MLProfileCreate.

  • This is the profile ID released so it can be reused for a different or new Profile.
  • This Profile ID must not be in use by a motion engine.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

0, 1

N/A

If high, Successful completion.

The Profile can now be reused.

Err

BOOL

0, 1

N/A

If high, the function blockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. did not complete successfully.

Reason is given in ErrorID.

ErrorID

INT

No range

N/A

Indicates the reason for the failure.

See the Error Codes table.

Remarks

In-use Definitions

There are a number of ways to change an in-use profile to one that is not in-use (deactivated):

  • Pipe Network – Perform a MLCamSwitch on an active Pipe to a different Profile or deactivate the pipe.
  • PLCopen – Whenever the active profile move is halted or aborted, the profile is no longer in use.
    • MC_CamOut is one way of aborting the profile move.
    • Any PLCopen motion command that aborts a profile move deactivates a profile.

  • Any profile ID created by MC_CamTblSelect from the specified ProfileID is destroyed and must be recreated when this FB is completed.
    All derived profile ID’s created by the MC_CamTblSelect FB must not be in use by the PLCopen motion engine for this function to succeed.


  • 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.

Error Codes

ErrorID

Description

106

Invalid ProfileID.

This can occur if the ProfileID:

  • Does not exist.
  • Has not been created yet.
  • The ProfileID is not a profile.

108

Profile cannot be released because it is in use by the motion engine or currently selected by an active CAM block.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Release a Cam ProfileClosed The position of a slave axis is mathematically linked to the position of a master axis. 
Example: A system where two rotating drums turn at a given ratio to each other. 
A more advanced case of electronic gearing is electronic camming. 
With electronic camming, a slave axis follows a profile that is a function of the master position. 
This profile need not be linear but it must be a mathematical function.
Inst_MLProfileRelease( Profile_A , 'Profile_A.5op');

If Inst_MLProfileRelease.Done THEN
// Do Something
ELSIF Inst_MLProfileRelease.Err THEN
// Handle Error
END_IF;

See Also