<< Prev        Next >>

ID : 5529

ForceValue

Function

Obtain the force control data.

This command is available in Ver.1.6.* or higher.

Syntax

ForceValue ([data number][, Mode])

Guaranteed Entry

Data number
Specify a data number that you intend to obtain by Integer Type data. (See the table below)
Data number 1, 4 to 9 and 13 to 15 are available when the Compliance function with Force Sensor is used.
Data number Value
0 Get the sensor value [N,Nm] on the control coordinate system.
1 Get the sensor output value [pulse/N.pulse/Nm].
2 Acquire the positive peak [N,Nm] of the force and moment on the force control coordinate system.
3 Acquire the negative peak [N,Nm] of the force and moment on the force control coordinate system.
4 Acquire the travel distance (command value)[mm,deg] of the tool end from the start of the force control on the force control coordinate system.
5 Acquire the positive peak (command value)[mm,deg] of the tool end’s travel distance from the start of the force control on the force control coordinate system.
6 Acquire the negative peaks (command value)[mm,deg] of the tool end’s travel distance from the start of the force control on the force control coordinate system.
7 Acquire the travel distance (current value)[mm,deg] of the tool end from the start of the force control on the force control coordinate system.
8 Acquire the positive peak (current value)[mm,deg] of the tool end’s travel distance from the start of the force control on the force control coordinate system.
9 Acquire the negative peaks (current value)[mm,deg] of the tool end’s travel distance from the start of the force control on the force control coordinate system.
10 Acquire the deviation [mm,deg] between the command value and the force control command value from the start of the force control on the force control coordinate system.
11 Acquire the positive peak of the deviation [mm,deg] between the command value and the force control command value from the start of the force control on the force control coordinate system.
12 Acquire the negative peak of the deviation [mm,deg] between the command value and the force control command value from the start of the force control on the force control coordinate system.
13 Acquire the force and the moment [N,Nm] of the sensor value. [N, Nm]
(Ver. 1.17.* or higher.)
14 Acquire the positive peaks of the force and the moment of the sensor value. [N,Nm]
(Ver. 1.17.* or higher.)
15 Acquire the negative peaks of the force and the moment of the sensor value. [N,Nm]
(Ver. 1.17.* or higher.)
Mode
Specify by Integer type data. If "0" is specified, acquire data. If "-1" is specified, acquire the data and then reset the buffer data. This is omittable. This should be "0" if it is omitted.

Return Value

Return the value corresponding to the specified data number by one dimensional array of variant.

Description

Obtain the force control data.
For force control function, refer to "FORCE CONTROL FUNCTION" of FUNCTION GUIDE.

Attention

  • 5-axis robots do not support this command.
  • For the Compliance function with Force Sensor, sensor-related data (data number 1, 13, 14 and 15) are available even if the force control function is disabled. Specifying other data numbers will issue an error "0x81201553 Could not acquire force control data".
  • When the force control is enabled by ForceCtrl command, data which are obtained by ForceValue command are initialized to 0s. Therefore, if ForceValue command is executed immediately after the force control enablement by ForceCtrl, initialized values may be returned.

Example

Sub Main	                      
  Dim vVal As Variant
  
  Do
  
  vVal = ForceValue( 0 )		'Sensor value[N,Nm]
  
  PrintDbg "X = ", vVal( 0 )
  PrintDbg "Y = ", vVal( 1 )
  PrintDbg "Z = ", vVal( 2 )
  PrintDbg "RX = ", vVal( 3 )
  PrintDbg "RY = ", vVal( 4 )
  PrintDbg "RZ = ", vVal( 5 )

  Delay 1
  
  Loop

End Sub					

ID : 5529

<< Prev        Next >>