Direct Mode And Program Mode; Line Format - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

2 THE BASICS OF AD51H-BASIC

2.2 Direct Mode and Program Mode

2.3 Line Format

2 - 4
• Direct mode
When a BASIC instruction is entered and the Enter key is pressed while "OK" is
displayed on the console screen, BASIC will execute the instruction immediately.
This is referred to as execution in direct mode.
The results of the operation executed in direct mode will remain in memory, but the
instruction line will be cleared.
All BASIC instructions with the exception of DEF FN can be executed in direct
mode.
• Program mode
Entering a BASIC instruction preceded by a line number and pressing Enter will
store the instruction in the memory of the communication module. Lines are
comprised of line numbers and BASIC instructions, and a group of more than one
line is referred to as a BASIC program (or simply, a program).
A program is comprised of statements that specify a series of operations that the
computer performs. Designing and testing a program is referred to as
programming. Programs stored in memory can be executed by entering the RUN
instruction of BASIC.
This execution is referred to as program mode execution, as opposed to direct
mode execution.
Lines are the smallest components of a program and are comprised of one <line
number>, a sentence, and a Return symbol that indicates the end of the line.
A sentence is a collection of <statements> that make sense as an instruction. ( Return
is entered by pressing the Enter key while editing the program.)
The line format is as follows:
<Line Number>
[<Label:>] <Statement> {:<Statement> } Return
(1) Line Number
<Line Numbers> are written from the 1st column of the line and are represented
by whole numbers between 1 and 65529 (decimal constant).
The line numbers are placed in ascending order within the program.
Line numbers act as indices for controlling program execution, and at the same
time, as line search indices when editing the program.
Sentence
MELSEC-Q
2 - 4

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents