ReadDiscrete
Reads a range of bits from a discrete input channel.
Note:
- This function is enabled only when the vision system is Online.
- In job deployment environments where In-Sight Explorer or the VisionView application are monitoring inspections, if the job depends on a Soft Event (e.g., configured as a Timer function) to trigger a spreadsheet event, it may cause the inspection of an image to be delayed if it is triggered shortly before the acquisition cycle completes. If the job file is large (i.e., it contains many Vision Tools, such as Pattern Match, Flaw Detection or InspectEdge tools, in addition to other job logic), the update required by In-Sight Explorer or VisionView may prevent an image from being inspected until the display update is queued. For applications that require exact timing (e.g., measured in the 10s of milliseconds), this update might delay the determination of pass/fail results and the transmission of results to the next station (e.g., a PLC or motion controller) in the inspection process. To avoid delayed inspections in these application environments, Cognex recommends Soft Events not be used.
ReadDiscreteInputs
Syntax: ReadDiscrete(Event,Start Bit,Number of Bits)
Parameter | Description |
---|---|
Specifies the update event on which to read. This parameter must be a reference to one of the following:
|
|
Specifies the first bit of the set to beread.
|
|
Specifies the number of bits in the set tobe read.
|
ReadDiscreteOutputs
Returns | The positive integer value read, or #ERRfor any invalid input parameter. |