# WriteDiscrete

Writes a range of bits to a discrete output channel.

Note: Discrete output functions can only run when the vision system is Online.
Inputs

Parameter | Description
Event | Specifies the event that forces an update. This parameter needs to be a reference to any event with a timestamp, for example, one of the following: A cell containing an Event function. A cell containing a Button function.
Start Bit | Specifies the first bit of the set. The value of this parameter varies: The maximum allowed value varies depending on hardware and the number of output lines: In-Sight 2800: 6 In-Sight 3800: 5 In-Sight 8900: 3
Number of Bits | Specifies the number of bits in the set. The value of this parameter varies: The default value is 1. The maximum value is 16. The minimum allowed value is 1. The maximum allowed value varies depending on hardware and the number of output lines: In-Sight 2800: 7 In-Sight 3800: 6 In-Sight 8900: 4 Note: Number of Bits varies depending on hardware support and the number of output lines.
Value | Specifies the positive integer value. The maximum value depends on the number of written bits.
Override Output Delay | When checked, the function overrides the Output Delay setting defined in the Discrete I/O Settings dialog, if any. Note: The function can only override the Output Delay setting if it is already enabled. If Output Delay is disabled in the Discrete I/O Settings dialog, the function returns an error when trying to override the setting.
Output Delay (ms) | Defines the output delay in milliseconds.

Outputs

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