<< Prev        Next >>

AddPathPoint

Function

To add a path point to the path data.

Syntax

AddPathPoint path number, position data

Guaranteed entry

Path number
Designate additional path number (1 to 20) by integer type data.
Position data
Designate additional position data by data for positioning. You can designate either of position type, joint type, homogeneous translation type data.

Description

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.

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.

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 you designate joint type data to position data, position type data will be calculated through the current work coordinates and current tool at the time of its execution, and position type data will be stored.

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)	'Spline motion
	
	Move P, Home
End Sub

<< Prev        Next >>