Difference between revisions of "Program Examples:Robot Circle Command/zh-hans"
(Created page with "{{Languages}} Here is an example of using circle command. we we use puma robot in this example: Click image for 360° video: [[File:roboDK_circle1.png|link=http://softmc.ser...") |
|||
Line 1: | Line 1: | ||
− | {{Languages}} | + | {{Languages|Program_Examples:Robot_Circle_Command}} |
− | + | 以下是使用circle命令的示例。 我们在这个例子中使用puma机器人: | |
− | + | 点击图像查看360°视频 | |
[[File:roboDK_circle1.png|link=http://softmc.servotronix.com/img_auth.php/4/47/roboDK_circle.html|400px]] | [[File:roboDK_circle1.png|link=http://softmc.servotronix.com/img_auth.php/4/47/roboDK_circle.html|400px]] |
Latest revision as of 06:25, 17 July 2017
语言: | English • 中文(简体) |
---|
以下是使用circle命令的示例。 我们在这个例子中使用puma机器人:
点击图像查看360°视频
RobCircl.PRG:
'------------------------------------------------------------------------------
' File: RobCircl.prg
' Purpose: generating circle contour with a puma robot
' Version: 1.00
' Author: Eran Korkidi
' History: 08.DEC.2015 - created
'------------------------------------------------------------------------------
dim shared jntZeroPosition as joint of xyzypr = {0,0,0,0,0,0}
dim shared locCircleCenter as location of xyzypr =#{1101.57 , 0 , -49.804 , 0 , 180 , 0}
dim shared locCircleStart as location of xyzypr = #{901.572 , 0 , -49.804 , 0 , 180 , 0}
program
Sys.Vrate = 100.0
with Puma
Attach
En = TRUE
Sleep 100
while NOT En
Sleep 100
end while
call circularMotion
Detach
end with
end program
sub circularMotion
dim dVelSlow as double = 20.0
Move PUMA locCircleStart Vcruise=dVelSlow
call waitMotion
Circle PUMA Angle=5*360 CircleCenter = locCircleCenter Vtran = PUMA.VmTran/2
call waitMotion
Move PUMA jntZeroPosition Vcruise=dVelSlow
call waitMotion
end sub
sub waitMotion
while puma.IsMoving
Sleep 1
end while
end sub