<< 向前        下一页 >>

ID : 5670

OutputTCPSpeed

功能

使用CONTEC制造的模拟输出板,输出与TCP的速度成比例的电压。

格式

OutputTCPSpeed 端口编号 , 最大速度

指定项目

端口编号

使用整数型数据指定输出端口编号(0~2)。

最大速度

使用双精度实数型数据指定板输出的最大电压相应的最大速度[m/s]。如果指定为大于0的值,则开始输出数据。如果指定为0,则停止输出数据。

解说

使用CONTEC制造的模拟输出板,以8ms的周期,输出与TCP的速度成比例的电压。根据最大速度中的指定值转换为下表所示电压。

当前速度低于最大速度时 最大电压×(当前速度/最大速度)
当前速度高于最大速度时 最大电压

最大电压使用板的输出范围中已设定的值。

相关项目

TCP速度输出功能

注意事项

-

应用示例

TCP速度输出开始

!TITLE "OutputTCPSpeed_Start.pcs"

Sub Main

	Dim lPort As long
	Dim dMaxVelocity As Double

	'TakeArm Keep = 0

	dMaxVelocity = 250.0

	'PORT#0 模拟输出开始
	lPort = 0
	OutputTCPSpeed lPort, dMaxVelocity

	'PORT#1 模拟输出开始
	lPort = 1
	OutputTCPSpeed lPort, dMaxVelocity

	'GiveArm

End Sub

TCP速度输出停止

'!TITLE "OutputTCPSpeed_Stop.pcs"	

Sub Main	

	Dim lPort As long
	Dim dMaxVelocity As Double

	'TakeArm Keep = 0

	dMaxVelocity = 0.0

	'PORT#0 模拟输出停止
	lPort = 0
	OutputTCPSpeed lPort, dMaxVelocity

	'PORT#1 模拟输出停止
	lPort = 1
	OutputTCPSpeed lPort, dMaxVelocity

	'GiveArm

End Sub

ID : 5670

<< 向前        下一页 >>