serial
Short summary
Method to perform a given action on all objects inside the collection. Objects are invoked with the applier in order until the applier returns 'SUCCESS', only then the next object will be invoked. When an applier returns BUSY, foreach won't continue on the next object and returns BUSY. The order in which the appliers are invoked on the objects is defined by the iterator. If at any point the applier returns an error the serial foreach stops and returns an error.
Return: SUCCESS: if applier returned SUCCESS on every object,
ABORTED: execute has a falling edge during iterate,
BUSY: When serial had rising edge on execute and applier returned busy for last evaluated object,
IDLE: serial wasn't started yet,
ERROR: error occured during execution
- Return type: CNM_ReturnTypes.SingleExecutionState
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| execute | BOOL | control bit to start or abort the execution | input |
| applier | IApplier | the applier to be used on all objects | input |
Code
Declaration
METHOD serial :CNM_ReturnTypes.SingleExecutionState
VAR_INPUT
(*control bit to start or abort the execution*)
execute :BOOL;
(*the applier to be used on all objects*)
applier :IApplier;
END_VAR