<< Prev        Next >>

ID : 5670

OutputTCPSpeed

Function

By using the analog output board manufactured by CONTEC, output voltage in proportion to the TCP speed.

This command is available in Ver.1.10.* or higher.

Syntax

OutputTCPSpeed Port number , Maximum speed

Guaranteed Entry

Port number

Specify an output port number (0 - 2) by Integer type data.

Maximum speed

Specify the maximum speed (m/s) corresponding to the maximum voltage of analog board output by double precision real number type. To start output, specify a value larger than 0. To stop output, specify 0.

Description

By using the analog output board manufactured by CONTEC, output voltage in proportion to the speed of TCP in every 8 milliseconds. Based on the value specified as the maximum speed, convert the value to the voltage as shown below.

If the current speed is less than the maximum speed Maximum voltage X (Current speed / Maximum speed)
If the current speed is equal to the maximum speed or more Maximum voltage

The maximum voltage used here is the value which has been specified as the maximum output voltage of the board.

Attention

-

Example

Starting TCP Speed Output

!TITLE "OutputTCPSpeed_Start.pcs"

Sub Main

	Dim lPort As long
	Dim dMaxVelocity As Double

	'TakeArm Keep = 0

	dMaxVelocity = 250.0

	'PORT#0 Start analog output
	lPort = 0
	OutputTCPSpeed lPort, dMaxVelocity

	'PORT#1 Start analog output
	lPort = 1
	OutputTCPSpeed lPort, dMaxVelocity

	'GiveArm

End Sub

Stopping TCP Speed Output

'!TITLE "OutputTCPSpeed_Stop.pcs"	

Sub Main	

	Dim lPort As long
	Dim dMaxVelocity As Double

	'TakeArm Keep = 0

	dMaxVelocity = 0.0

	'PORT#0 Stop analog output
	lPort = 0
	OutputTCPSpeed lPort, dMaxVelocity

	'PORT#1 Stop analog output
	lPort = 1
	OutputTCPSpeed lPort, dMaxVelocity

	'GiveArm

End Sub

ID : 5670

<< Prev        Next >>