ID : 5942
#Pragma Optimize( "DefaultRobot" )
Function
The robot number specified here will be used if "Robot *" is omitted in programming.
This option is available in Ver.1.9.* or higher.
Syntax
#Pragma Optimize("DefaultRobot", Robot Number)
Guaranteed Entry
- Robot Number
- Specify a robot number by integer type data. Available range is from 0 (Robot0) to 1 (Robot1).
Description
A robot that is automatically used when [Robot*.] is omitted in programs is called a default robot. The default robot is Robot0 at the factory default. You can change the default robot with this command.
Related Terms
-
Attention
- If the default robot number is changed, note that all the default robot written later in the program will be changed. Pay extra attention if the program will be called by Call-statement or Include-statement.
- Be careful not to mistake the spell of "DefaultRobot".
When incorrect character string is specified, #Pragma Optimize is not treated as an error and the applicable line will be ignored as it is not exist. As a result, the default robot will not be changed. - When "Robot*." is omitted, a warning message appears at compiling. If the recurring message disturbs the operation, you can change the setting not to recur the message from the program parameter 308 Robot number default compiler output.
Example
#Pragma Optimize ("DefaultRobot", 1)
Sub Main
TakeArm 'Same as Robot1.TakeArm
Move p,j0 'Same as Robot1.Move p,j0
End sub
ID : 5942