Communication between the modules

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Communication between the modules

mapp Services V5.16

After a hierarchy has been created and the modules have been enabled, the modules can communicate with each other.

Commands are communicated in order to reach the states defined in the MpPackMLCore configuration. The following PackML state diagram applies in synchronized mode:

packml_diagram

The communication can be synchronous or asynchronous. By default, a module always operates in synchronous state.

In the synchronous state, the commands are always passed on from the main module to the subordinate modules. This includes commands "Stop", "Reset", "Start", "Suspend", "Unsuspend", "Hold", "Unhold" and "Clear".

If one of these commands is set for a subordinate module, it has no effect. Warning "This command is not permitted" is displayed on function block MpPackMLModule of the module.

Commands are only passed on by the main module. The modules gradually change to the next state.

After command "Start", a module changes to state "Starting". If all preparations or checks for the state have been completed, for example, the module automatically changes to the next state with the next command. Function MpPackMLStateCurrent can be used to check which state a module is in.

The possible modes can be defined under "Modes" in the MpPackMLCore configuration. It can also be defined whether an additional "StateComplete" command ("State complete required = TRUE") is necessary for a mode. This means that as soon as a module has completed all necessary steps and preparations for a state, command "StateComplete" must be started on the module. In this way, the module indicates that the current state is completed and that the next state change can be carried out.

This means that before a module can accept a command from the main module, it must first be indicated by command "StateComplete" that it is ready for the state change. By default, parameter "State complete required" is set to FALSE; this means that an additional StateComplete command is not necessary.

How communication between modules works when "State complete required = TRUE" is explained below under "State complete required = TRUE".

Example

packml_synchronized_state

Command "Reset" and command "StateComplete" must be executed for the machine unit to move from state "Stopped" to state "Idle", for example. In this way, the machine unit enters state "Resetting" and then changes to state "Idle".

Command "Reset" is started in the main module using MpPackMLModule.

If all preparations of the previous state ("Stopped") are completed, the main module is now ready to enter the next state "Resetting". Command "Reset" is started for this.

packml_communication_reset1

The command from the main module is automatically forwarded to the subordinate modules. The modules gradually change to state "Resetting".

packml_communication_reset2

The subordinate modules can now perform all necessary steps that were defined in state "Resetting". Once all preparations have been completed, the module can change to state "Idle". Command "StateComplete" is started on the individual modules for this purpose. The module switches to state "Idle".

packml_communication_statecomplete1

As soon as all module underneath the topmost module change to state "Idle", the main module also changes to state "Idle". It is important here that command StateComplete is also triggered on the topmost module. Otherwise, it does not change to state "Idle".

communication_idle2

State complete required = TRUE

In the MpPackMLCore configuration, it can be defined for a state whether an additional StateComplete command ("State complete required = TRUE") is necessary. This means that as soon as a module has completed all necessary steps and preparations for a mode or state, command "StateComplete" must be started on the module. In this way, the module indicates that the current state is completed and that the next state change can be carried out.

Example

In the example above, the machine unit is directed from state "Stopped" to state "Idle". Command "Reset" and command "StateComplete" were required for this.

Now the configuration has been defined so that an additional "StateComplete" command must be started in state "Stopped". If preparations are therefore completed in state "Stopped", command "StateComplete" can be started on the individual modules.

Modules "Infeed" and "Outfeed" ensure that the axes are switched off in the state "Stopped". As soon as the check has been successfully completed, command "StateComplete" is triggered on modules "Infeed" and "Outfeed". This indicates that the modules are ready for the next state. Command "Reset" can now be started on the main module. The machine unit now behaves exactly as described in the example above.

packml_state_complete_required

State complete required for stop = TRUE

In the MpPackMLCore configuration, it can be defined for some states whether an additional StateComplete command is necessary after a stop command ("State complete required for Stop = TRUE"). This option is configurable for the following states:

Resetting

Starting

Completing

Holding

Suspending

Unholding

Unsuspending

If the machine is in one of the states and a stop command is started, the machine does not enter state "Stopping" if an additional StateComplete command has been started on the modules. This ensures that all necessary steps and preparations for safely entering state "Stopping" have been completed on the machine.

statecompleteforstop

Example:

A machine is in state "Starting". Due to incorrectly loaded recipe parameters, production cannot start and command "Stop" is triggered. The configuration parameters have been defined in such a way that an additional StateComplete command must be used in state "Starting" in order to reach state "Stopping". If the preparations in state "Starting" are completed in order to safely reach state "Stopping", command StateComplete can thus be started on the individual modules. The modules change to state "Stopping" after command StateComplete.

statecomplete_stop_graphic

Topics in this section:

Command "Abort"

Commands "Blocked" and "Starved"

Waiting for a module

Communication in asynchronous state