General concepts

Programming in the Blocks Code Area

Programs in Clu-Blocks Pro are created by dragging blocks from the Blocks Area into the Blocks Code Area.

Each block represents an instruction or function. By arranging and connecting blocks, you create the sequence of instructions that the D1 R32 will execute.

The Blocks Code Area also provides a contextual menu with additional tools for working with your program.

To open the contextual menu, right-click on an empty area of the Blocks Code Area.

Figure. Context menu available when right-clicking on an empty area of the Blocks Code Area.

The contextual menu provides useful options for managing and organizing the blocks in your workspace.


Working with Individual Blocks

Blocks placed in the Blocks Code Area also have their own contextual menu.

To access the available options, right-click on a block.

Figure. Context menu available when right-clicking on a block.

The available functions allow you to perform different operations on the selected block.

FunctionDescription
Duplicate / CopyCreates a copy of the selected block or block sequence.
Collapse BlockReduces the visual size of the block to make large programs easier to organize.
Expand BlockRestores a collapsed block to its normal view.
Delete BlockRemoves the selected block from the program.

Note: The exact options displayed in the contextual menu may depend on the type of block selected.


Collapsing Blocks

As your programs become larger, some blocks may take up a considerable amount of workspace.

The Collapse Block function reduces the amount of space occupied by a block while keeping the block in the program.

Figure. Example of a block before and after using the Collapse function.

Collapsing blocks can help keep larger programs easier to read and navigate.

To view the complete block again, use the corresponding Expand Block option.


Removing Blocks from the Program

There are several ways to remove blocks that are no longer needed.

MethodHow to Remove a Block
BinDrag the unwanted block to the Bin located in the Blocks Code Area.
Blocks AreaDrag the unwanted block back toward the Blocks Area on the left side of the interface.
KeyboardSelect the block and press Delete or Backspace on the keyboard.
Context MenuRight-click the block and select the available delete option.

Tip: Be careful when deleting a group of connected blocks. Depending on what is selected, more than one connected block may be removed.

If you delete something accidentally, use Undo or press Ctrl + Z.


Organizing the Program

As programs become larger, keeping the Blocks Code Area organized becomes increasingly important.

A well-organized workspace makes it easier to:

  • Follow the sequence of instructions.
  • Find specific parts of the program.
  • Identify errors.
  • Understand how different parts of the program are connected.
  • Modify the program later.

Use the available workspace and contextual-menu tools to arrange your blocks and keep the program easy to follow.

Figure. Example of blocks organized in the Blocks Code Area.


Copying Blocks

You can make copies of blocks when you need to re use the same instruction or group of instructions.

This avoids having to recreate the same blocks repeatedly.

Copy Using the Context Menu

Right-click on a block and select Copy if this option is available.

You can then paste the copied block into the Blocks Code Area.

Figure. Copy option in the block contextual menu.


Copy and Paste Using the Keyboard

Keyboard shortcuts provide a quick way to copy and paste blocks.

ActionKeyboard Shortcut
CopyCtrl + C
PasteCtrl + V
UndoCtrl + Z

Copying a Block

  1. Select the block you want to copy.
  2. Press Ctrl + C.
  3. Press Ctrl + V to paste a copy.

Quick Reference

ActionMethod
Open the workspace context menuRight-click an empty area of the Blocks Code Area.
Open a block context menuRight-click a block.
Move a blockClick and drag the block.
Connect blocksDrag compatible blocks together until they snap into place.
CopyCtrl + C
PasteCtrl + V
UndoCtrl + Z
DeleteSelect a block and press Delete or Backspace.
Delete using the BinDrag the unwanted block to the Bin.
Collapse a blockUse the block's contextual menu.
Expand a blockUse the contextual menu of a collapsed block.