EasyManuals Logo

Mitsubishi Electric CR750-Q User Manual

Mitsubishi Electric CR750-Q
730 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #165 background imageLoading...
Page #165 background image
4MELFA-BASIC V
Detailed specifications of MELFA-BASIC V 4-145
4.4.24 User-defined external variables
If the number of program external variables listed above is insufficient or it is desired to define variables with
unique names, the user can define program external variables using a user base program.
(1) By defining a variable having an underscore (_) for the second character of the identifier with the DEF
statement in the user base program
Note)
, that variable will be handled as an external variable.
(2) It is not necessary to execute the user base program.
(3) Write only the lines necessary for declaring variables in the user base program.
(4) If it is desired to define array variables in a user base program and use them as external variables, it
is necessary to declare them using the Dim instruction again in the program in which they will be
used. It is not necessary to declare local variables (variables valid only within programs) again.
Example) Example of using user-defined external variables
On the main program (program name 1) side
On the user base program (program name UBP) side
Procedure before using user-defined external variables
1) First, write a user base program. Use "_" for the second character of the variables.
2) Register the program name in the "PRGUSR" parameter and turn the power off and on again.
3) Write a normal program using the user-defined external variables.
10 Dim P_200(10) ' Re-declaration of external variables
20 Dim M_200(10) ' Re-declaration of external variables
30 Mov P_100(1)
40 If M_200(1) =1 Then Hlt
50 M1=1 ' Local variable
10 Def Pos P_900, P_901, P_902, P_903
20 Dim P_200(10) ' It is necessary to declare this variable again in the
program in which they will be used.
30 Def Inte M_100
40 Dim M_200(10) ' It is necessary to declare this variable again in the
program in which they will be used.
Parameter name Value
PRGUSR UBP

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi Electric CR750-Q and is the answer not in the manual?

Mitsubishi Electric CR750-Q Specifications

General IconGeneral
BrandMitsubishi Electric
ModelCR750-Q
CategoryController
LanguageEnglish

Related product manuals