Get Started
Logic
On this page
  1. Enabled
  2. Name
  3. Execution Cycle
  4. Reverse Execution
  5. Edit, Duplicate, Delete
  6. Block Selection Mode / Clipboard

Logic

Logic is the workspace where all algorithm blocks are created.

  • Algorithm blocks contained in a logic execute at each execution cycle of that logic.
  • Multiple logics can be created within a single project.
  • When multiple logics exist, each logic runs simultaneously regardless of order.

Add a logic with + in the left menu. Each logic has the following settings.

The Add Logic dialog with Enabled, Name, Execution Cycle, and Reverse Execution fields
The Add Logic dialog. The default execution cycle is 50 milliseconds.

Enabled

Sets whether the logic is used. A disabled logic does not execute.

Name

Enter the display name. Any name can be used.

Execution Cycle

Sets the execution cycle of the logic. The blocks in the logic execute at the specified cycle; choose a value appropriate for your hardware and control objective. Shorter cycles give faster response but higher CPU usage. The minimum is 1 millisecond, and 50 to 100 milliseconds is suitable for general use.

For example, if the execution cycle is 50 milliseconds and all blocks take 5 milliseconds to run, the system waits for the remaining 45 milliseconds before executing the blocks again.

Note Each logic runs on its own thread, so the actual cycle can be longer than the value you set. The gap grows with weaker hardware and higher CPU load, and under normal conditions it stays within 0 to 3 milliseconds. Grablo is not suited to control that needs timing accurate to under a millisecond.

Within one execution cycle, the logic runs the controls and control groups directly under it in order from the top, and once the last block finishes it starts again from the first block in the next cycle.

Diagram of three controls in a logic executing from top to bottom and looping back from the last control to the first
The execution loop of a logic. Controls run in order from the top, and after the last control the loop starts again from the first.

Reverse Execution

Reverses the execution order of child blocks. When off, blocks execute top to bottom; when on, bottom to top.

Edit, Duplicate, Delete

Manage logics with the Edit, Duplicate, and Delete buttons in the left menu. Deleted logics are moved to the trash and removed automatically after 30 days (Part 3).

Caution Logics execute independently, but variables are shared by the whole project. If two logics write to the same variable, the later write overwrites the earlier one. Keep a single logic as the writer for each variable and let other logics only read it.

Block Selection Mode / Clipboard

Select multiple blocks (controls, conditions, actions, etc.) at once to duplicate, delete, copy, cut, and paste them in bulk. Click the checkbox icon in the top-right corner to enter selection mode, click blocks to select them, and use the action buttons in the header. Pasting works within the same logic and across different logics.

  • In selection mode, clicking a block selects it and clicking again deselects it. Selected blocks are highlighted.
  • Duplicate, Delete, Copy, and Cut are applied to all selected blocks at once with the buttons in the header.
  • Selection mode exits automatically after Copy or Cut.
  • After Paste, the pasted blocks are selected automatically.
ShortcutAction
Ctrl+CCopy
Ctrl+XCut
Ctrl+VPaste
DeleteDelete
EscExit selection mode