4-127
Detailed specifications of MELFA-BASIC V
4MELFA-BASIC IV
(3) Variable
The following types of variables can be used in a program.
Variable
System variable
System control variable
User control variable
User variable
Position type
variable
・・・・Required data can be saved.
・・・・This is predetermined by the variable name and saved data.
・・・・This is determined by the variable name and usage purpose.
・・・・The robot's orthogonal coordinate value is saved. The variable name starts with "P".
Example) MOV P1: The robot moves to the position saved in variable name P1.
・・・・The robot's joint angle is saved. The variable name starts with "J".
Example) MOV J1: The robot moves to the position saved in variable name J1.
・・・・A numeric value (integer, real value, etc.) is saved. The variable name starts with "M".
Example) M1 = 1: The value 1 is substituted in variable name M1.
・・・・A character string is saved. A "$" is added to the end of the variable name.
Example) C1$ = "ERROR": the character string "ERROR" is substituted in variable name C1$.
Note 1) Each variable is categorized into the following classes.
・・・・This can only be referred to with the program.
Example) P_CURR: The robot's current position is
always saved.
・・・・This can be referred to and substituted in the program.
Note that the input signals can only be referred to.
Example) M_OUT(17) = 1: Turns ON output signal bit 17.
M1=M_IN(20): Substitutes input signal bit 20 in the
arithmetic variable M1.
Note 1)
Note 1)
Note 1)
Joint type variable
Numeric value type
variable
Character type
variable