ForceValue
Function
Obtain the force control data.
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 4 to 9 are available when the Compliance function with Force Sensor is used. - Mode
- Specify by Integer type data. If "0" is specified, acquire data. If "-1" is specified, acquire the data and then reset the beffer data. This is omittable. This should be "0" if it is omitted.
| 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] |
| 14 | Acquire the positive peaks of the force and the moment of the sensor value. [N,Nm] |
| 15 | Acquire the negative peaks of the force and the moment of the sensor value. [N,Nm] |
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.
Related Terms
ForceChangeTable, ForceCtrl, ForceParam, ForceSensor, ForceWaitCondition
Attention
- This command is available for Vertical, articulated robots (6-axis) only. VP series 5-axis robots do not support this command.
- When the force control is disabled, sensor-related data (data number 1, 13, 14 and 15) are available whereas force control-related data are unavailable. 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

