SPEL+ Programming of the Force Motion Restriction Function
Overview
A force motion restriction function is a function to detect the robot position or posture reaches the set value.
The process can be started, ended, and branched using the results.
Programming of the force motion restriction function is performed with the following procedure.
- Set the parameters
- Execute the force motion restriction function
- Get the results
Parameters of the Force Motion Restriction Function
Parameters of the force motion restriction function are set in the properties of the force motion restriction 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 that is the target of the force and torque to be recorded when the conditions of the force motion restriction function are achieved.
- CoordinateSystem Property
Specify the force coordinate system object that specifies the force coordinate system of the force and torque to be recorded when the conditions of the force motion restriction function are achieved.
- 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.
- RobotLocal Property
Specify the local coordinate system that is the reference for the position monitored by the force motion restriction function.
- RobotTool Property
Specify the tool coordinate system that is the reference for the position monitored by the force motion restriction function.
- TriggerMode Property
Specify the position to be monitored.
For details on each mode, refer to the following manuals:
"Epson RC+ 8.0 Option Force Guide 8.0 SPEL+ Language Reference"
- DatumPoint Property
Specify the reference point when RelativePoint is set for TriggerMode.
- Dist_Axes Property
Specify which axis of X, Y, and Z is used to calculate the distance.
- Rot_Axes Property
Specify which axis of X, Y, and Z is used to calculate the angle.
- Enabled Property
Specify the axis for executing the force motion restriction function for PosX to J6.
You can enable the force motion restriction function only for the axes required by the application.
- Polarity Property
Specify the criterion for meeting the condition, whether the position, angle, and indirectly position falls inside or outside the upper/lower threshold ranges.
To detect that the robot moves to the position and posture outside the threshold range, specify outside.
To detect that the position and posture is inside the threshold range, specify inside.
- UpperLevel Property
Set the upper level of the force motion restriction function.
This function monitors whether the value is below or rises above the set value.
- LowerLevel Property
Set the lower level of the force motion restriction function.
This function monitors whether the value is above or falls below the set value.
Executing the Force Motion Restriction Function
The force motion restriction 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 motion restriction function. Up to 15 force motion restrictions 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 motion restriction object in the event expression of the Till statement sets the end condition for the operation of the force motion restriction function. Thus, when the force reaches the specified value, the operation ends.Use example:
Till FMR1 Move P1 FC1 Till
The force motion restriction is set to the Till condition by the Till statement. When the condition set in force motion restriction object FMR1 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 motion restriction object in the event expression of the Trap statement sets the condition for the force motion restriction function to start the interrupt processing. Thus, the position/posture is always monitored, and when the position/posture reaches the specified value, the interruption starts.Use example:
Trap 1, FMR1 Goto TrapLabel
The force motion restriction function is executed by the Trap statement to start monitoring of the condition. When the condition set in force motion restriction object FMR1 is met, the transition to the specified label occurs.
Wait
Specifying the force motion restriction object in the event expression of the Wait statement sets the condition for the force motion restriction function to end the standby state. Thus, the force motion restriction function stands by until the position/posture reaches the specified value.Use example:
Wait FMR1
The force motion restriction function is executed by the Wait statement to start monitoring of the condition. The program is stopped until the condition set in force motion restriction object FMR1 is met, and the program is restarted when the condition is met.
Find
Specifying the force motion restriction object in the event expression of the Find statement sets the condition to save the coordinates while the force motion restriction function is in operation. Thus, the position at which the specified position/posture is reached is recorded.Use example:
Find FMR1 Move P1 FC1 Find P0=FindPos
The force motion restriction is set to the Find condition by the Find statement, and when the condition set on the force motion restriction object FMR1 is reached during the Move operation, the controller memorizes the position where the condition is met, and gets that position with the FindPos function.
The force motion restriction 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 motion restriction 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 motion restriction 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 motion restriction objects.
Getting the Results of the Force Motion Restriction Function
Specifying the status of the force motion restriction object using the FGet statement after executing the force motion restriction 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 motion restriction function is executed, and the result is set when the force motion restriction function ends. The set result is retained until either the force motion restriction function is executed again or a project is loaded.
Triggered Status
Returns the status of achievement of the force motion restriction condition.
Returns "True" if the condition is achieved in the previous force motion restriction condition. This result can be used to determine whether the position/posture exceeded the specified value, and branch the process.TriggeredAxes Status
Returns the status of achievement of the force motion restriction 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 motion restriction 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.TriggeredForces Status
Returns the force and torque when the force motion restriction condition is reached.
It can determine whether the force at which the condition was achieved is within the specified range, and branch the process according to the force.