<< Prev        Next >>

ID : 2708

GetSlaveButtonState

Function

To get a state of a button of COBOTTA when using the Master/Slave.

This command is available in Ver.2.13.* or later.

Syntax

GetSlaveButtonStateCOBOTTA buttons

Guaranteed Entry

COBOTTA buttons

Specify a button on the arm of COBOTTA to be obtained the state with integer type data.
0: Function button
1: Gripper plus button
2: Gripper minus button

Return Value

Return the state of the button with an array of variant type. The data type of each element is integer type.
1st element : Number of times the button was pressed and released
2nd element : If the button is pressed at present, it is "1". If not pressed, it is "0".

Description

This command obtains a state of a button of COBOTTA connected when using the Master/Slave.

Attention

The pressed number of the button increases at the timing of the target button is released after pressing.

Example

'!TITLE "State check of COBOTTA button"
' Check the state of COBOTTA function button
Sub Sample_GetSlaveButtonState

   Dim vntRet As Variant
   vntRet = GetSlaveButtonState(0)

   ' Number of times the button was pressed and released
   I[0] = vntRet(0)

   ' Check whether the button is pressed or not
   I[1] = vntRet(1)

End Sub

ID : 2708

<< Prev        Next >>