Digital OR
Description
This object is being used to form a 'Digital OR' between two messages in an app.
App Builder Object
Source Code
function execute() {
for (let i = 1; i < inPorts.length; i += 1) {
if (inPorts[i].value) {
return [true];
}
}
return [false];
}
Truth Table
In 1 | In 2 | Out |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
In Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Trigger | Trigger | This port is being used to trigger the comparison between In Port 2 and In Port 3. |
2 | In 1 | Digital | This port is being used to receive the first digital message for the 'Digital OR' compare. The trigger option on this port is disabled by default. |
3 | In 2 | Digital | This port is being used to receive the second digital message for the 'Digital OR' compare. The trigger option on this port is disabled by default. |
Out Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Out | Digital | This port is being used to send out the result message of the 'Digital OR' compare once the object executes. |
Properties
Name | Description |
---|---|
Object Name | The name of the object on the canvas. |
Show Code View | The switch to turn on code view for the Code Object. |
Duplicate code into custom Code Object |