<< Click to Display Table of Contents >> Navigation: »No topics above this level« Description |
mapp Services V5.16
The function block uses the MpLink from a MpPackMLModule configuration.
MpPackMLModule can be used to control a module. This function block can only be used in synchronized mode.
Blocked / Starved
Command "Blocked" or "Starved" can only be used in state "Execute". If the machine unit is in another state, command "Blocked" or "Starved" is not taken into account.
A machine unit has an input and output module by default. If the output module no longer forwards any products because it is blocked, command "Blocked" can be used. If the input module does not receive any products for further processing, command "Starved" can be started. These signals are passed on to the main module so that production can be interrupted and the cause of error can be located.
For information about how to use these two commands correctly, see section Commands "Blocked" and "Starved".
Input "Parameters" can be used to specify whether the module operates in synchronous or asynchronous state.
By default, all parameters are set to TRUE, which means the modules are operating in synchronous state. The modules communicate automatically with each other and can accept or trigger commands.
If one of the parameters is set to FALSE, the module operates in asynchronous state. The degree of the asynchronous state depends on which and how many parameters have been set to FALSE. For more information, see section Communication between the modules.
By using "Update = TRUE", the changed parameters can be updated.
Input parameter "Commands" can be used to start commands such as "Clear", "Hold", etc. on the module. Whether the commands are executed depends on whether it is the main module in the hierarchy. For information about how the communication between the modules works, see here.
The Info structure provides additional information about the module. The current mode that is stored in the machine unit is displayed. Possible modes are defined in the MpPackMLCore configuration. These include "Manual" or "Automatic", for example.
The current state of the module ("StateCurrent") is also displayed. This can be "Hold", "Stopped", etc., for example. The level indicates at which level the module is located in the hierarchy. The main module has level 0 and the number is increased by 1 per subordinate level. For more information, see section Creating a hierarchy.
"ChildCount" is used to display how many modules are located in the level directly below. If there are no subordinate modules, 0 is displayed. If the module is in the disabled state, the number of subordinate modules is still displayed. Information about the higher-level module is available via structure MpPackMLParentType. If the module is the main module, the default values are displayed in the structure.
The sub-state can be used to execute further steps/sequences within a state.
Input parameter "StateInfo" can be used to describe the changing (sub-)state.
Example:
If the machine unit is in state "Resetting", the machine unit can execute various steps within this state. These include switching on and referencing an axis, for example. The sub-state ("SubState") can be used for these individual tasks. Input parameter "StateInfo" can be used so that the user knows exactly what happens in the individual sub-states since the sub-state is only specified numerically.
CASE MpPackMLModule_0.StateCurrent OF
mpPACKML_STATE_RESETTING:
CASE MpPackMLModule_0.SubState OF
0:
MpPackMLModule_0.StateInfo := 'waiting for axis to be powered on';
MpAxisBasic_0.Power := TRUE;
IF MpAxisBasic_0.PowerOn Then
MpPackMLModule_0.SubState := 10;
END_IF
10:
MpPackMLModule_0.StateInfo := 'waiting for axis to be homed';
IF NOT MpAxisBasic_0.IsHomed THEN
AxisParameter.Home.Mode := mpAXIS_HOME_MODE_REF_PULSE;
MpAxisBasic_0.Home := TRUE;
ELSE
MpAxisBasic_0.Home := FALSE;
MpPackMLModule_0.Command.StateComplete := TRUE;
END_IF
END_CASE
...
In this case, an axis is switched on in sub-state 0 and the axis is referenced in the next sub-state. This is also explained via "StateInfo".
After all sub-states have been executed and the machine changes to the next state (e.g. "Idle"), the value of "SubState" is automatically set to 0. The user does not have to worry about resetting "SubState".