ID : 5670
OutputTCPSpeed
功能
使用CONTEC制造的模拟输出板,输出与TCP的速度成比例的电压。
格式
OutputTCPSpeed 端口编号 , 最大速度
指定项目
解说
使用CONTEC制造的模拟输出板,以8ms的周期,输出与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