ID : 5030
Free Curve Interpolation
Free curve interpolation refers to the movement where the robot arm passes through each path point describing a smooth curve.
To perform free curve interpolation, use the "Move S" command to specify the path number.
Multiple path points, or position data can be registered to a single path data set. Free curve interpolation uses the specified path data set to pass through each registered path point at a constant speed in the specified order to form a smooth curve.
Data saved in advance may be used as path data, but path point data edited in PacScript can also be used.
3D spline interpolation is used to connect path points.
Precautions when Using Path Points
When "Move S" command is executed, the motion path will be calculated based on the current position and all path points registered in the specified path. Depending on the positional relationship between adjacent path points, motion path cannot be calculated and an error may occur.
- Assuming that a series of three path points are specified as A, B and C from the ascending order of the path number. If an angle between a vector from A to B and a vector from B to C is 180 degrees, the motion path cannot be calculated and an error may occur.
- If the path points are placed in proximity with each other and require a substantial amount of change in posture, calculation of the motion path cannot be performed and an error will be issued.
- In a case where the position and posture of two path points are extremely close to each other, the latter point will be excluded from the calculation. Any excluded path points cannot be acquired as passing points with "CurPathPoint".
Path Deviation
When deviating from the specified path at the time of operating, refer to "Path deviation prevention ".
Sample Program of Free Curve Interpolation
Program explanation
A sample script for sealing work is shown below.
Path data is saved in advanced in path number 1, with the assumption that there may be some misalignment in work positioning.
Argument "pGap" is the amount of such misalignment. Data shifted with the amount of misalignment is registered as path data 2
("PathPoint 2") to be used for free curve interpolation motion.
During free curve interpolation motion, the sealing task (Seal) is started. As the robot arm passes through the specified path
points, I/O will be turned ON and OFF.
<ProSpline.pcs>
#Define Home P(300,0,300,180,0,180) 'Home position
#Define sSpeed I[0] 'Free curve interpolation motion speed [mm/s]
Sub Main(ByVal pGap as Position)
' "pGap" is the amount of misalignment in work positioning.
Dim n As Integer
Dim posN As Position
TakeArm
ChangeWork 1
ChangeTool 1
'Create path points in "PathPoint 2".
' "PathPoint 1" holds the original path points registered.
'Add deviation "pGap".
ClrPathPoint 2
For n = 1 To GetPathPointCount(1)
posN = Dev(GetPathPoint(1,n), pGap)
AddPathPoint 2, posN
Next
'Free curve interpolation motion
Run Seal 'Program to eject sealant
SpeedMode 0 'Optimal speed control function OFF
HighPathAccuracy On 'High precision control function ON
Move S, 2, Speed = MPS(sSpeed)
HighPathAccuracy Off 'High precision control function OFF
SpeedMode 3 'Optimal speed control function ON
Move L, Dev(CurPos, P(0,0,50)), Speed = 20
Move P, Home
End Sub
<Seal.pcs>
#Define ioSeal IO[128]
#Define StartPathNo 3
#Define StopPathNo 150
Sub Main
ioSeal = Off
Wait CurPathPoint >= StartPathNo
ioSeal = On
Wait CurPathPoint >= StopPathNo
ioSeal = Off
End Sub
Related Terms
Path Point Registration Function, LoadPathPoint, AddPathPoint, ClrPathPoint, GetPathPoint, CurPathPoint
ID : 5030
- Related Information
- Path Point Registration Function
- Path Deviation Prevention