Skip to main content

6. Graphical Programming

6.1.Create a Graphical Project
Refer to Section 4.3 for creating a graphical workspace.
6.2.Introduction to Graphical Blocks
6.2.1.Command Blocks
Each command is represented by a graphical block that can be dragged out to implement its functionality independently

image.png

When a block is dragged out, only the required parameters are displayed, and non-required parameters are collapsed by default. Users can expand to select the required parameters, as shown in the example.

image.png

Each input is filtered based on the variable type required.

image.png

If the desired parameters are not available, users can click the "+" button to add variables. By selecting the desired variable type, they will be directed to the corresponding file to add the required type.

image.png

Special blocks for certain commands are displayed as shown below:

image.png

The following is an example of a block that can be concatenated:

image.png

image.png

 

6.2.2.Assignment and Variable Blocks
Variable Block

image.png

The Set/Assignment Block is primarily used to assign values to variables.

image.png

In the Assignment Block, you can select one variable to assign its value to another variable.

image.png

There are three concatenation blocks for String, Boolean, and Numeric types.

image.png

 

6.3.Simple Demo Program Demonstration
(1) Create a New Graphical Workspace
Please refer to Section 4.3 for the steps to create a new graphical workspace. Below is an example of a newly created demo.

image.png

(2) Double-Click to open "NewProgram"
By default, it has a "Start" and an "End" block.

image.png

(3) Click on the instruction tree on the left and select any one as an example, such as the "Motion" command.
Choose a graphical box and place it between the "Start" and "End" positions. 

image.png

Select a block for linear motion, as shown in the image.

image.png

(4) For the "Target Position" dropdown in the block above, select a parameter variable.

image.png

If there are no useful variables in the dropdown, you need to add a new variable.
(5) Click the "+" button to add a new variable.

image.png

For example, if you select "Program Variables," navigate to the program variables file and create a new variable for the target position.

image.png

image.png

Once you add the variable, it will appear in the dropdown list when you click on the "Target Position", as shown in the figure below.

image.png

After selecting a variable, it will be displayed as shown in the figure.

image.png

If you select the wrong variable, you can click the "x" clear button in the dropdown to remove the selection and choose another variable.

image.png

After making the new selection, it will be displayed as shown in the figure.

image.png

(6) Click "Save" to save the graphical program.
In this manner, the graphical project is edited and completed. Similar steps can be followed for other commands as well. 

image.png

(7)A simple Demo graphical program
Graphical Program Implementation:

image.png

Text Program Implementation:

image.png