And
This function block performs a logical AND operation on two boolean inputs and outputs a single boolean result. It is used to combine two conditions: the output is True only when both inputs are True.
π₯ Inputs
Boolean(first input) Provide a boolean condition (e.g., result of a comparison or a manual boolean input).Boolean(second input) Provide a second boolean condition to combine with the first.
π€ Outputs
BooleanResult of the AND operation. True when both inputs are True, otherwise False.
πΉοΈ Controls
No ControlsThis block has no adjustable widgets. It only evaluates the provided boolean inputs.
βοΈ Running mechanism
When the system runs, the block evaluates both boolean inputs and returns a single boolean output. The result reflects the logical AND of the two inputs: True only if both inputs are True. Use comparator blocks or boolean inputs upstream to produce the required boolean signals.
π― Features
Simple and reliable boolean combination for flow control and triggers.
Works with comparator and boolean-producing blocks to build condition logic.
Small and lightweight β ideal to use inside decision branches or to gate actions.
π Usage examples
Combine a detection check and a timer: feed a detection comparison (for example, use a
Greaterblock on anObject Countoutput) into one input and a timing/enable boolean into the other to trigger actions only when both are satisfied.Ensure both inputs are boolean-producing blocks such as
Logic Input, comparators (Greater,Smaller,Equals), or other logic blocks (Not,Or).
π‘ Tips and Tricks
To check that an object is present and a safety condition is met: use
Object Detection(orObject Detection - Custom) β compare itsObject CountwithGreaterβ combine that result with aSafety Equipment Detectioncheck using thisAndblock.For multi-condition checks (more than two conditions), use
All Trueto evaluate a list of boolean values, or chain multipleAndblocks.Use
Notto invert a condition before feeding intoAndif you need to require a negative condition (for example, "object present" AND "not alarmed").Use
Edge RisingorRising Edgewhen you want theAndresult to trigger only on a signal transition (combine the edge output with another boolean in this block).To toggle outputs (e.g., LEDs or logging) when combined conditions are met, feed this block's output to
Led Output,Image Logger,Image Write, orRecord Video.
π οΈ Troubleshooting
Unexpected False result: verify both upstream outputs are actual boolean values. Use
Logic Inputor comparator blocks (Greater,Equals,Smaller) to convert numeric outputs to boolean conditions.Unexpected True result: check that neither input is unintentionally True (e.g., default or uninitialized signals). Use
Is NoneorData Type Converterearlier in the chain to validate inputs.Need more than two conditions: either chain
Andblocks or useAll Trueto evaluate a list of boolean values.
Last updated
Was this helpful?