FOLDER
(Statement)
[RC7 Version 2.2 or later]
Declare local variables that are accessible from external programs.
FOLDER DEFINT <variablename>[=<constant>][,<variablename> [=<constant>],...]
FOLDER DEFSNG <variablename>[=<constant>][,<variablename> [=<constant>],...]
FOLDER DEFDBL <variablename>[=<constant>][,<variablename> [=<constant>],...]
FOLDER DEFSTR <variablename>[=<constant>][,<variablename> [=<constant>],...]
FOLDER DEFVEC <variablename>[=<vector constant>][,<variablename> [=<vector constant>],...]
FOLDER DEFPOS <variablename>[=<position constant>][,<variablename> [=<Position constant>],...]
FOLDER DEFJNT <variablename>[=<joint constant>][,<variablename> [=<Joint constant>],...]
FOLDER DEFTRN <variablename>[=<trans constant>][,<variablename> [=<trans constant>],...]
FOLDER DIM <variablename><suffix>[(<element count>[,<element count>
[,<element count>]])] [AS<variable type>][,<variablename>,...]
Declaring a local variable with this statement enables access to the variable from an external program using an EXTERN statement.
-
Two or more local variables having the same name cannot be defined in a program.List 1DescriptionPRO1FOLDER DEFINT AAFOLDER DEFSNG AADEFINT AAENDList 1 causes a double declaration error since three declaration statements define AA in the same program.
-
FOLDER variables having the same name cannot be defined in a folder.List 2(PRO1 and PRO2 are in the same folder)DescriptionPRO1FOLDER DEFINT AAENDPRO2FOLDER DEFSNG AAENDList 2 causes an error since FOLDER variables AA are defined in two programs located in the same folder
List 3(PRO1 and PRO2 are in different folders)DescriptionPRO1FOLDER DEFINT AAENDList 3 is correct in defining FOLDER variables AA. These variables have the same name but are defined in different folders so that they are treated as different ones.PRO2FOLDER DEFINT AAEND
-
The same variable name can be declared for both a FOLDER variable and local variable if those variables are located in different programs.List 4(PRO1 and PRO2 are in the same folder)DescriptionPRO1FOLDER DEFINT AAENDPRO2DEFINT AAENDIn List 4, AA in PRO1 and AA in PRO2 are treated as different variables.
Editing a program from the teach pendant or sending <Map/executable program> to the robot controller in WINCAPSIII clears the FOLDER variables.
-
When three programs (PRO1 through PRO3) exist in the same folder:Execution of PRO3 after that of PRO1 terminates the program (STOP).Execution of PRO3 after that of PRO2 temporarily halts the program (HOLD "STOP").Variable AA declared in the three programs will have the same value.
-
When the programs exist in the folder structure shown below:(Note 1) "33" will be assigned to I100.(Note 2) "55" will be assigned to I100.
-
When an initial value is declared by a FOLDER statement:Note: Without execution of PRO1, the initial value will not be assigned to any variable.
-
Execution of PRO2 after that of PRO1 assigns 3 to both I1 and I2.
-
Execution of PRO1 after that of PRO2 assigns 3 to I1 and 0 to I2.