Sets and gets the number of the robot that is exclusively controlled by a thread.
Robot.Attached = <robot_number>
-or-
... Robot.Attached
Prerequisites
None
Parameters
None
Remarks
In order to ensure that a robot receives a consistent set of motion commands, a robot must be Attached before any motion commands can be issued by a thread and only a single thread can be Attached to a robot at any given time. While a robot is Attached by a thread, other threads are still permitted to read certain properties of the robot, such as the current robot position and trajectory state. Also, other threads are able to alter the robots operation in ways that make sense. For example, any thread can disable high power, signal a Soft or Hard E-Stop, or force a robot to rapidly decelerate. The Attached robot number is an Integer that ranges from 1 to N. If the Attached property is set to 0, any robot attached to the thread is released (un-Attached). When a robot is Attached, the system forces the Selected property to be equal to the Attached value. Typically, if a project is intended to control a robot, the GPL software development environment can be configured to automatically generate the statements to ensure the robot will be Attached at the start of program execution and un-Attached when the program is terminated or pauses execution.
Examples
Robot.Attached = 1 ' We now have exclusive control of robot #1
Robot.Attached = 0 ' This is how you give up control
See Also