Your first network

A dial and a print node: adding, connecting, running, and looking inside a node.

Open the example start here (an empty network with the tutorial data) from the group Vision tutorial (see how to follow the tutorials).

Add two nodes

  1. In the libraries on the left, open Standard > Input. Hover over a node to read what it does.
  2. Drag Dial onto the network. Its dial is the widget of its dial input; its output is value, on its right edge.
  3. Drag print (Standard > Output) to the right of the Dial. Its one input, in1, has type None: it accepts anything.
  4. Hover over a port: its name, its type, and whether it is required. The shape and color of a port show its type.

Connect and run

  1. Drag from the Dial's value to print's in1. While you drag, the inputs that can take a float light up.
  2. Press Run. The Dial sends its value, print prints it: open the Log under the network to read 0.0.
  3. Turn the dial: scroll over the number, drag its ⇄ handle, or type a value. With run on change checked, each change runs the network again, and print prints the new value.
The Dial connected to print, and the Log showing the values printed
The first network. The dial was set to 0.25, 0.5 and 1.0; print wrote each value to the Log.
Checkpoint dial and print

Run runs the nodes that have new data (the Dial, the first time) and what is below them; Run all runs everything again. See Running a network.

Look inside

Right-click the Dial's value port and choose Show data: the value it sent, and its type.

The data of the Dial's value port: 1.0, a float
Show data on the value port.

When a node runs, it runs its compute function. Double-click print (or right-click it and choose Edit code…) to see it: a function whose arguments are the input ports. Change it, for example to print('value:', in1), and press Save and run.

The code of the print node: def doit(self, in1): print(in1)
print's compute function. Nodes with outputs call self.outputData(port=value) to send their results.

Select and delete

  1. Shift-drag a rectangle around both nodes to select them; drag one of them to move both.
  2. Right-click print and choose Delete: the node goes, and its connection with it. To delete only a connection, right-click it and choose Delete connection.
In Vision the inputs were on top of a node and the outputs at the bottom, nodes were moved with the middle button, and a plain drag selected. Here data flows from left to right, the left button moves nodes, and a plain drag pans the network.