This page is the reference of every gate of the logic module: what it does, its inputs and outputs, and each parameter as it appears in the Parameters panel, with its default value for a newly placed gate. For the concepts used here (links, consumption, synchronization, values, inversion), read Logic circuits first. The programmable gate has its own page: Programmable gate: JavaScript reference.
How to read the notation.
n → 1means "any number of inputs, one output". Unless stated otherwise, a gate waits until all of its inputs have a value before it executes (see Synchronization).
Click a gate in the Edition tab to open its parameters. Every gate except Annotation and Group has:
| Parameter | Default | Effect |
|---|---|---|
| Gate label | empty | Text displayed on the gate. It has no effect on the execution. |
| Gate active | yes | An inactive gate no longer sends anything on its outputs. |
Click an input or an output (a port) to edit it:
| Parameter | Effect |
|---|---|
| Initial value | Value sent once on the port when the circuit starts. Example: 0 on the input of a counter. |
| Inversion | none, binary (0 ↔ 1), additive (x → -x) or multiplicative (x → 1/x). See Inversion of the values. Not offered on ports that carry an address or a setting. |
Gates with a variable number of ports (AND, OR, XOR, Calcul, Expression, Join, Split, Fusion, Scission, Input selection, Output selection) show a + button in the Edition tab to add an input or an output.
Triggers, actuators and the Delay gate have an Advanced mode parameter (default: no). It shows extra ports that let the circuit change the gate while it runs. The values typed in the parameters become the initial values of these ports.
| Gate | Extra inputs (top) | Extra outputs |
|---|---|---|
| Address | enable (1 listens, 0 stops listening; default 1) and address to listen to |
none |
| Timer | run/pause (1 runs, 0 pauses; default 1) and time setting |
remaining time before the next execution |
| Receiver | receiving channel | none |
| Write, Read | address | error output: receives the error instead of the normal output |
| Emitter | transmission channel | none |
| Delay | delay value and run/pause (1 runs, 0 pauses) |
remaining time of the running delay |
You cannot switch a gate back to normal mode while links are connected to its extra ports: remove those links first.
n → 1. Boolean functions, drawn in European or American style (both styles are supported).
| Parameter | Default | Effect |
|---|---|---|
| Logic function | the gate chosen in the palette | AND, OR or XOR. You can change it at any time. |
1 when all inputs are true, otherwise 0.1 when at least one input is true, otherwise 0.1 when exactly one input is true. With more inputs, it sends 1 when an odd number of inputs are true.A value is true when it is not 0, empty or undefined. When the result is true and the inputs are not plain 0/1 values, the gate sends the value of the most recently executed true input instead of 1. If you need a strict 0/1, add a comparison (Calcul gate) behind it. When an input carries an array, every element counts as one input.
1 → 1. Sends the received value through its output, whose binary inversion is enabled by default. Click the output to choose another inversion (additive, multiplicative). No specific parameter.
1 → 1. Each time a value arrives on the input, the gate sends a fixed value instead.
| Parameter | Default | Effect |
|---|---|---|
| Constant value | 1 |
Any value: number, text, array (see Values). |
n → 1. Combines all its inputs.
| Parameter | Default | Effect |
|---|---|---|
| Operation | Sum | Sum (+, also concatenates texts), Product, maximum, minimum, Average. |
| Comparision | Smaller <, Greater >, Smaller or equal ≤, Greater or equal ≥, Equal =, Inequal ≠. Select either an operation or a comparison. |
A comparison sends 1 when it is true for each pair of consecutive inputs (first input compared with the second, second with the third, and so on), otherwise 0. Example: < with the inputs 1, 5, 9 sends 1. Arrays received on the inputs are flattened: each element counts as one input.
n → 1. Computes a formula from named inputs.
| Parameter | Default | Effect |
|---|---|---|
| Expression | a+b |
Formula using the input names. |
| Input name (click an input) | a, b, … |
Name of the variable that holds the value of this input. Must be a valid identifier. |
The expression is first evaluated as a mathematical formula. When it is not a pure number formula, it is evaluated as a JavaScript expression: comparisons, ternary operator, text and array functions, regular expressions. Examples and the list of functions: Advanced Expressions. An evaluation error is displayed on the gate.
Triggers have no normal input: they start an execution when an event happens. They are drawn as circles.
0 → 1. Listens to an address and sends each new value it receives.
| Parameter | Default | Effect |
|---|---|---|
| Address | empty | Address (1/2/3, %M1-2, $counter…), alias, or array of addresses such as [1/1/1, 1/1/2]. With an array, the output is an array in which only the position of the address that changed holds a value. |
| Read at start | no | When the circuit starts, the last known value of the address is read and sent. |
| Ignore startup value | no | The first value received after the circuit starts is not sent. |
| Read mode | Every new value event | Every new value event: every value received is sent, even if it is the same as the previous one. Only when value changes: a value equal to the previous one is not sent. |
| Full value | no | The output carries an object {value, value_string, value_date} instead of the value alone. |
| Advanced mode | no | See Advanced mode. |
0 → 1. Starts executions on a schedule. Each execution sends 1 (or a counter, see Increment output).
| Parameter | Default | Effect |
|---|---|---|
| Time | 10 |
A number of time units, a date, or a cron expression. An array of several such values combines several schedules. |
| Time unit | Second | Second, Minute, Hour, Day. Used when Time is a number. There is no millisecond unit: use a Delay gate for sub-second timing. |
| Repeat | yes | With a number, yes executes every period; no executes once, one period after the start. |
| Increment output | no | Each execution sends a counter that increases by one (1, 2, 3…) instead of 1. The counter restarts when the circuit restarts or when the time setting changes. |
| Advanced mode | no | See Advanced mode. |
Time formats:
10 with Second.hh:mm:ss dd.mm.yyyy, with * as a joker for recurring dates, e.g. 12:00 25.12.* (every 25th of December at noon). A date in the past without joker is never executed (the gate shows ∞).minute hour day-of-month month day-of-week; months are numbered 1 to 12 and Sunday is 0 or 7. Example: 0 8 * * 1-5 runs at 8:00 from Monday to Friday.More examples: Task Scheduling.
0 → 1. Receives the values sent by Emitter gates on a channel: a "wireless" link.
| Parameter | Default | Effect |
|---|---|---|
| Receiving channel | empty | Text key of the channel, e.g. temp. |
| Reception mode | Internal to the circuit | Internal to the circuit: receives only from the Emitters of the same circuit. External to the circuit: also receives from the Emitters of other circuits set to External to the circuit. |
| Advanced mode | no | See Advanced mode. |
To link two circuits, set the Emitter and the Receiver to External to the circuit and give them the same channel.
Actuators act on addresses or channels. They are drawn as diamonds. The address can be typed in the parameters or chosen with the address selector; it accepts any address of a started gateway, an alias, gatewayName¬address to target one gateway, or an array of addresses.
1 → 1. Writes the value received on the input to the address. When the write succeeds, the value is sent on the output.
| Parameter | Default (new gate) | Effect |
|---|---|---|
| Address | empty | Address to write. An array such as [2/2/0, 2/2/1] writes the value to each address; the output then carries an array of the successful writes. An e-mail address or %sms:+41… sends an alert, see Logic circuits. |
| Retry on error (last value) | yes | A failed write is retried after 2 s, 5 s, 10 s, 30 s, then every 60 s until it succeeds. Only the latest value is retried: a new value on the input cancels the retries of the previous one. The first failure is still reported; the output is executed when a retry succeeds. Retries stop when the gate is deactivated. |
| Write to all addresses with this name | yes | When the same address name or alias exists on several gateways, the value is written to all of them. When disabled, only one address is written: the first one whose gateway is connected. |
| Advanced mode | no | Adds the address input and the error output. Without it, an error is only displayed on the gate. |
Write gates placed before the two options existed keep the previous behaviour (no retry, a single address) until you enable the options in their parameters. Disable Retry on error for commands that must not be executed late, such as a pulse or a momentary command.
1 → 1. Each value received on the input triggers a read of the address; the value read is sent on the output.
| Parameter | Default | Effect |
|---|---|---|
| Address | empty | Address to read, or array of addresses (the output is then an array). |
| Read mode | Driver query | Driver query: asks the driver, which may send a request on the bus. Last known value: returns the last value stored on the device, without bus traffic. An address that never received a value returns the error null. |
| Advanced mode | no | Adds the address input and the error output. |
1 → 1. Sends the value received on the input on a channel, to the Receiver gates of the same channel, and passes it on its output.
| Parameter | Default | Effect |
|---|---|---|
| Transmission channel | empty | Text key of the channel. |
| Propagation | Internal to the circuit | Internal to the circuit: only the Receivers of this circuit. External to the circuit: also the Receivers of other circuits set to External to the circuit. |
| Advanced mode | no | Adds the channel input. |
n → 1. Each value received on any input is sent on the output, one at a time. The gate does not wait for the other inputs.
1 → n. Each value received is copied to all outputs.
1 → 1. The upper input opens or closes the switch. While it carries a true value, the values received on the left input pass to the output; otherwise they are blocked.
| Parameter | Default | Effect |
|---|---|---|
| Execute when activated | yes | When the switch closes (upper input becomes true), the last value received on the left input is sent, even if it had already passed. With no, only a value that has not been sent yet passes. |
The upper input has the initial value 0 (switch open).
1 → n. The upper input gives the number of the output that receives the values of the left input. Outputs are numbered from 0, top to bottom. A number that matches no output sends nothing.
| Parameter | Default | Effect |
|---|---|---|
| Execute when selection changes | no | When the selection changes, the last value received on the left input is sent to the newly selected output, even if it had already been sent. |
n → 1. The upper input gives the number of the input whose value is sent on the output. Inputs are numbered from 0, top to bottom.
| Parameter | Default | Effect |
|---|---|---|
| Inputs synchronization | no | The output is executed only when every input holds a value. |
| Execute when selection changes | no | When the selection changes, the value of the newly selected input is sent, even if it had already been sent. |
1 → 1. Compares the value of the left input with the value of the upper input. If the condition is true, the left value is sent; otherwise nothing is sent.
| Parameter | Default | Effect |
|---|---|---|
| Filter | Equal | Smaller <, Greater >, Smaller or equal ≤, Greater or equal ≥, Equal =, Inequal ≠. |
| Execute when filter changes | yes | When the upper input changes, the last value received on the left input is tested again and sent if the condition is true. |
The upper input has the initial value 1. Example: with > and 2 on the upper input, 4 passes and 1 is blocked. When the left value is an array, each element is tested and only the matching elements are sent. With =, the upper input can be an array of accepted values, e.g. [1, 3, 5].
1 → 1. Sends the received value after a delay.
| Parameter | Default | Effect |
|---|---|---|
| Delay | 10 |
Duration of the delay. |
| Delay unit | Second | millisecond, Second, Minute, Hour, Day. |
| Concurrent executions | Reset the delay | What happens when a value arrives while a delay is running: Reset the delay (the delay restarts with the new value), Ignore new input (the new value is dropped), Update output value (the running delay is kept, the new value is sent at its end), Parallel execution (each value gets its own delay), Sum delays (the new delay is added to the time left). |
| Advanced mode | no | See Advanced mode. |
1 → 1. Stores the values that pass and sends an older one: each new value is stored and the value received Buffer size values earlier is sent. The first values received only fill the buffer.
| Parameter | Default | Effect |
|---|---|---|
| Buffer size | 1 |
Number of values kept between the input and the output. With 1, each new value sends the previous one. |
Free text placed on the circuit to document it. No port, no effect on the execution.
Parameters: Displayed text, Color, Font size, Interline, Bold, Italic, Underlined, Font.
Frame drawn around a part of the circuit. No port, no effect on the execution.
Parameters: Label, Border color, Border width.
n → 1. Builds an array from the values of its inputs (see Arrays).
| Parameter | Default | Effect |
|---|---|---|
| Associative array | no | no: the output is an array ordered like the inputs, e.g. [12, 15]. yes: the output is an associative array; each input has a key (default a, b), e.g. {a: 12, b: 15}. |
| Inputs synchronization | no | no: every value received sends the array at once, with the current values of all inputs (empty inputs give empty elements). yes: the array is sent only when every input holds a value. |
1 → n. Splits the array received on the input: the first element goes to the first output, the second element to the second output, and so on. An output whose element is missing is not executed.
| Parameter | Default | Effect |
|---|---|---|
| Associative array | no | yes: each output has a key (default a, b) and receives the value stored under that key in the associative array received. |
n → m. A gate whose behaviour you write in JavaScript, with your own inputs, outputs and parameters. See Programmable gate: JavaScript reference.
The editor follows the language of the user interface. This table gives the labels of the palette in both languages.
| Group (EN) | Group (FR) | Gate (EN) | Gate (FR) |
|---|---|---|---|
| Logic | Logiques | AND / OR / XOR | ET / OU / OU exclusif |
| NOT | Inversion | ||
| Constant | Constante | ||
| Calcul | Calcul | ||
| Expression | Expression | ||
| Triggers | Déclencheurs | Address | Adresse |
| Timer | Horloge | ||
| Receiver | Réception | ||
| Actuators | Actionneurs | Write | Ecriture |
| Read | Lecture | ||
| Emitter | Emission | ||
| Flow controllers | Contrôleurs de flux | Join | Jonction |
| Split | Disjonction | ||
| Switch | Commutation | ||
| Output selection | Sélection des sorties | ||
| Input selection | Sélection des entrées | ||
| Filter | Filtre | ||
| Delay | Délai | ||
| Buffer | Mémoire tampon | ||
| Others | Autres | Annotation | Annotation |
| Group | Groupe | ||
| Fusion | Fusion | ||
| Scission | Scission | ||
| Programmable | Programmable |
Do not confuse Split (copies one value to all outputs) with Scission (splits an array into its elements).