MC-Basic:CIRCLE/zh-hans
语言: | [[::MC-Basic:CIRCLE|English]] • [[::MC-Basic:CIRCLE/zh-hans|中文(简体)]] |
---|
缩写
格式
Circle <group> Angle = <angle> CircleCenter = {<vector>} {CirclePlane = <circle plane>} {Optional Nodal Property}*
Or
Circle <group> CirclePoint = <vector> TargetPoint = {<vector>} {Optional Nodal Property}*
适用版本
所有版本
描述
CIRCLE命令为指定的组/机器人发出圆(弧)路径轨迹,并使用该组的属性。 CIRCLE命令有两种格式。 一个指定组名称,角度和圆心。 该格式可用多圈圆周运动。 另一个由圆点和圆弧的最终点定义。 可选属性,在命令持续时间内的覆盖固定值。 使用可选属性时,必须指定该关键字。 对于机器人模型,CIRCLE命令在笛卡尔空间(XYZ)中发出圆形路径。 定向角度与圆角成比例地插值。 对于PUMA机器人,定向矢量保持与圆形路径正交。
类型
Double
取值范围
<group>: 现有的组
<angle>: ± MaxDouble - 正向为 CCW and 负方向旋转为 CW
<circle plane>:
- 0 (XY)
- 1 (XZ)
- 2 (YZ)
<vector>: 位置或关节值
单位
默认
使用固定属性值,除非另有规定。最终速度为0。
使用范围
Task or Terminal
限制
- 只应用于组
- 如果组中的轴单独移动,则无法移动组。
- 组必须关联到任务才能移动
例子
Circle XYTable Angle = 90 CircleCenter = {20,10} Vtran = 500
Circle XYtable CirclePoint = {10,20} TargetPoint = {100,200} Vtran = 500
半圆
Here is a simple example for generating half circle motion with a delta (XYZR) robot. 以下是使用delta(XYZR)机器人生成半圆运动的简单示例。
Attach DELTA
DELTA.En=1
Record circPnt.rec 100000 Gap=1 RecData = DELTA.SetPoint{1},DELTA.SetPoint{2}, Sys.Clock
Move DELTA #{100,0,426,0}
Delay DELTA 3000
RecordOn
Circle DELTA CirclePoint=#{0,100,426,0} TargetPoint=#{-100,0,426,0}
Delay DELTA 3000
RecordClose
Detach DELTA
螺旋
Here is a simple example for circle in 3D. The circle itself was defined at XY plane with additional movement in Z axis.
The code :
At the config file:
System.NumberAxes = 3 common shared Axes[3] as generic axis common shared temp_grp as group Axnm = a1 Axnm = a2 Axnm = a3 common shared PLANE_XY as const long =0 common shared PLANE_XZ as const long =1 common shared PLANE_YZ as const long =2 Program Axes[1] = a1 Axes[2] = a2 Axes[3] = a3 sys.DoubleFormat = 1 sys.Name = "Helical" with temp_grp End Program
The setup stage:
dim shared pdl as long = 2 Program continue dim i as long = 1 for i = 1 to 3 attach Axes[i] ' **** Setting Motion Parameters **** Axes[i].fmode = 0 Axes[i].pemax = 10 Axes[i].pfac = 2^16 Axes[i].vfac = Axes[i].pfac/1000/60 Axes[i].afac = Axes[i].vfac/1000 Axes[i].jfac = Axes[i].afac/1000 Axes[i].VCruise = 1000 Axes[i].vmax = 3000 Axes[i].vospd = Axes[i].vmax * 1.2 Axes[i].velocitysafetylimit = Axes[i].vmax * 1.5 Axes[i].amax = 30000 Axes[i].dmax = 30000 Axes[i].jmax = 300000 Axes[i].acc = Axes[i].amax Axes[i].dec = Axes[i].dmax Axes[i].jerk = Axes[i].jmax Axes[i].simulated = ON detach Axes[i] next call SetGroup terminate Program
The used subroutine and fumction at setup:
sub SetGroup attach en=0 vord = 100 Print ".... "; ElementName; " - kinematics/geometric setup" PeMax = 1 ' follwing error in mm (envelope) smooth = -1 prftype = 1 vfac = 1/1000 afac = vfac/1000 jfac = afac/1000 vmax = max(j1.vmax,j2.vmax) amax = max(j1.amax,j2.amax) dmax = amax decstop = 1.1*dmax jmax = max(j1.jmax,j2.jmax) PositionErrorDelay = pdl abs = 1 vcruise = 0.5 * Vmax acc = amax dec = dmax jmax = 10*amax jerk= jmax PositionErrorSettle = 0.1 ' 100um BlendingMethod = 0 configgroup detach end sub
function max(byval a as double, byval b as double ) as double if a > b then max = a else max = b end if end function
And the actual program:
dim shared circle_center[8] as joint of XYZ program dim index as long = 1 attach ?VesExecute(" sys.Motion= ON") call InitBuffer abs = 1 en =1 move {0 , 0 , 0} vcruise = 100 acc= 3000 move {25 , 0 , 0} vcruise =100 acc= 3000 call StillMoving record test11.rec 100000 gap =1 recdata = pcmd{1} , pcmd{2}, pcmd{3} recordon ' Start "helical" for index = 1 to 8 Circle Angle = 180 CircleCenter = (circle_center[index]+ {0,0,index*5}) Vtran = 500 CirclePlane = PLANE_XY call StillMoving print "Position" , pcmd , index next sleep 10 recordclose detach end program
The used subroutines:
sub StillMoving while ismoving <> 0 sleep 1 end while end sub
sub InitBuffer dim index as long for index=1 to 8 step 2 circle_center[index] = {0,0,0} next for index=2 to 8 step 2 circle_center[index] = {12.5,0,0} next end sub
The results:
|SEE ALSO=