General Information

Library Overview

The library provides components to facilitate the implementation of an application based on the PackML standard. The names and structure of the data types provided in this library correspond to the definitions in ANSI/ISA TR88.00.02-2015.

Characteristics of the Library

Characteristic

Value

Library title

PackML

Company

Schneider Electric

Category

Application > Solution > Packaging

Component

Packaging

(Application Libraries and Templates > Packaging)

Default namespace

PackML

Language model attribute

qualified-access-only

Forward compatible library

Yes (FCL)

NOTE: For this library, qualified-access-only is set. The POUs, data structures, enumerations, and constants must be accessed using the namespace of the library. The default namespace of the library is PackML.

Example Project

In conjunction with the library, the example project PackMLExample.project is provided. The example project demonstrates how to implement the components from the PackML library.

Your specific application requirements may be different from those assumed for any related examples, templates or architectures described herein. In that case, you will have to adapt the information provided in this and other related documents to your particular needs. To do so, you will need to consult the specific product documentation of the hardware and/or software components that you may add or substitute for any information specified in this documentation. Pay particular attention and conform to any safety information, different electrical requirements and normative standards that would apply to your adaptation.

Warning_Color.gifWARNING

REGULATORY INCOMPATIBILITY

Be sure that all equipment applied and systems designed comply with all applicable local, regional and national regulations and standards.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

Step

Action

Comment

1

In the EcoStruxure Machine Expert Logic Builder, execute the command New Project.

2

In the New Project dialog box, select From Example from the Project type list.

3

On the right-hand side of the New Project dialog box, select All from the Controller list.

Result: Available examples are listed in the Matching Examples text box.

4

Select your example from the Matching Examples list.

5

Enter a name for the new project, and select the file location.

6

Click the OK button.

Result: A new project is created based on the selected example.

Overview of the POUs

The library contains the following function blocks and functions:

Function block / function

Use

FB_DataManagement

Records time and production information.

FB_ModeManager

Verifies whether a change of operation mode is possible within the active state and performs consistency verifications on the definition of operation modes.

FB_VisController

Processes data provided by the administration tags and status tags and provides these to the visualization frames via the visualization interface input/output iq_stVisInterface of type ST_VisInterface.

FC_CheckCmd

Verifies whether the given command can be accepted in the present state (according to the given operation mode definition). If so, it also returns the target state of the transition triggered by that command.

FC_InitStateModelChangeStates

Initializes in which states a change of operation mode is permitted for an operation mode.

FC_InitStateModelExistingStates

Initializes which states exist for an operation mode.

FC_SetAlarm

Writes alarm messages into the administration tags Admin.Alarm[#] and Admin.AlarmHistory[#].

FC_SetWarning

Writes advisory messages into the administration tag Admin.Warning[#].

FC_GetDateTimeAsArray

Obtains the real-time clock (RTC) of the controller and converts it to the data type DateTimeArray.

Overview of the Enumerations

Enumeration

Use

ET_Cmd

Contains the commands to change the state within a given operation mode. Commands are used to transition from a Wait state to other states (for example, the Start command). Additionally, the commands Stop and Abort can be issued during any state (refer to the State Model Diagram).

ET_Modes

Contains predefined operation modes (for example, Producing).

ET_Result

Contains the possible values that indicate the result of operations executed by the function block.

ET_States

Contains the possible states of which an operation mode can be comprised.

Overview of the Structures

Structure

Use

ST_Administration

Provides the variables/tags which contain OEE (Overall Equipment Effectiveness) data (for example, downtime, reasons for downtime, etc). Furthermore production information can be provided by this variable (for example, alarm and state information).

ST_Command

Provides the variables which mainly represent the control interface. By using these tags, operation modes can be selected, state transitions can be forced, and recipes as well as formats can be transmitted.

ST_InitAlarm

Provides information to set an alarm message in the function FC_SetAlarm.

ST_UnitModeDefinition

Provides information to initialize the operation modes in the function block FB_ModeManager.

ST_Status

Provides the variables which contain status information (such as which operation mode is active, which state is active, etc).

ST_VisInterface

Structure for visualization.

ST_Alarm

Provides the machine diagnostic message number.

ST_CountDescrip

Provides the ID and parameter of count products.

ST_Descriptor

Provides information of the parameter (id, name, unit, and value).

ST_Ingredient

Provides ID and parameter of ingredient

ST_Interface

Provides information about the downstream (subsequent) PackML machine.

ST_Product

Provides information about a product.

ST_StateInfo

Provides the information whether the state exists and whether a change of operation mode is possible. The information is used to initialize the operation mode manager.

ST_Timestamp

Provides the date and time.

Overview of the Frames

Background frames

The FR_<BackgroundFrame> visualization frames (for example, FR_Control1024x768) are frames in the background to group the other frames, and to realize control and navigation functionalities.

Frame

FR_Control1024x768

FR_Nav1024x768

FR_NavControl1024x768

FR_Control800x600

FR_Nav800x600

FR_NavControl800x600

State frames

The FR_<State> visualization frames (for example, FR_Stopped) are frames for each state of a model.

The frames are used by the FR_DynStateModel to display the single states of the state model for operation modes.

Frame

FR_Aborted

FR_Aborting

FR_Clearing

FR_Complete

FR_Completing

FR_Execute

FR_Held

FR_Holding

FR_Idle

FR_Resetting

FR_Starting

FR_Stopped

FR_Stopping

FR_Suspended

FR_Suspending

FR_UnHolding

FR_UnSuspending

Visualization frames

In addition to the individual tags, functions, and function blocks, the library contains some visualization frames, which dynamically generate an appropriate state model for the operation mode during online operation or display OEE (Overall Equipment Effectiveness) data.

Frame

Use

FR_Alarm

Displays an alarm list of the active alarms.

FR_AlarmHistory

Displays the alarm history.

FR_CurrentModeAndStateTime

Displays the time the machine has been running in the present operation mode/state.

FR_DynStateModel

Dynamically displays the visualization of the state model during online operation.

FR_ModeAndStateTime

Displays the operation time of the operation modes and their respective states.

FR_ProdConsumedCount

Displays the product counters of the consumables.

FR_ProdDefectiveCount

Displays the product counters of the goods detected as not acceptable.

FR_ProdProcessedCount

Displays the product counters of the produced goods.

FR_Warning

Displays a list of the active advisories.

FR_StopReason

Displays the PackTag Admin.StopReason.

FR_StatesDisabled

Monitors and controls the PackTag Admin.StatesDisabled.