V+ 12.4 Release Notes

Displays the Table of Contents for the current document
Displays the previous topic in the current document
Displays the next topic in the current document
Displays the Index for the current document

SELECT (device_type, mode)

 
Function

Return the unit number that is currently selected by the current task for the device named.

Parameter

device_type Keyword that identifies the type of device that is to be selected. Valid device types are ROBOT, VISION, and FORCE (which must be specified without quotation marks). The device-type keyword can be abbreviated.

mode Optional real value, variable, or expression (interpreted as an integer) that specifies the mode for the function. If this parameter is omitted or has the value 0, the function returns the number of the unit currently selected, or 0 if no unit is selected. If mode has the value -1, the function returns the total number of units available for the specified device.

Details

This function returns either the number of the specified device that is currently selected, or the total number of devices connected to the system controller. Multiple devices of the same type are supported only if your system includes the optional V+ Extensions software.

If the V+ system is not configured to control a robot, the selected robot is always #1, and the total number of robots is zero.

SELECT(ROBOT) returns the number of the currently selected robot. SELECT(ROBOT,-1) returns the maximum robot number in a V+ system.1 SELECT(VISION) returns the number of the currently selected vision system. SELECT(FORCE) returns the number of the currently selected force sensor.

A particular FORCE sensor is associated with one VFI (VME Force Interface), which in turn has a number associated with it through the system configuration. With the default configuration, FORCE sensor number 1 corresponds to the VFI configured as servo board number 8.

SELECT VISION

You can use the following modes for a SELECT(VISION,mode) function.
Mode
Description
-1
Returns the maximum possible vision system number.
0
Returns the number of the currently selected vision system or zero.
n > 0
Returns TRUE if vision system n is present. Otherwise, the value FALSE is returned.

Example s
;Return the unit number of the robot selected for the current ;task 
our.robot = SELECT(ROBOT) 
;Return the unit number of the force sensor selected for the
;current task 
our.force = SELECT(FORCE) 
;Return the total number of robots connected to the
;controller 
num.robots = SELECT(ROBOT,-1) 
;Return the total number of vision systems installed in the
;controller 
num.vision = SELECT(VISION,-1) 
Related Keyword

SELECT (monitor command and program instruction)

Syntax

1

The older syntax, SELECT(ROBOT,1), is still supported but may become obsolete in the future.

Please submit comments to: techpubs@adept.com

Last modified on: 07/08/2004
Copyright © 2004 by Adept Technology, Inc.
All rights reserved.