Homing 使用初始值

来源:互联网 发布:图160和b1b数据对比 编辑:程序博客网 时间:2024/05/16 19:11

Using the Origin Variable

In servo control applications, the Command and Actual Positions for an Axis are generally used for position error calculations. On each sample, the controller reads the new Actual Positions from the feedback devices and calculates the new Command Positions.

To determine the relationship between Command and Actual Positions for an Axis and physical positions on the machine, you can use the Origin variable (which can be set by the host).为了确定命令和实际位置的关系,可以使用origin 变量。

If it is important to set the Command or Actual Position to an exact value, you should use thempiAxisOriginSet(...) function. Calling mpiAxisOriginSet(...) will modify both Command and Actual Positions by the same amount.

The Origin variable can be set in two different ways depending on the desired result. For example, assume the Command and Actual Positions are 10,000 and 10,024 counts respectively and that the axis is not moving. 

Setting the Origin variable to 10,000 will result in Command Position = 0 and Actual Position = 24. Setting the Origin variable to 10,024 will result in Command Position = -24 and Actual Position = 0. 

This second method is the most frequently used method for setting the new Origin after homing. Refer to the next table.

Position and Velocity criteria for generating motion completion events
If Command Position =
If Actual PositionAnd you set Origin VariableThen Command Position =
And Actual Position =
10,000
10,024
10,000
0
24
10,000
10,024
10,024
-24
0

Cautions about motion in general:

 
  1. During motion, you should never call the mpiAxis[Actual|Command]PositionSet(...) ormpiAxisCommandOriginSet(...) functions. 

  2. Setting a new Position using mpiAxisCommandPositionSet(...) ormpiAxisActualPositionSet(...) should be done with caution, because the controller will immediately try to servo to the new position. If the new and old command positions differ by a large amount the axis may fault (limit error) or jump to the new position at very high speed. Setting new positions with mpiAxisOriginSet(...) or mpiAxisCommandOriginSet(...) will not cause a jump.
    使用mpiAxisOriginSet(...) or mpiAxisCommandOriginSet(...) 不会导致电机跳跃
  3. The effect of any origin or position set functions calls will not be seen by the host until the next controller sample following the call. 

  4. Calling mpiAxisOriginSet() while an axis is in motion will change the final target position's value. This will not change the trajectory however. If the axis was to originally move 5000 counts, then the axis will still move a total of five thousand counts. 在运动过程中调用mpiAxisOriginSet(),不会导致最终目标位置的改变。
    Start 
    Position
    Actual 
    Position
    End 
    Position
    Comment
    0
    0
    5000
    The beginning of a 5000 count move, origin currently 0.
    0
    2500
    5000
    Origin is about to be set to 2000.
    -2000
    500
    3000
    Origin has been changed to 2000.终止位置相应改变
    -2000
    3000
    3000
    Motion is complete. Distance traveled still 5000 counts.

阅读全文
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 自考档案搞丢了怎么办 自考本科档案在自己手里怎么办? 本科自考准考证丢了怎么办 大学团员证丢了怎么办 大学开学团员证丢了怎么办 研究生开学没有团员证怎么办 研究生开学已经不是团员了怎么办 毕业了要搬宿舍怎么办 中专学历认证已停止怎么办 中专不做学历认证考试怎么办 大学生欠学费被扣毕业证怎么办 考警校体检没过怎么办 美国签证申请预约名字写错怎么办 当兵不从学校走怎么办 门牙崩了一小块怎么办 遇到很难过的事情怎么办 小孩子上课精力不集中怎么办 每天工作都很累压力大怎么办 重体力活搬不动怎么办 大学没参加体测怎么办 英文写的很丑怎么办 患有勃起障碍应该怎么办较好 运动过度小腿肌肉酸痛怎么办 高考有纹身是字怎么办 新生儿测听力没过关怎么办 色弱高考体检时没查出来怎么办 公司福利体检查二对半怎么办 高考体检表复印件丢了怎么办 高考体检表身高填错了怎么办 大学档案高考体检表丢了怎么办 工厂组织体检我有乙肝怎么办 我有乙肝单位组织体检怎么办? 矮腰袜子老掉怎么办 短腰袜子老下滑怎么办 中考体检结果丢了怎么办 咳嗽左胸围一处刺痛怎么办? 阴茎小父母催婚怎么办 头发扎进指甲缝怎么办 指甲缝扎流血了怎么办 中考考差了高中怎么办 骨折后我抽烟了怎么办