Running a network

How nodes run, the run buttons, and what a node does when it fails.

The run buttons at the top of the page
The run controls. (1) Run, (2) Run all, (3) Pause, (4) Stop, (5) run on change, (6) the network's state.

How data flows

A node runs when all its required inputs have data and at least one of them has new data. Its outputs then carry new data to the nodes connected to them, which run in turn. The network is run breadth first, as in Vision: a node runs after all the nodes above it that are running in the same pass, so a node with two inputs fed by the same source runs once, with both values.

  1. Run (Vision's run) runs the nodes that have new data, and what is below them. On a network just opened, that is everything.
  2. Run all runs every node again, from the nodes that have no input connected.
  3. Pause holds the run after the node that is running; press it again to go on.
  4. Stop stops the run after the node that is running.
  5. run on change (Vision's immediate mode): when it is checked, changing a widget, or connecting a node, runs the part of the network below it. Uncheck it to set several widgets, then press Run.
  6. The network's state: idle or running.

One run happens at a time, on the server. Changing a widget while the network runs queues another run, which starts when this one ends. Run this node in a node's menu (or Run node in the parameter column) runs one node and what is below it.

Loops and stops

Some nodes schedule the nodes below them several times: iterate sends the items of a list one at a time, and runs what is below it for each; while loops on a condition. A node whose code returns 'Stop' stops the data there: the nodes below it do not run in this pass (isTrue_Stop does this on a condition). A frozen node does not run.

The special ports order nodes that do not exchange data: a connection from a node's trigger port (bottom edge) to another node's runNode port (top edge) runs the second after the first.

What the nodes show

outlinethe node
orange, thickis running
red, dashedfailed: its code raised an error
amberstopped: it returned 'Stop', or a required input had no data
light blue fillis frozen
red, on a pale nodeis not available here (an imported Vision node that has no counterpart); it keeps its ports and code but does not run
A Read Image node outlined in red, its error shown in the parameter column
A node that failed. Read Image was given a file that does not exist. Selecting the node shows the error in the parameter column, with its traceback; the Log under the network has it too.

What nodes print goes to the Log under the network (click it to open it).