ID : 5669
TCP速度输出样品程序
TCP速度输出开始和输出结束用样品程序如下所示。
TCP速度输出开始
PORT#0和#1的模拟输出开始示例。
将最大速度指定为250.0m/s,输出开始。
!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速度输出停止
PORT#0和#1的模拟输出停止示例。
将最大速度指定为0,输出停止。
'!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 SubID : 5669

