Mitsubishi QD51 Programming Manual page 531

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
RENUM
Instruction
• Reassigns line numbers of a program.
RENUM
Syntax
new start line number
old start line number
increment
RENUM 500,100, 5
Examples
• The RENUM instruction reassigns the line numbers of a program.
Description
• Specify values from 1 to 65529 for <new start line number> and <old start line number>.
• If <new start line number> is omitted, it is assumed that 10 is specified.
• If <old start line number> is omitted, line numbers are reassigned from the start line of the
current program.
• <increment> is the value increased per one line in the new line numbering. If it is omitted, it
is assumed that 10 is specified.
• The RENUM instruction changes the line numbers used in each of instructions such as
GOTO, GOSUB, IF-THEN, IF-GOTO, ON-GOTO and ON-GOSUB, as well as instructions
for evaluating conditions using the ERL function and the RESTORE and RESUME
instructions. They are changed in accordance with the new line numbering.
However, line numbers specified by the CHAIN instruction are not changed.
The error message "Undefined line xxxxx in yyyyy" is displayed if line numbers do not
exist in these instructions.
In the error message, xxxxx indicates the line number that did not exist and yyyyy
indicates the new line number.
In this case, the non-existent line numbers remain as they are.
11 - 361
[<new start line number>][,[<old start line number>][,<increment>]]
It is not possible to change the order of program lines using the RENUM instruction
(for example, if 10, 20 and 30 are assigned to a program as line numbers,
RENUM 15,30 cannot be specified).
(Incorrect) Program
10
RENUM 15,30
20
30
(Correct) Program
10
RENUM 30,10
20
30
Moreover, line numbers greater than 65529 cannot be generated. If such a specification is made,
an "Illegal function call" error occurs.
RENUMber
• • • •
Specify the starting number for the line numbers to
be assigned anew.
• • • •
Specify the line number of the current program
where the new line numbering starts.
• • • •
Specify the increment per one line in the new line
numbering.
• • • •
Reassigns line numbers anew from the current line
100, starting from line 500 in increments of 5.
Program
30
40
50
MELSEC-Q
11 - 361

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents