AbstractModeNode
Short Summary
This FB is a extention of the AbstractNode, which implements the Hierarchical Composition Pattern, designed to create flexible, extensible, and dynamically configurable node-based systems. This implementation provides a robust framework for creating tree-like structures with mode and signal propagation from the root node to the end nodes.
This node type provides operation modes as methods. The active operation mode will propagated as a mode delegate through the tree.
This node type comes with a cycle manager instance. The cycle manager (THIS^.cycleManager) can be used for mode sequence handling. Attention: The cycle manager is called and updated automatically. Only use the provided properties and methods. Don't call it additionally because this can lead to unexpedted behaviour as it evaluates the edges of control signals!
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| Yes | No | AbstractNode | CNM_OpModeHandlingInterfaces.IOpModes, CNM_OpModeHandlingInterfaces.IModeNode |
UML Diagram
Parameters
none
Properties
className
Type: CNM_AbstractObject.ClassName
This abstract property returns the class name of the concrete object,…
isEmpty
Type: BOOL
This property indicates that a node or subunit is empty (no parts are physically present). It is used for the HMI connection.…
Methods
enterNewMode
- Return type:
VOID
This method will be called once after a new mode was started. The method is called for exactly one cycle and…
exitCurrentMode
- Return type:
VOID
This method will be called once after a mdoe was finished (stopped). The method is called for exactly one cycle and…
handleMode
- Parameters:
execute(BOOL)pause(BOOL)mode(CNM_OpModeHandlingInterfaces.IModeBehaviour)
- Return type:
VOID
This method manages the operation of a mode, handling the execution and pausing states, while coordinating with subnodes and evaluating their states. It ensures the selected mode is active and updates the node's state based on the subnodes and its own operation.…
manageEntryExit
- Parameters:
execute(BOOL)mode(CNM_OpModeHandlingInterfaces.IModeBehaviour)
- Return type:
VOID
This method monitors the execute flag of the current operation mode.…
monitorAndUpdate
- Return type:
VOID
This method can be used for cylcically monitoring and update tasks for the node.…
overwriteMode
- Parameters:
mode(CNM_OpModeHandlingInterfaces.IModeBehaviour)
- Return type: CNM_ReturnTypes.SingleExecutionResult
This method allows the overwrite of the current mode state with a new mode, provided the current mode state is in IDLE or SUCCESS status,…
resetLocalModes
- Return type: CNM_ReturnTypes.SingleExecutionResult
This method cleares overwritten modes for a node and all of its subnodes.…
runAutomatic
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the automatic mode. It has to be overwritten for every node.…
runChangeOver
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_OpModeHandlingInterfaces.CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for product type/variant changeover.…
runCleanUp
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the clean up mode.…
runGhostMode
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the ghost mode.…
runReferencing
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the referencing mode.…
runService
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the service mode.…
runSimulated
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method simulates a node/unit/machine without physical movements, but with all data handling, e.g. handshakes between units, communication with production systems, loading of data.…
Abstract methods
disable
- Parameters:
execute(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method disables a node. It can take mutliple cycles. It has to be implemented for every node/device.…
enable
- Parameters:
execute(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method enables a node. It can take mutliple cycles. It has to be implemented for every node/device.…
initialize
- Parameters:
execute(BOOL)
- Return type: CNM_OpModeHandlingInterfaces.CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the init mode.…
runHoming
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method contains instructions and sequences for the homing mode. It has to be overwritten for every node.…
runManual
- Parameters:
execute(BOOL)pause(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method executes manual commands. It has to be overwritten for every node.…
stopImmediate
- Parameters:
execute(BOOL)
- Return type: CNM_ReturnTypes.SingleExecutionState
This method executes stops all movements of a node. It has to be overwritten for every node.…
Code
Declaration
FUNCTION_BLOCK ABSTRACT AbstractModeNode EXTENDS AbstractNode IMPLEMENTS CNM_OpModeHandlingInterfaces.IOpModes, CNM_OpModeHandlingInterfaces.IModeNode
VAR
(* a cyclemanager that can be used in mode sequences and commands.
Attention: It will be called automatically! Just configure it in your INIT steps *)
cycleManager :NodeCycleManager(THIS^);
(* the node list with the subnodes, will be generated when the first subnode requests registration *)
{attibute 'hide'}
modeOverwrite :CNM_OpModeHandlingInterfaces.IModeBehaviour;
END_VAR