Placeholder Mechanism

Overview

A placeholder in the Library Manager is a reference to a definite library version. Placeholders simplify the maintenance of library hierarchies.

In EcoStruxure Machine Expert, define placeholders at the following locations:

  • Device description: Depending on the runtime system version (for device-specific libraries).

  • Library profile: Depending on the compiler version.

  • Application: Depending on the Placeholders dialog box in the Library Manager.

Consequent usage of placeholders allows you to modify libraries at a lower level of the dependencies hierarchy (such as updates or bug-fixing) and avoids the need to adapt libraries of the higher levels or to adapt the device descriptions.

The search order for the placeholder resolution is (highest priority first):

  1. Placeholders dialog box

  2. Device description

  3. Library profile

Configure the resolution of a placeholder in the Placeholders dialog box.

 WARNING
UNINTENDED EQUIPMENT OPERATION
  • Verify whether the versions of the libraries contained in your program are correct after updating the software.
  • Verify whether the versions of the updated libraries are consistent with your application specifications.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: The placeholders are defined by the controller versions. When you create a new library, there is no placeholder defined by the controller versions for this new library. The placeholder mechanism cannot be used when adding this custom library to the device library manager.
NOTE: Library names and placeholder references are case-sensitive.

Example

Precondition: The placeholder SysLib is defined and resolved in the device description of different devices.

Device description defining placeholder SysLib

Resolution of placeholder SysLib

Device A (V1.0.0.0)

SysLibA (V1.0.0.0)

Device A (V1.0.1.0)

SysLibA (V1.0.1.0)

Device B (V2.1.0.0)

SysLibB (V1.0.0.0)

Device B (V2.2.0.0)

SysLibB (V1.0.1.0)

Using the placeholder SysLib in an application:

In your application, you have added the placeholder SysLib to the Library Manager.

If...

Then...

If device A with version V1.0.0.0 is implemented in your application.

Then the library SysLibA with version V1.0.0.0 is referenced in the Library Manager because the placeholder Syslib is resolved by the device description of device A.

If device B with version V2.2.0.0 is implemented in your application.

Then the library SysLibB with version V1.0.1.0 is referenced in the Library Manager because the placeholder Syslib is resolved by the device description of device B.

If neither device A nor device B are implemented in your application.

Then the placeholder is not resolved by a device.

In this case, perform the placeholder resolution in the Placeholders dialog box in the Library Manager.

Using the placeholder SysLib in another library:

In your library project, you have added the placeholder SysLib to the Library Manager. The placeholder is not resolved in the library project because the library project does not contain devices. Therefore, when adding the library by placeholder, you have to define the library which shall be resolved by this placeholder within the Placeholder tab in the Add Library dialog box (default library selection) of the Library Manager. Later, when the library is used in an application, the placeholder will be resolved as described in the preceding paragraph. The definition of the placeholder resolution is exclusively valid for the library project itself.