GetRobotFCOn Function

Description
This identifies with which robot the force control function is active.

Usage
GetRobotFCOn

Values

Bit Results
0 Robot 1 status
1 Robot 2 status
2 Robot 3 status
3 Robot 4 status
4 Robot 5 status
5 Robot 6 status
6 Robot 7 status
7 Robot 8 status
8 Robot 9 status
9 Robot 10 status
10 Robot 11 status
11 Robot 12 status
12 Robot 13 status
13 Robot 14 status
14 Robot 15 status
15 Robot 16 status

The value of each Bit
0: Force control function inactive
1: Force control function active

Return Values
This returns the integer value obtained by setting the bits corresponding to the robot numbers for robots with the force control function active to “1”.
Bit 0 represents robot 1, and the subsequent numbers in order represent each of the other robots.
For example, when the force control function is active on robot 1 and robot 3, bit 0 and bit 2 are “On”, so “5” is returned.
The GetRobotFCOn function returns values from 0 to 65535 (hexadecimal FFFF). Because of this, the range of integers can be exceeded. When substituting a value for a variable, use Int32 or Int64 type variables.

Usage Example
This example identifies the robots with the force control function active.

Function TestGetRobotFCOn
  Int32 iVar           'Use Int32 or Int64 types
  Robot 1
  FCKeep FC1 CF, 5     'Continue the force control function through the CF parameter
  Print GetRobotFCOn   'This displays "1" because the force control function is active for Robot 1

  iVar = GetRobotFCOn ' This saves the status as a variable

  FCKeep FC1, 5        'This stops the force control function when FCKeep terminates
  Print GetRobotFCOn   'This displays "0" because the force control function is stopped for Robot 1
Fend

See Also
FCKeep, FCEnd, Force Control Object FC#