SPEL+ Programming of the Force Trigger Function
Overview
A force trigger function is a function to detect that the force and torque measured using the Force Sensor reached the set value.
The process can be started, ended, and branched using the results.
Programming of the force trigger function is performed with the following procedure.
- Set the coordinate system to be executed
- Set the parameters
- Execute the force trigger function
- Get the results
Coordinate System of the Force Trigger Function
The force trigger function works in the force coordinate system.
The force trigger function calculates the force detected by the Force Sensor, the force applied to the force coordinate system by the torque, and the torque itself, and monitors whether the values met the set conditions.
Specify the origin of the force coordinate system in a point where contact actually occurs and a force is generated. (Example: Tip point of a workpiece)
Furthermore, the orientation of the force coordinate system varies depending on the application. When monitoring the force in a constant direction, regardless of the posture of the robot, specify the base coordinate system and local coordinate system.
When monitoring the force in a direction that changes according to the posture of the robot, specify the tool coordinate system and custom coordinate system.
The force trigger function can monitor 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 Trigger Function
Parameters of the force trigger function are set in the properties of the force trigger 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 trigger function.
- CoordinateSystem Property
Specify the force coordinate object for which the force trigger function is executed.
- Operator Property
Specify the criterion for meeting the condition of the force trigger function; specifically whether all conditions for each axis are met or whether the conditions of a particular axis are met.
- TriggerMode Property
Specify whether to monitor the force and torque, or to monitor the changes in the force and torque.
If a change value is specified, the change value per second is monitored. Since the Force Sensor is susceptible to noise, use a low-pass filter.
- Fmag_Axes Property
Specify the axis from the axes (Fx to Fz) to be combined to calculate the Fmag value.
To monitor the force applied to the X-Y plane, specify the direction to be monitored; 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.
- Enabled Property
Specify the axis (Fx to Tmag) on which the force trigger function is executed.
The force trigger function can be enabled only for the axes necessary for an application.
- Polarity Property
Specify the criterion for meeting the condition, whether the force and torque for each axis falls inside or outside the upper/lower threshold ranges.
To detect that a force outside the threshold range is applied, specify outside.
To detect that a force inside the threshold range is applied, specify inside.
- UpperLevel Property
Set the upper level of the force trigger function.
This function monitors whether the value is below or rises above the set value.
- LowerLevel Property
Set the lower level of the force trigger function.
This function monitors whether the value is above or falls below the set value.
- LPF_Enabled Property
Specify the axis (Fx to Tmag) on which the low-pass filter is executed in the force trigger 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 trigger function.
Increasing the value reduces the noise, but also reduces the response to the Force Sensor values.
Executing the Force Trigger Function
The force trigger function can be specified by Till, Wait, Trap, and Find.
For the basic functions of the commands, refer to the following manual.
"Epson RC+ 8.0 SPEL+ Language Reference"
The following describes the force trigger function. Up to 15 force triggers for monitoring can be set for each robot simultaneously. Do not use more than 16 force motion restrictions for one robot simultaneously.
Till
Specifying the force trigger object in the event expression of the Till statement sets the end condition for the operation of the force trigger function. Thus, when the force reaches the specified value, the operation ends.Use example:
Till FT1 Move P1 FC1 Till
The force trigger is set to the Till condition by the Till statement. When the condition set in force trigger object FT1 is met during Move operation, the Move operation stops even if part way through the operation and the next statement is executed.
Trap
Specifying the force trigger object in the event expression of the Trap statement sets the condition for the force trigger function to start the interrupt processing. Thus, the force is always monitored, and when the force reaches the specified value, the interruption starts.Use example:
Trap 1, FT1 Goto TrapLabel
The force trigger function is executed by the Trap statement to start monitoring of the condition. When the condition set in force trigger object FT1 is met, the transition to the specified label occurs.
Wait
Specifying the force trigger object in the event expression of the Wait statement sets the condition for the force trigger function to end the standby state. Thus, the force trigger function stands by until the force reaches the specified value.Use example:
Wait FT1
The force trigger function is executed by the Wait statement to start monitoring of the condition. The program is stopped until the condition set in force trigger object FT1 is met, and the program is restarted when the condition is met.
Find
Specifying the force trigger object in the event expression of the Find statement sets the condition to save the coordinates while the force trigger function is in operation. Thus, the position at which the specified force is reached is recorded.Use example:
Find FT1 P0=FindPos
The force trigger function is executed by the Find statement to start monitoring of the condition. The Controller memorizes the position at which the condition set in force trigger object FT1 is met and gets that position with the FindPos function.
The force trigger function can get the position at which the condition is met using the TriggeredPos status. Therefore, Find is useful when specifying an event expression combining multiple conditions. The TriggeredPos status can be used to get the position at which the condition set in the force trigger object is met. The FindPos function can be used to get the position at which an event expression combining multiple conditions is met.
Do not delete the force trigger object which starts monitoring by using FDel statement. When creating a program in multiple tasks, be careful not to execute Till, Wait, Trap, and Find simultaneously which specified force trigger objects.
Getting the Results of the Force Trigger Function
Specifying the status of the force trigger object using the FGet statement after executing the force trigger function can get the results. The acquired results can be used to determine the pass or fail of the operation, or perform conditional branching.
The status is initialized when the force trigger function is executed, and the result is set when the force trigger function ends. The set result is retained until either the force trigger function is executed again or a project is loaded.
Triggered Status
Returns the status of achievement of the force trigger condition.Returns "True" if the condition is achieved in the previous force trigger condition. This result can be used to determine whether the force exceeded the specified value, and branch the process.
TriggeredAxes Status
Returns the status of achievement of the force trigger condition for each axis.It can determine more detailed conditions; for example, determine the axis on which the force exceeded the specified value, and branch the process.
TriggeredPos Status
Returns the coordinates at which the force trigger condition was achieved.It can determine whether the position at which the condition was achieved is within the specified range, and branch the process according to the position.