Parallel I/O Control Capabilities of CVL
CVL provides the following capabilities for controlling parallel I/O output lines:
- Enable/disable line. An output line can be enabled or disabled, but must be enabled before any use. Disabling a line may leave its state floating or undetermined. For a bidirectional TTL line, enabling with the output function sets the line as a TTL output line. On some frame grabbers, setting one bidirectional TTL line as an output line also sets all of that frame grabber’s bidirectional lines as output lines.
- Set line state. You can set the state of an output line high (logic 1) or low (logic 0) by means of the ccOutputLine::set(polarity) member function. The effect of set(true) depends on whether the line is TTL or opto-isolated, as described in Enabling and Setting a ccOutputLine.
- Get line state. You can request the status of an output line with the ccOutputLine::get() member function. A returned value of true indicates the line’s state is high.
- Toggle line state. You can toggle the line’s state to its opposite state.
- Pulse line. You can generate a pulse of specified polarity and width (subject to granularity limitations).
CVL provides the following capabilities for controlling parallel I/O input lines:
- Enable/disable line. An input line can be enabled or disabled, but must be enabled before any use. Disabling a line may leave its state floating or undetermined. For a bidirectional TTL line, enabling with the input function sets the line as a TTL input line. On some frame grabbers, setting one bidirectional TTL line as an input line also sets all of that frame grabber’s bidirectional lines as input lines.
- Get line state. You can request the status of an input line with the ccInputLine::get() member function. A returned value of true indicates the line’s state is high.
- Enable callback. You can specify a callback function to be run on detection of a signal on an input line, and you can specify the incoming signal’s polarity state that qualifies as a detection.