- 11 -
3.3
Query device state - GETSTATE
This command returns the device state of the device connected to the selected port as an integer
value. The possible states can be taken from Appendix A. To make the queries easy to read, constants
with the corresponding numerical values have been defined, which can be used instead of numbers.
Their names can also be seen in Appendix A.
Syntax
GRIPLINK_GETSTATE(< PORT > )
Parameters
< PORT >
Index of the device port (0 to 3)
Return value
INT
Example
As long as the gripper connected to port 1 has not gripped a part, it should try again:
WHILE NOT (GRIPLINK_GETSTATE(1) == GS_HOLDING)
GRIPLINK_RELEASE(1,0)
GRIPLINK_GRIP(1,0)
ENDWHILE