4-314 Detailed explanation of Robot Status Variable
4MELFA-BASIC V
C_Mecha
[Function]
This function returns the mechanism name (robot type name) for which control right has been acquired.
[Format]
[Terminology]
<Character String Variable > Specify a character string variable to be assigned.
<Numeric> 1 to 32, Enter the task slot number. If the argument is omitted, current
task slot number is set as the default value.
[Reference Program]
1 C1$=C_Mecha(1) ' "RH-3FH5515-D" is assigned to C1$.
(When slot 1 has acquired control right of mechanism 1 ("RH-3FH5515-D"))
[Explanation]
(1) The mechanism name (robot type name), for which the specified task slot has acquired control right, is
returned.
(2) When a task slot, which has not acquired control right of the mechanism, is specified, "" (none) is
returned.
(3) This variable only reads the data.
[Related instructions]
GetM (Get Mechanism), RelM (Release Mechanism)
C_Prg
[Function]
This variable returns the selected program name (number).
[Format]
[Terminology]
<Character String Variable > Specify a character string variable to be assigned.
<Numeric> 1 to 32, Enter the task slot number. If the argument is omitted, current
task slot number is set as the default value.
[Reference Program]
1 C1$=C_Prg(1) ' "10" is assigned to C1$. (if the program name is "10".)
[Explanation]
(1) The program name (number) set (loaded) into the specified task slot is assigned.
(2) If this variable is used in single task operation, the task slot number becomes 1.
(3) If it is set in the operation panel, that program name (number) is set.
(4) This variable only reads the data.
(5) If a task slot for which a program is not loaded is specified, an error occurs at execution.
Example) <Character String Variable >=C_Mecha[(<Numeric>)]
Example) <Character String Variable >=C_Prg [(<Numeric>)]