4-137
Detailed specifications of MELFA-BASIC V
4MELFA-BASIC IV
4.3.22 External variables
External variables have a "_" (underscore' for the second character of the identifier ( variable name). (It is
necessary to register user-defined external variables in the user base program.) The value is valid over mul-
tiple programs. Thus, these can be used effectively to transfer data between programs.
There are four types of external variables, numeric value, position, joint and character, in the same manner
as the
. The following three types of external variables are available.
Table 4-6:Types of external variables
4.3.23 Program external variables
lists the program external variables that have been prepared for the controller in advance.As
shown in the table, the variable name is determined, but the application can be determined by the user.
Table 4-7:Program external variables
Note) When you use the extension, change the following parameter.
External variables
Explanation
Example
Program external variables
Types of external variables
P_01,M_01,P_100(1), etc.
User-defined external variables
The user can determine the name freely. Declare the vari-
ables using the Def Pos, Def Jnt, Def Char, or DEF INTE/
FLOAT/DOUBLE instructions in the user base program.
P_GENTEN,M_MACHI
Robot status variables
(System status variables)
The robot status variables are controlled by the system, and
their usage is determined in advance.
M_In,M_Out,P_Curr,M_PI, etc.
Data type
Variable name
Qty.
Remarks
Position
P_00 to P_19
P_20 to P_39
Note)
20
20
Position array (No. of elements 10)
P_100( ) to P_104( )
P_105( ) to P_109( )
Note)
5
5
Use the array element in the first dimensions.
Joint
J_00 to J_19
J_20 to J_39
Note)
20
20
Joint array (No. of elements 10)
J_100( ) to J_104( )
J_105( ) to J_109( )
Note)
5
5
Use the array element in the first dimensions.
Numeric value
M_00 to M_19
M_20 to M_39
Note)
20
20
The data type of the variables is double-precision real
numbers.
Numeric value array
(No. of elements 10)
M_100( ) to M_104( )
M_105( ) to M_109( )
Note)
5
5
Use the array element in the first dimensions. The data
type of the variables is double-precision real numbers.
Character string
C_00 to C_19
C_20 to C_39
Note)
20
20
Character string array
(No. of elements 10)
C_100( ) to C_104( )
C_105( ) to C_109( )
Note)
5
5
Use the array element in the first dimensions.
Parameter
Value
Means
PRGGBL
0:Standard (default)
1:Extension
Sets "1" to this parameter, and turns on the controller power again, then the capacity
of each program external variable will double.
However, if a variable with the same name is being used as a user-defined external
variable, an error will occur when the power is turned ON, and it is not possible to
expand. It is necessary to correct the user definition external variable.