3 - 35 3 - 35
MELSEC-Q
3 LET'S CREATE AND EXECUTE A PROGRAM
3.10.2 Displaying characters to an arbitrary position
Characters can only be controlled in lateral direction on the screen with separating with
delimiters ";" and "," as well as the TAB and SPC functions. However, there may be a
case where you desire a text to be at any position in vertical direction as well. In such
case, the LOCATE instruction is used. The following shows the console screen
structure:
80 characters
25 lines for
the IBM/AT
compatible
personal
computers
The number of lines
that can be displayed
on the screen will
vary depending
on the console.
The LOCATE instruction directly specifies the display position using coordinates with
the upper left corner of the screen as (0,0). The display position is displayed first for the
coordinate in horizontal direction, and then the coordinate in the vertical direction.
25 Lines
24th line
(0,0)
This example is illustrated using an IBM/AT
compatible personal computer as the console.
The maximum coordinate value in the vertical
direction may vary if other consoles are used.
0th character
5th character
80 characters
79th character
7th line
0th line
(0,29)
(5,7)
(79,0)
(79,29)