ID : 4944
AddPathPoint
Function
To add a path point to the path data.
Syntax
AddPathPoint path number, path point [, tool coordinate [, work coordinate]]
Guaranteed Entry
- Path number
- Specify an additional path number (1 to 20) by integer type data.
- Path point
- Specify the position of the path point to add. You can specify the path point with any of position type, joint type, homogeneous translation type data.
- Tool coordinate
- Specify each element (X, Y, Z, Rx, Ry, Rz) of the tool coordinate that is used to determine whether the newly added point is within the robot's motion range. To specify each element, use position type. You can specify it with the tool coordinate system number (-1 to 63) with integer type data as well.
If you specify with position type data, Fig is ignored.
"-1" represents the currently used tool number. 0 to 63 represents the tool coordinate number. This entry is omittable. This should be "-1" (current tool number) if this is omitted. - Work coordinate
- Specify each element (X, Y, Z, Rx, Ry, Rz) of the work coordinate that is used to determine whether the newly added point is within the robot's motion range. To specify each element, use position type. You can specify it with the work coordinate system number (-1 to 7) with integer type data as well.
If you specify with position type data, Fig is ignored.
"-1" represents the currently used work number. 0 to 7 represents the work coordinate number. This entry is omittable. This should be "-1" (current work number) if this is omitted.
Tool coordinate and Work coordinate can be specified with position type data if your controller software's version is 2.7.* or higher.
Description
To add a path point to the path data.
If there are already some path points in the path data with the designated path number, it will be added following the data.
Based on the specified tool coordinate and work coordinate, this command check if the added path point exists within the robot's motion range. If no tool and work coordinates are specified, currently used tool coordinate and work coordinate are used for the check.
During the tracking path point setting operation with a teach pendant, you can register the work coordinate used here in the P-type variable. For details, refer to "[Sensor Tracking] Setup Procedure of Free Curve Interpolation" or "[Vision Tracking] Setup Procedure of Free Curve Interpolation" in the CONVEYOR TRACKING MANUAL.
Path points which are added using this command will be stored in the working memory, not in the storage memory. Therefore, you can use it until turning off the controller, but when you turn the controller again, you cannot use it any longer.
Related Terms
Free Curve Interpolation, Path Point Setting Function, ClrPathPoint, GetPathPoint, LoadPathPoint, GetPathPointCount
Attention
- You can set in the use condition as to whether to clear a path point data at TakeArm. It is not cleared as a default setting. (Difference from RC7M controller)
- If an error occurs when you are adding path points using this command and the program is rebooted, added path points will not be cleared and you can add new path point straight away. To prevent this, use ClrPathPoint or LoadPathPoint for initialization before using this command.
- When the path point is specified with joint type data, if either the tool coordinate or work coordinate is specified, based on the entered coordinate, calculate the position type data and the calculated position type data is saved. If either the tool coordinate or work coordinate are not specified, position type data is calculated based on the currently used tool coordinate or the work coordinate system, and the calculated position type data is saved.
Example
#Define Home P(300,0,300,180,0,180,-1)
#Define PartsNum I[10]
#Define BasePathNum 10
Sub Main
Dim PathNum As Integer 'Path data for each part number
Dim Pos As Position
Dim n As Integer
LoadPathPoint BasePathNum 'Initialization (Back to basic path data)
PathNum = Int(PartsNum / 1000) 'Set a path number for the part number (4th digit)
For n = 1 To GetPathPointCount(PathNum)
Pos = GetPathPoint(PathNum, n) 'Load path point data of the part number
AddPathPoint BasePathNum, Pos 'Add path point to the basic path
Next
TakeArm
Move S, BasePathNum, Speed = Mps(150) 'Move the robot by free curve interpolation.
Move P, Home
End Sub
ID : 4944