CogIOMCB SetValue Method Cognex VisionPro 9.10
Set the specified line on this device to the specified state. Note that this method honors the configured polarity of the specified line. That is, if the specified line is configured for HighToLow polarity, the value argument will be inverted.

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

public override void SetValue(
	int line,
	bool value
)

Parameters

line
Type: System Int32
The line number. Must be in the range 0 to 23 inclusive.
value
Type: System Boolean
The desired line state. Note that this method honors the configured polarity of the specified line. That is, if the specified line is configured for HighToLow polarity, the value argument will be inverted.
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 the specified line is not currently enabled.
InvalidOperationException If the port associated with the specified line is not currently configured for output.
See Also