WriteDiscrete

Writes a range of bits to a discrete output channel.

WriteDiscrete Inputs

Parameter Description
Event

Specifies the event that forces an update.

This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function.
  • A cell containing an Event function.
  • A cell containing a Button function.
Start Bit

Specifies the first bit of the set to be written.

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

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

  • CC24 Cognex Communication Card: 1 to 16; default = 1
  • In-Sight D900 Series Vision System: 1 to 6; default = 1
Value Specifies the positive integer value to be written.
Pulse When checked, the output will be pulsed for the duration of the Pulse Length. Uncheck this checkbox for steady-state output.
Pulse Length (ms) Specifies the duration of an output pulse.

WriteDiscrete Outputs

Returns The value written, #ERR for any invalid input parameter.