SPEL+ Programming of the Force Monitor Function

Overview

A force monitor function is a function to measure the force and torque using the Force Sensor.
The results can be used to adjust the parameters when an application is created, or record and manage the forces applied to each workpiece during the operation.
Programming of the force monitor function is performed with the following procedure.

  1. Set the coordinate system to be executed
  2. Set the parameters
  3. Execute the force monitor function and take measurements

Coordinate System of the Force Monitor Function

The force monitor function works in the force coordinate system.

The force monitor function calculates the force detected by the Force Sensor, the force applied to the force coordinate system by the torque, and the torque itself, gets the values, and calculates the average and peak values.

Specify the origin of the force coordinate system in a point where contact actually occurs and a force is generated. (Example: Workpiece edge point, etc.)

Furthermore, the orientation of the force coordinate system varies depending on the application. When measuring the force in a constant direction, regardless of the posture of the robot, specify the base coordinate system and local coordinate system. When measuring the force in a direction that changes according to the posture of the robot, for example, in the forward direction of a workpiece held by the robot, specify the tool coordinate system and custom coordinate system.
The force monitor function can measure the following total of 8-dimensional data specified in the force coordinate system.

  • Six axes Fx to Tz
  • Fmag: Composite translation force
  • Tmag: Composite torque

Parameters of the Force Monitor Function

Parameters of the force monitor function are set in the properties of the force monitor object. They can be set in the GUI before executing a program. For details on the settings in the GUI, refer to the following section.
Software: [Robot Manager] [Tools] menu
- [Tools]-[Robot Manager]-[Force] Panel
If you want to dynamically change the parameters during executing a program, they can be set using an FSet statement.

  • ForceSensor Property
    Specify the Force Sensor number to execute the force monitor function.
  • CoordinateSystem Property
    Specify the force coordinate object for which the force monitor function is executed.
  • Fmag_Axes Property
    Specify the axis from Fx to Fz to be combined to calculate the Fmag value.
    To measure the force applied horizontally to the X-Y plane, specify the direction to be measured; for example, specify the X and Y axes.
  • Tmag_Axes Property
    Specify the axis from the axes (Tx to Tz) to be combined to calculate the Tmag value.
  • LPF_Enabled Property
    Specify the axis (Fx to Tmag) on which the low-pass filter is executed in the force monitor function.
    Use this property to reduce the noise or when ignoring Force Sensor values such as impulse.
  • LPF_TimeConstant Property
    Specify the time constant of the low-pass filter to be executed in the force monitor function.
    Increasing the value reduces the noise, but also reduces the response to the Force Sensor values.

Executing the Force Monitor Function

The following operations can be performed with the force monitor function.

  • Getting the Force Sensor Values
  • Recording the Force Sensor Values
  • Getting the Average Value
  • Getting the Peak Value
Getting the Force Sensor Values
Execute the Force property of the force monitor object to get the Force Sensor values.
Use example:
FGet FM1.Forces, rVar()
Get the 8-dimensional Force Sensor values for Fx to Tmag in real array variable rVar.
The Force Sensor values to be acquired are the latest values.
Getting the Average Value
Execute the AvgForceClear property of the force monitor object to start calculating the Force Sensor average value.
After the start, the average value can be acquired using the AvgForce status.
Use example:
FSet FM1.AvgForceClear, True, True, True, True, True, True, True, True
FGet FM1.AvgForces, rVar()
Get the 8-dimensional Force Sensor average value for Fz to Tmag in real array variable rVar.
Before executing the AvgForce status, be sure to start calculating the average value using the AvgForceClear property. If the calculation is not started, "0" is acquired.
Executing the AvgForce status stops the calculation of the average value. To get the average value consecutively, every time the average value is acquired, start calculating the average value again and then get the average value.
Executing the AvgForce status more than one minute after starting calculating the average value causes an error to occur. Either execute the AvgForce status within one minute or start calculating the average value again.
Getting the Peak Value
Execute the PeakForceClear property of the force monitor object to start calculating the Force Sensor peak value.
After the start, the peak value can be acquired using the PeakForce status.
Use example:
FSet FM1.PeakForceClear, True, True, True, True, True, True, True, True
FGet FM1.PeakForces, rVar()
Get the 8-dimensional Force Sensor peak value for Fx to Tmag in real array variable rVar.
Before executing the PeakForce status, be sure to start calculating the peak value using the PeakForceClear property. If the calculation is not started, "0" is acquired.
Executing the PeakForce status stops the calculation of the peak value. To get the peak value consecutively, every time the peak value is acquired, start calculating the peak value again and then get the peak value.
Recording the Force Sensor Values
Execute the RecordStart property of the force monitor object to record the Force Sensor values in a file.
This enables information on each operation to be stored in a file.
Use example:
FSet FM1.Label, "ForceLog"
FSet FM1.RecordStart, 30, 0.1
With the RecordStart property, start recording Force Sensor values, etc to the file for 30-second periods, with 0.1-second intervals. Before recording begins, the file name is determined from the label and start time specified in the Label property. After starting recording, the program goes to the next statement.