Common Behaviour Model Library Documentation¶
- Company
3S - Smart Software Solutions GmbH
- Title
Common Behaviour Model
- Version
3.5.15.0
- Categories
Intern
- Namespace
CBML
- Author
3S - Smart Software Solutions GmbH
- Placeholder
CBML
Description 1¶
This library contains a full implementation of the Common Behaviour Model as an object-oriented CODESYS library. The function block BehaviourModel implements everything expected from a BehaviourModel in a centralized manner.
This implementation is parameterized with, among other things, an IActionProvider instance. An ActionProvider implements the operations for the methods IStartActionProvider.StartAction (METH), ICyclicActionProvider.CyclicAction (METH), ICleanupActionProvider.CleanupAction (METH) or the IResetActionProvider.ResetAction (METH). Depending on the required behaviour the ActionProvider can be decorated with a decorator such as ILevelControlled or IEdgeTriggered. For example, in order to build a function block with a LConC behaviour, its ActionProvider has to be decorated with the Interfaces ILevelControlled and IHasContinuousBehaviour. The StateMachine in the BehaviourModel then forces the ActionProvider to the appropriate LConC behaviour. In this case, STATE.EXECUTING can only be left through STATE.ABORTED or STATE.ERROR. STATE.DONE is not accessible.
Furthermore the function block BehaviourModel implements the interface IBehaviourModel. This interface provides
all methods and properties which are necessary for controlling a BehaviourModel instance via interface reference
variables. When operating via an interface reference variable it should be possible to decide exactly when the state
machine is called.
For this purpose the methods BehaviourModel.StartModel (METH), BehaviourModel.AbortModel (METH), BehaviourModel.ResetModel (METH)
and BehaviourModel.GetModelState (METH) have the parameter xCommit
.
Calling one of these methods with the value xCommit:=FALSE
will only prepare the state changes and will not trigger
the StateMachine to execute the related actions for changing the state. Calling one of these methods with the value
xCommit:=TRUE
will prepare the state changes and will then trigger the StateMachine to execute the necessary action
in order to reach the next stable state. Sometimes the StateMachine needs more than one invocation to transit from
one state to the next stable state. It is really important to retrieve the StateMachine only once per cycle.
The function blocks ETrig, LCon and LConC each use a BehaviourModel instance. They also implement the
interface IBehaviourModel.
They define an own FB-Interface while delegating as much as possible to the implementation of the BehaviourModel
(See the corresponding _Execute
method).
These function blocks then serve as basis for the inheritance of the function blocks ETrigA, ETrigATl, ETrigATo, ETRigATlTo, ETrigTlTo, ETRigTo, ETRigTl originating from ETrig, the function blocks LConTl, LConTo, LConTlTo originating from LCon and the function block LConTlC originating from LConC.
The implementation of an IActionController can influence the conditions under which the BehaviourModel is allowed to execute the methods IStartActionProvider.StartAction, ICyclicActionProvider.CyclicAction, ICleanupActionProvider.CleanupAction, IExitActionProvider.ExitAction or IResetActionProvider.ResetAction of the corresponding IActionProvider.
Contents:¶
Indices and tables¶
- 1
- Based on CommonBehaviourModel.library, last modified 24.07.2019, 08:35:48. LibDoc 4.4.0.0-b.27The content file CommonBehaviourModel.clean.json was generated with CODESYS V3.5 SP15 on 24.07.2019, 08:36:00.