PENDANT real-valued function PENDANT real-valued function Syntax PENDANT (select) Function Return input from the manual control pendant. Usage Considerations The pendant must be attached using an ATTACH instruction prior to using this function. See Details below. Parameter select Real-valued expression whose value selects what type of pendant information is returned (see below). Details The value returned depends upon the select parameter as follows: select> 0 Immediately returns a value that reflects the actual state of the key with the given key number at the instant the function is called. The state of the key depends upon the key mode setting for that key.
See the KEYMODE program instruction for information about setting key modes and see the section Programming the pendant in the eV+ Language User's Guide , for a table of the key numbers. The value returned is meaningful only if the pendant is connected. If a key is in keyboard mode, the value ON (-1) indicates that the key is pressed. The value OFF (0) indicates that the key is not pressed. If a key is in level mode, the value ON (-1) indicates that the pendant is attached in USER mode and that the key is pressed. The value OFF (0) indicates that the pendant is not in USER mode, or that the key is not pressed.
If a key is in toggle mode, the value ON (-1) indicates that the key is on and the value OFF (0) indicates that the key is off. If the pendant is not in USER mode, the value returned still accurately reflects the state of the toggled key. select = 0 Returns the key number of the next keyboard mode key pressed. Program execution is suspended until a keyboard mode key is pressed. If no key is programmed in this mode, an eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 396