MLProfileReleaseAn application program is limited to 256 Profile ID’s. This FB releases an existing profile ID definition so that the profile ID can be used for a different/new Profile (minimizing the risk of reaching 256 Profile ID’s). Once the existing Profile ID definition has been successfully released, the Profile ID can then be used by either MLProfileInit or MLProfileBuild to create a new Profile.
The Profile ID selected by the input parameter must not be in-use by a motion engine. In-use is defined as:
There are a number of ways to change an in-use profile to one that is not in-use (deactived):
Any profile ID created by MC_CamTblSelect from the specified ProfileID will be destroyed and need to be recreated upon completion of this FB. This means that all derived profile ID’s created by MC_CamTblSelect FB must also not be in use by the PLCopen motion engine in order 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.
For more information on how Arguments work, refer to PLCopen Function Blocks - General Rules.
| EnableEnable 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. | Description | Enable execution of the function block. Successful completion will result in a profile ID that is no longer assigned to a specific profile and can be reused for a different/new Profile. Prior to reusing this Profile ID it will need to be re-initialized by either an MLProfileInit Function call or by calling MLProfileBuild. |
| Data Type | BOOL | |
| Range | 0, 1 | |
| Unit | ||
| Default | 0 | |
| ProfileID | Description | Specify a Profile ID that has been created by MLProfileCreate. This is the profile ID that will be released so it can be reused for different/new Profiles. This Profile ID must not be in use by a motion engine. |
| Data Type | DINT | |
| Range | 1 to 256 | |
| Unit | ||
| Default | 0 |
| Done | Description | If high, Successful completion. The Profile can now be reused. |
| Data Type | BOOL | |
| Range | 0, 1 | |
| Err | Description | If high, the Function Block did not complete successfully. Reason is given in Error ID. |
| Data Type | BOOL | |
| Range | 0, 1 | |
| ErrorID | Description | Indicates the reason for the failure. See Error Codes table for possible reasons. |
| Data Type | INT | |
| Range |
| ErrorID | Description |
|---|---|
| 106 |
Invalid profile ID. Profile ID:
|
| 108 | Profile cannot be released because it is in use by the motion engine or currently selected by an active CAM block. |
//Release a Cam Profile
Inst_MLProfileRelease( Profile_A , 'Profile_A.5op');
If Inst_MLProfileRelease.Done THEN
// Do Something
ELSIF Inst_MLProfileRelease.Err THEN
// Handle Error
END_IF;
|
Copyright © 2015 Kollmorgen™ |
|