Skip to content

Control ​

In block coding, control blocks manipulate the flow of the program.
They can wait for a set time, detect keyboard input, print logs, and more.

Wait ​

Waits for the specified time (in seconds) and then runs the next command.

wait_sec

Parameters ​

NameKindDescriptionRange / TypeDefault
secInput (field)Wait time — literal number (e.g. Utils.wait(0.5))Real number ≥ 0-
secInput (block)Wait time — variable/expression (e.g. Utils.wait(time))Real number ≥ 0-

Python ​

python
# field sec = 2 → used as is (in seconds)
Utils.wait(2)

# variable input
Utils.wait(myVar)

Wait one frame ​

Pauses the execution of the program for one frame (about 0.001 seconds).

wait_1msec

Parameters ​

(none — fixed at 0.001 seconds)

Python ​

python
Utils.wait(0.001)

Key pressed ​

Returns whether a specific key is being pressed as true / false.

key_pressed

Parameters ​

NameKindDescriptionRange / TypeDefault
keyInputKey namespace, up, left, right, down, a~z, 0~9,
shift, ctrl, alt, enter, tab, esc, backspace
-

Python ​

python
Utils.keypressed('space')

Log ​

Prints the value of a variable or property to the console window in real time.

log

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInputValue to printAny value-
tagInputLog tagString-
unitInputUnit labelString-

Python ​

python
Utils.log(data, '', '')

Scope ​

Shows how a value changes over time as a real-time graph in the scope window.
You can set the graph's color, minimum/maximum values, and range.

scope

Parameters ​

NameKindDescriptionRange / TypeDefault
signalInput (block)Graph signal valueReal number-
nameInputGraph nameString-
min_valInput (field)Graph minimumReal number-
max_valInput (field)Graph maximumReal number-
colorColorGraph color (hex)Hex string-

Python ​

python
Utils.scope(signal, '', 0, 100, '#000000')