NDM Status Signals Descriptions

System Status

Byte 0

Bit Name Description
7 Online

This bit is set when the vision system is running, or "Online", and cleared when the vision system is stopped, or "Offline". When the vision system is Offline, examine the Offline Reason field to determine the reason.

 

The state of this bit is set in the NDM by the NotifyStopped and NotifyRunning functions (see the NDM Notification Functions topic for more information), and can also be controlled by the Notify PLC block, when the Notification Method Type is set to either NotifyStopped or NotifyRunning.

Note: This bit must be set manually or programmatically; it will not be set automatically.
6-4 Offline Reason

This field is a user-defined 3-bit field used to identify the cause of why a vision system has stopped running, or is "Offline". It is used in conjunction with the NotifyStopped function. The NDM supports 3 bits of stopped code information, which are reflected in the PLC's "Offline Reason" signal.

Note: For more information, see the VisionPro Online Documentation NotifyStopped Method topic.
3-2 Reserved Unused.
1 System Busy

Set when the vision system is responding to user input. The state of this bit is set by the NotifySystemStatus function (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to NotifySystemStatus.

Note: This bit must be set manually or programmatically; it will not be set automatically.
0 System Ready

Indicates that the vision system has completed its startup and is ready to start its activities. The state of this bit is set in the NDM by the NotifySystemStatus function (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to NotifySystemStatus.

Note: This bit must be set manually or programmatically; it will not be set automatically.

Byte 1

Bit Name Description
7 General Fault

This bit is set whenever an error has been reported within the Error ID field. This bit is cleared by setting the Clear Error bit from the PLC. If another error is queued, the Error ID and General Fault bits will be set once the Clear Error bit is set to low.

 

Errors can be caused by PLC logic errors (for example, setting the Trigger bit when Trigger Ready is already low), or by the user, through the Notify PLC block.

 

Note: Error codes are buffered, and if there is more than one error code buffered, the Clear Error bit must be toggled several times to clear the buffer and the General Fault bit.
6 Reserved Unused.
5 Job Load Complete

This bit is toggled upon the completion of a job load operation.

4-0 Reserved Unused.

Byte 2-3

Byte Name Description
2-3 Reserved Unused

Byte 4-5

Byte Name Description
4-5 Current Job ID

The list of currently loaded job IDs, sorted by job slot. An empty job slot has a job ID of -1. The current software only supports a single job slot. The current NDM layout requires valid Job IDs fit in the range of unsigned 16-bit integers (0, 65535).

 

The NDM NotifyJobState function (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to NotifyJobState, must be called to inform the PLC of the necessary information.

Byte 6-7

Byte Name Description
6-7 Error ID

A 16-bit numeric representation of the error that has occurred.

Note: The NDM supports 16-bits of error code information. However, currently, the NDM does not define its own error codes. You must supply your own meaningful error codes as arguments to NotifyError(Int32). Cognex recommends using the lower 12-bits (0x0001 to 0x0FFF) for your error codes.

Byte 8-11

Byte Name Description
8-11 Soft Event Acknowledgment 0-31 These bits are used to indicate that the Soft Event command was received.

Byte 12-15

Byte Name Description
12-15 Reserved Unused

Engine 0 - 3

Byte 16, 24, 32 and 40

Bit Name Description
7 Results Buffer Overrun 0-3 This field is set when the Buffer Results Enable bit is set and the vision system has discarded a set of inspection results because the PLC has not acknowledged the results, and in turn set the Inspection Results Acknowledgment bit. Up to sixteen inspections are held in the vision system's buffer; therefore, this bit is set when the seventeenth inspection is added to the buffer. The seventeenth inspection, and all subsequent inspections, will be dropped until there is room in the buffer (when the results have been acknowledged out). The bit is not cleared until a valid inspection occurs and a previous inspection is not overwritten.
6 Inspection Passed 0-3

This bit is set if the most recent inspection passed; this bit is cleared if the inspection did not pass. The Inspection Passed bit is part of the "inspection results" package of signals: Inspection Results Code, Inspection Passed, Inspected Image ID and Inspection Results. Once the "inspection results" package is written to the outgoing FFP interface of the Cognex Communications Card or Vision Controller, the Results Valid bit will be set to High. This ensures that when the Results Valid bit has been set to High, all of the data tied to that signal is valid and accessible to the PLC.

Note:

The behavior of the Inspection Passed bit will depend on whether or not results buffering is disabled or enabled.

Buffering is Disabled Buffering is Enabled

When a new inspection result is available, the last inspection result will be overwritten by the latest one.

When buffering is enabled, the Inspection Results Acknowledgment bit is used to acknowledge that the results have been read. In the case where the buffer contains one result set, and the Inspection Results Acknowledgment bit is set to High and then Low, the Results Valid bit will be set to Low. This indicates that there are no more result sets in the buffer, and a new result set will automatically overwrite the existing set.

 

In the case where there are several result sets in the buffer, and the Inspection Results Acknowledgment bit is set to High, the Results Valid bit is set to High, then Low and then High again so a new set of results will be displayed by the PLC interface. Setting the Results Valid bit High and then Low should be done until the buffer is emptied.

Note: In the case with multiple results in the buffer, all of the data in the result set is available before setting the Results Valid bit High once again, which ensures that no inconsistent data can be from the PLC interface.
5 Results Valid 0-3

Set when the Inspection Count, Inspection Result Code, Inspection Results and/or Inspection Passed bits are set. The bit is cleared when the Inspection Results Acknowledgment bit is set.

Note: If overlapped job processing is enabled to occur, either the Buffer Results Enable bit should be enabled/set, and the Inspection Results Acknowledgment bit should be set to latch the inspection results.
4 Inspection Completed 0-3 This bit is toggled upon the completion of an inspection. It is guaranteed to be toggled after the Inspection Count, Inspection Result Code, Inspection Results and/or Inspection Passed bits are sent to the PLC.
3 Exposure Complete 0-3

It is set upon the completion of the vision system's exposure period, and is reset by the Clear Exposure Complete bit. This bit will be held in a reset state if the Clear Exposure Complete signal is set to High.

 

This bit is set in the NDM by the NotifyAcqComplete or NotifyAcqMovePart functions (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to either NotifyAcqComplete or NotifyAcqMovePart.

2 Acquisition Error 0-3

This bit is set when a vision system fails to acquire an image; it is cleared when a successful acquisition is triggered.

 

This bit is set in the NDM by the NotifyAcqError function (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to NotifyAcqError.

1 Trigger Acknowledgment Camera 0-3

Indicates when a vision system has been triggered by the Trigger bit being set; this bit will stay set until the Trigger bit is cleared. In addition, the Acquisition ID can be latched to the rising edge of this bit.

 

This bit is set in the NDM by the NotifyAcqStarted function (see the NDM Notification Functions topic for more information), or by a Notify PLC block, when the Notification Method Type is set to NotifyAcqStarted.

0 Trigger Ready Camera 0-3

Indicates when a vision system can accept a new trigger via the Trigger bit. This field is true when the Trigger Enable bit is set by the PLC, the NDM NotifyAcqReady function or a Notify PLC block (with the Notification Method Type set to NotifyAcqReady) is called, and the vision system is not acquiring an image.

 

This field is set to false when the Trigger Enable bit is set to false by the PLC, or the NDM NotifyAcqDisabled function or a Notify PLC block (with the Notification Method Type set to NotifyAcqDisabled) is called, and the vision system is acquiring an image.

Byte 17, 25, 33, 41

Bit Name Description
7-1 Reserved Unused.
0 Set UserData Acknowledgment 0-3 This bit is set to acknowledge completion of the Set User Data command.

Byte 18-19, 26-27, 34-35, 42-43

Byte Name Description

18-19,

26-27,

34-35,

42-43

Acquisition ID 0-3 This ID is user-defined, and can be used to synchronize an acquisition with its Inspection Results. It can be implemented to increment at the beginning of an acquisition and when the Trigger Ack bit is set.

Byte 20-21, 28-29, 36-37, 44-45

Byte Name Description

20-21,

28-29,

36-37,

44-45

Inspected Image ID 0-3 The acquisition ID of the image associated with a set of results.

Byte 22-23, 30-31, 38-39, 46-47

Byte Name Description

22-23,

30-31,

38-39,

46-47

Inspection Result Code 0-3 The inspection result code (typically pass, fail or warning) associated with a set of results.

Results

Byte Name Description
48-xxx Inspection Results Inspection result data collection. This is user-defined; the results size is defined for each inspection. For example, you can define the Inspection 0 results section to be larger than that defined for Inspection 1.