CogIOMCB GetValue Method Cognex VisionPro 9.8
Get the state of the specified line on this device.

Namespace: Cognex.VisionPro.QuickBuild.IO
Assembly: Cognex.VisionPro.QuickBuild.IO (in Cognex.VisionPro.QuickBuild.IO.dll) Version: 75.1.0.0 (75.1.0.0)
Syntax

public bool GetValue(
	int line
)

Parameters

line
Type: System Int32
The line number. Must be in the range 0 to 23 inclusive.

Return Value

Type: Boolean
The state of the specified input line.
Exceptions

ExceptionCondition
ObjectDisposedException If this CogIOMCB object has already been disposed.
ArgumentOutOfRangeException If the line argument is less than zero or greater than 23.
InvalidOperationException If IsDeviceOpen is false.
InvalidOperationException If the specified line is not enabled.
InvalidOperationException If the port associated with the specified line is not configured for input.
See Also