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.
| Function | Description |
|---|---|
| Duplicate / Copy | Creates a copy of the selected block or block sequence. |
| Collapse Block | Reduces the visual size of the block to make large programs easier to organize. |
| Expand Block | Restores a collapsed block to its normal view. |
| Delete Block | Removes 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.
| Method | How to Remove a Block |
|---|---|
| Bin | Drag the unwanted block to the Bin located in the Blocks Code Area. |
| Blocks Area | Drag the unwanted block back toward the Blocks Area on the left side of the interface. |
| Keyboard | Select the block and press Delete or Backspace on the keyboard. |
| Context Menu | Right-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.
| Action | Keyboard Shortcut |
|---|---|
| Copy | Ctrl + C |
| Paste | Ctrl + V |
| Undo | Ctrl + Z |
Copying a Block
- Select the block you want to copy.
- Press Ctrl + C.
- Press Ctrl + V to paste a copy.
Quick Reference
| Action | Method |
|---|---|
| Open the workspace context menu | Right-click an empty area of the Blocks Code Area. |
| Open a block context menu | Right-click a block. |
| Move a block | Click and drag the block. |
| Connect blocks | Drag compatible blocks together until they snap into place. |
| Copy | Ctrl + C |
| Paste | Ctrl + V |
| Undo | Ctrl + Z |
| Delete | Select a block and press Delete or Backspace. |
| Delete using the Bin | Drag the unwanted block to the Bin. |
| Collapse a block | Use the block's contextual menu. |
| Expand a block | Use the contextual menu of a collapsed block. |
