EasyManua.ls Logo

Denso SMT7 - Page 104

Denso SMT7
118 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4 Configuring the Joint Parameters
88
MotionComp
Function
Judges whether execution of running motion commands is complete.
Syntax
MotionComp(<MotionCommandComplete>)
Description
If MotionComp judges that execution of running motion commands is complete,
then it returns "1" in <MotionCommandComplete>.
This command checks motion commands running in the task in which the
MotionComp executes. It is not applicable to motion commands in any other
tasks.
If a motion command has an encoder value check option, then MotionComp
will interpret the moment when the encoder count is converged within the
positioning error allowance as completion of the motion command. For other
operations, if motion control to the servo loop disappears, then MotionComp
will judge that the command is complete.
Macro definition
Not needed.
Related commands
GetJntData, GetSrvData, and MotionSkip
Notes
(1) Execute this command in a TAKEARMed task that holds an arm
semaphore. If not in a TAKEARMed task, the error "Not executable" will
result.
(2) Executing MotionComp in a robot motion task will judge whether robot
motion commands are complete. Executing it in an extended-joint motion
task will judge whether extended-joint motion commands are complete.
If MotionComp executes in a motion task holding an arm group involving
both robot joints and extended-joints, then completion of both the robot
and extended-joint motions will be judged.
(3) When the motion is on Halt, MotionComp will interpret it as operation
being in progress.
(4) If you use a local variable for <MotionCommandComplete>, the local
variable must be reset to "0" beforehand.
Example
defint comp=0 'Initialize motion command completion status.
defjnt lj1
defsng lf1
move p,P1,next
DO
lj1=GetSrvState(2) 'Get error of each joint rotation.
lf1=ABS(JOINT(2,lj1)) 'Select the rotation error of J2.
if lf1 > 10000 then
CALL MotionSkip If the rotation error of J2 exceeds 10000 (in pulses),
'then abort motion commands and end the loop.
EXIT DO
endif
CALL MotionComp(comp)
LOOP UNTIL comp=1 'Loop until the end of motion commands.

Table of Contents

Related product manuals