ReadDiscrete

Reads a range of bits from a discrete input channel.

ReadDiscrete Inputs

Parameter Description
Event

Specifies the update event on which to read.

This parameter needs to be a reference to any event with a timestamp, for example AcquireImage function.

Start Bit

Specifies the first bit of the set to be read.

  • CC24 Cognex Communication Card: 0 to 7; default = 0
  • In-Sight D900 Series Vision System: 1 to 2; default = 1
Number of Bits

Specifies the number of bits in the set to be read.

  • CC24 Cognex Communication Card: 1 to 8; default = 1
  • In-Sight D900 Series Vision System: 1 to 3; default = 1

ReadDiscrete Outputs

Returns The positive integer value read, or #ERR for any invalid input parameter.