LogicalOp
Performs a logical operation on the block inputs.
Library
LogicalOperations
Description
Performs a logical operation on the block inputs.
Supported operations are : AND, OR, NAND, NOR, XOR and NOT.
if the operator is "AND", the result is TRUE if all inputs are TRUE.
if the operator is "OR", the result is TRUE if at least one input is TRUE.
if the operator is "NAND", the result is TRUE if at least one input is FALSE.
if the operator is "NOR", the result is TRUE when no inputs are TRUE.
if the operator is "XOR", the result is TRUE if an odd number of inputs are TRUE.
if the operator is "NOT", the result is TRUE if the input is FALSE.
The convention is that a value is FALSE if it is zero and is TRUE (or 1) otherwise.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
nin | Number of inputs | Number of inputs of the block. Integer value. | Number | |
rule | Operator | Logical operators supported by the LogicalOp block are : AND, OR, NAND, NOR, XOR, NOT. | String | 'AND' |
Datatype | Datatype | Defines the datatype of the input and output. | String | 'double' |
tp | Bitwise rule | If this parameter is set, operators are applied bitwise. It is only applicable to integer inputs. | Scalar | 0 |
externalActivation | External activation | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | output | 1 | |
Port 2 | explicit | input | nin | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |