Packaging machine

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Packaging machine

mapp Services V5.16

In the following use case, mapp PackML is used in the standalone mode.

Requirement

A packaging machine is part of a complete production line. It is important that all machines taking part in the line can forward necessary information to the operator or shift supervisor in a standardized form. This should be achieved by using the OMAC PackML standard. For this reason, we will use the MpPackML mapp component.

Solution

Component list

MpPackMLCore (own MpLink): Central PackML core

MpPackMLMode (MpLink from MpPackMLCore): Controls the PackML mode, in this case the production mode

MpPackMLMode (MpLink from MpPackMLCore): Controls the PackML mode, in this case the maintenance mode

Connection diagram

mppackmlusecase_1

 

 

Using the mapp components

The machine is controlled using various modes. The MpPackMLCore component is the system core that manages the transitions between the modes. The following modes are needed for the packaging machine:

Production: This mode is running while the machine, as part of the entire production line, is packaging products. All processes are automated.

Maintenance: This mode is running while the machine is being serviced.. The mechanical components of the machine can be controlled individually.

Each mode has its own state machine. For example, the machine can be put into the Execution state in Production mode, which means that products are being packaged. Another state is Complete. Here the last products are packaged after the machine has stopped.

The MpLink of the core and a unique ID (number) must be assigned to the MpPackMLMode component. The mode can then be enabled and the state changed in the PackML state model using standard commands.

Helpful tips

Define expressive names

mppackmlusecase_1_webxs_naming

 

 

When searching for errors with WebXs, it will become clear why good naming conventions are advantageous:

The core receives its name from MpLink.

The mode receives its name from the function block instance.

One program for the core and two additional programs for the modes:

mppackmlusecase_1_structure

 

 

This structure allows easy error localization. Within the program, the user can link function block MpPackMLMode instance with the corresponding control signals for machine operation.

MpPackMLMode only accepts commands if the mode is active. This makes managing the control logic much easier.

mppackmlusecase_1_webxs_statecontrol

 

 

One ACTION call for each state in the mode program

mppackmlusecase_1_webxs_actions

 

 

This practice helps in error localization and organizes the program code belonging to the individual mode states:

The number of programs in the software configuration remains manageable.

Possible to use local variables for the current mode

An ACTION can also be added as a reference to existing files. This can be useful if the same code should be used in several modes, e.g. resetting, clearing, etc.

mppackmlusecase_1_miniprograms_

 

 

The code within the ACTION can be written as follows:

mppackmlusecase_1_webxs_action

 

 

The ACTION is called in one cycle and the user code is only executed if the state is actually active. A state machine within the mode state is useful and advantageous for structured programming.

There are two ways out of this state:

Finished state: Calls function MpPackMLStateComplete(...)

Abort: Calls function MpPackMLAbort(…)

ModeID can be set to ALL_MODES (0) if the code should be used by several modes (this ensures modularity):

mppackmlusecase_1_webxs_allmodes