Program Examples:Create Motion:Position Mode/zh-hans
< Program Examples:Create Motion:Position Mode
Revision as of 05:47, 17 July 2017 by Chi (talk | contribs) (Created page with "{{Languages}} 以下示例演示如何使用MOVE Command在位置模式下移动轴。<br/> 请注意调用子程序[[EtherCAT:EC_SET_MOTION_OPMODE|EC_SET_MO...")
语言: | English • 中文(简体) |
---|
以下示例演示如何使用MOVE Command在位置模式下移动轴。
请注意调用子程序EC_SET_MOTION_OPMODE,将轴和驱动器设置为'位置模式'。
请参考Axis Setup Procedure,了解如何设置轴的说明和示例。
program
attach a3
attach a5
call EC_SET_MOTION_OPMODE(a3, POSITIONMODE)
call EC_SET_MOTION_OPMODE(a5, POSITIONMODE)
a3.en=1
a5.en=1
sleep 1000
while 1
MOVE a3 25 vcruise=100 starttype=immediate abs = 1
MOVE a5 -25 vcruise=100 starttype=immediate abs = 1
while a3.IsMoving <> 0
sleep 1000
end while
while a5.IsMoving <> 0
sleep 1000
end while
MOVE a3 0 vcruise=100 starttype=immediate abs = 1
MOVE a5 0 vcruise=100 starttype=immediate abs = 1
while a3.IsMoving <> 0
sleep 1000
end while
while a5.IsMoving <> 0
sleep 1000
end while
end while
detach a3
detach a5
end program
该示例对应于在GIT中的提交的SHA-1: ba574128b365aebcd34f706e4c3a2c90762f7636。