CP_Offset Statement
Sets the offset time to start the subsequent motion command when executing CP On.
Syntax
(1) CP_Offset [ On [, OffsetTime ] ]
(2) CP_Offset Off
Parameters
- On | Off
-
- On: Enables the motion command start offset function in CP On. If omitted, current setting will be displayed.
- Off: Disables the motion command start offset function in CP On.
- OffsetTime
- Specify the offset time to start the subsequent command in CP On by a real value from 10 to 24 (unit: ms). If omitted, the default value (10 ms) will be set.
Description
CP_Offset is available for following commands.
Move, Arc, Arc3, CVMove
If the CP parameter is added to CP On or motion commands, the subsequent command will be executed at the same time as the prior motion starts decelerating. As a result, the motions become a path motion as shown below, where deceleration of the first command and acceleration of the subsequent command overlap. At this moment, the start of deceleration for the first command and the start of acceleration for the subsequent command are not strictly simultaneous due to the processing overhead time for starting the statement. Therefore, the speed declines at the switching point in the path motion, and the motion will not be constant velocity. CP_Offset solves this problem by accelerating the starting time of the subsequent motion command.
Path Motion
Symbol | Description |
---|---|
a | Speed |
b | Time |
c | Start deceleration |
d | Start acceleration |
By setting CP_Offset on, the processing start of the subsequent motion command will be accelerated by the time specified for the OffsetTime parameter, and deceleration start of the actual robot and acceleration start of the subsequent command will be synchronized. As a result, the constant velocity can be improved. The OffsetTime parameter is set by default. Adjust the parameter according to your application. Especially when the subsequent motion command has “!Parallel Processing!”, the overhead time required for the motion start gets longer. Therefore, set the OffsetTime parameter higher than the default value, approximately 16 ms.
To set the OffsetTime parameter for CP_Offset, measure the speed of the tool center point for the target motion by using TCPSpeed. Setting an appropriate value for the OffsetTime parameter improved the motion at the switching point to be close to constant. TCPSpeed increases when OffsetTime is too large, and TCPSpeed decreases when OffsetTime is too small. Adjustment of CP_Offset must be done in actual system. Appropriate adjustment cannot be done in the simulator because the processing time to start the command differs from the actual controller.
Sample program for measurement using TCPSpeed
Function main
Motor On
Power High
SpeedS 250; AccelS 1500
Speed 50; Accel 50, 50
Go XY(300, 500, 500, 90, 0, 180)
CP_Offset On
Xqt printTcPSpeed
Move XY(0, 500, 500, 90, 0, 180) CP
Move XY(-300, 500, 500, 90, 0, 180)
Quit printTcPSpeed
CP_Offset Off
Fend
Function printTcPSpeed
Do
Print TCPSpeed
Loop
Fend
Example of OffsetTime adjustment
Symbol | Description |
---|---|
a | Appropriate OffsetTime |
b | OffsetTime=0 |
c | Too large OffsetTime |
This command is not intended for PTP motion. In PTP motion, the motion will be an usual path motion.
CP_Offset is off when any of the following conditions occur:
- Controller Startup
- Motor On
- SFree, SLock, Brake
- Reset or Reset Error is executed
- Task end by STOP switch or Quit All
See Also
CP_Offset Function, CP, Move, Arc, Arc3, CVMove
CP_Offset Statement Example
CP_Offset On
Move P1
Move P2
CP_Offset Off