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

From SoftMC-Wiki
< Program Examples:Create Motion:Torque Mode
Revision as of 05:53, 17 July 2017 by Chi (talk | contribs) (Created page with "{{Languages}} 以下示例演示如何使用TORQUE Command命令在转矩模式下向两个轴发出TORQUE命令。<br/> 请注意调用子程序[[EtherCAT...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: English  • 中文(简体)‎

以下示例演示如何使用TORQUE Command命令在转矩模式下向两个轴发出TORQUE命令。
请注意调用子程序EC_SET_MOTION_OPMODE,将轴和驱动器设置为'转矩模式'。
请参考Axis Setup Procedure,了解如何设置轴的说明和示例。

program

	attach a3
	attach a5

	call EC_SET_MOTION_OPMODE(a3, TORQUEMODE)
	call EC_SET_MOTION_OPMODE(a5, TORQUEMODE)

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

		TORQUE a3 40 starttype=immediate abs = 1
		TORQUE a5 -40 starttype=immediate abs = 1
		
		sleep 3000

		TORQUE a3 0 starttype=immediate abs = 1
		TORQUE a5 0 starttype=immediate abs = 1
		
		sleep 3000
		
	end while

	detach a3
	detach a5
	
end program

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


参见