EasyManua.ls Logo

Trio Motion Coordinator MC216 - Page 380

Trio Motion Coordinator MC216
566 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
9-8 Programming Examples
Example Programs
Trio Motion Technology
Structuring the program
This example can be solved with a very simple structure using two nested
FOR..NEXT
loops.
Firstly we create a loop to step through each row (Y) in turn:
FOR y=0 to ydiv-1
NEXT y
‘ydiv’ is the number of rows, and the -1 is because we start counting at 0
rather than 1.
Now, within this loop we create another for the ‘X’ direction:
FOR y=0 to ydiv-1
FOR x=0 to xdiv-1
NEXT x
NEXT y
2
8
14
20
26
32
1
7
13
19
25
31
3
9
15
21
27
33
4
10
16
22
28
34
5
11
17
23
29
35
6
12
18
24
30
36
X+
Y+

Table of Contents

Related product manuals