Program Examples:Create Motion:Velocity Mode/zh-hans

From SoftMC-Wiki
< Program Examples:Create Motion:Velocity Mode
Revision as of 05:50, 17 July 2017 by Chi (talk | contribs) (Created page with "{{Languages}} 以下示例演示如何使用JOG Command在速度模式下移动轴。<br/> 请注意调用子程序[[EtherCAT:EC_SET_MOTION_OPMODE|EC_SET_MOTI...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: English  • 中文(简体)‎

以下示例演示如何使用JOG Command在速度模式下移动轴。
请注意调用子程序EC_SET_MOTION_OPMODE,将轴和驱动器设置为'速度模式'。
请参考Axis Setup Procedure,了解如何设置轴的说明和示例。

program

	attach a4
	attach a5

	call EC_SET_MOTION_OPMODE(a4, VELOCITYMODE)
	call EC_SET_MOTION_OPMODE(a5, VELOCITYMODE)

	a4.en=1
	a5.en=1
	
	sleep 1000
	
	while 1

		JOG a4 50 starttype=immediate
		JOG a5 -50 starttype=immediate
		
		sleep 3000

		JOG a4 -50 starttype=immediate
		JOG a5 50 starttype=immediate
		
		sleep 3000
		
	end while

	detach a4
	detach a5
	
end program


该示例对应于在GIT中的提交的SHA-1: ba574128b365aebcd34f706e4c3a2c90762f7636 in GIT.


参见