Programming module
EFORT INTELLIGENT EQUIPMENT CO.,LTD
36
10
Complete.
Run the program in automatic mode again, the robot will execute 6 motions and then
stop, and the program ends.
Create Subroutine
Following the operation in the previous section, now it’s necessary to encapsulate the
program lines from line 3 to line 13 in the main program into a sub-function, which is called
by the main program, as shown in Figure 4-10:
Fig. 4-10 call the subroutine
In the figure 4-10, line 3 is the name of the subroutine; lines 4 to 13 indicate that the
code is annotated, that is, it will not run again.
The procedures in the figure above are as follows:
#
Demonstration
Remarks
1
1
Click on the "newSub"
button to add a subroutine;
(
After
clicking on
"newSub", the program
tree will automatically
create sub1 subroutine and