Master_StateMachine_Internal function block inputs

In "PRG_AFW.Main", the "Master_StateMachine_Internal" is called and the inputs and outputs are assigned. Inputs are assigned directly to digital input modules to which push buttons are connected. They create a simple user interface for the machine. As an alternative, the inputs can be assigned to process data inputs that create an interface to a master PLC via a fieldbus.

xEnable

To activate the FB, set the xEnable input to TRUE.

eMode

The eMode input can have the values production (1), maintenance (2), and manual (3). The machine module can be extended by additional modes.

xStart

xStart triggers the PackML command "reset", which runs through the sequence of steps "resetting", "idle", and "starting" to "execute".

xCycleStop

xCycleStop is only active in "production" mode. In "production" mode, the "completing" state is activated, which performs a controlled stop. The sequence is moved to a safe position and waits for further instructions.

xStop

xStop triggers the PackML command "stop" and sets the machine to "stopping" state.

xEstop

xEstop triggers the PackML command "abort" and sets the machine to "aborting" state.

xAcknowledge

xAcknowledge triggers the PackML command "clear" and sets the "aborted" state to "clearing" state and finally to "stopped" state.

stExtMonitor

If this input is not used, it remains unassigned. This function is then not available.

stExtMonitor is the structure with all relevant data for the external HMI. The structure of the same type can be used for an external monitor. If the inputs are used directly at "FB_Master_State- Machine_Internal", these values are copied to a third structure of the same type. This has the advantage that the machine module program always works with the internal _stFB.

If the internal monitor is active, the inputs of the internal monitor are used. In this case, the internal variable _stMonitor.xMonitorControl = TRUE.

If the internal monitor is not active but values are available from an external monitor, these values are used. In this case, the internal variable _stMonitor.xMonitorControl = FALSE and the global variable GVL_Visu.stExtMonitor.xMonitorControl = TRUE.

If neither the internal nor the external monitor are active, the inputs are used directly on the fbMasterStateMachine. In this case, the internal variable _stMonitor.xMonitorControl = FALSE and the global variable GVL_Visu.stExtMonitor.xMonitorControl = FALSE.