<< Prev        Next >>

ID : 5471

Example Program of Force Sensor Compliance Control

A program example is shown below.

Program Example Description

  1. This program shows the example of a fitting operation.
  2. Force Sensor Compliance Control starts once the robot brings a workpiece to the starting position of the force control.
  3. The value of the force sensor will be reset (0N, 0Nm) when the force control starts.
  4. Force Sensor Compliance Control ends when the robot has moved the workpiece a predetermined distance.

Example

Sub Main
'!TITLE "Fitting operation"
'
' Acquire the workpiece position				P[1]
' Force control starting position				P[2] 
' Once this travel distance is achieved, force control ends	F[1]

  Dim startPos As Position
  Dim rotStartPos As Position
  Dim snsrVal As Position
	
  TakeArm Keep = 0
  
  Move P, @e P[1]				'Position to get workpiece
  
  Delay 100
  
  hand0.Chuck 1					'Hand chuck
  
  Delay 100
  
  Move P, @e P[2]				'Starting position
	
  startPos = CurPos				'Set the current position as
  						'the starting position
  
  ForceSensor 0					'Reset sensor
  
  Delay 500
	
  ForceCtrl True, 1, Mode = 1			'Start the Compliance Function with
  						'Force Sensor
	
  Do
  
  snsrVal = ForceValue(0)			'Acquire the sensor value
  
  'Condition for motion end
  'Wait until the tool end passes F1mm from the force control starting position  
        					
  If (Abs(PosZ(*)-PosZ(startPos)) > F[1]) Then GoTo StopProc 
  
  Loop
	
  StopProc:
  		
  ForceCtrl False				'End the force sensor
  
  hand0.Unchuck 0				'Unchuck the hand
  
End Sub

 

ID : 5471

<< Prev        Next >>