CogNdmProfinet ClassCognex VisionPro 9.5

The Network Data Model (NDM) allows Cognex Vision Systems interact with different PLCs and Ethernet based factory floor protocols in a uniform fashion.

This class is the PROFINET specific implementation of the NDM. There are three members of this class that are specific to PROFINET and are not part of the CogNdm base class. They are:

Inheritance Hierarchy

System Object
  Cognex.VisionPro.Comm CogNdm
    Cognex.VisionPro.Comm CogNdmProfinet

Namespace: Cognex.VisionPro.Comm
Assembly: Cognex.VisionPro.Comm (in Cognex.VisionPro.Comm.dll) Version: 69.0.0.0
Syntax

public class CogNdmProfinet : CogNdm, 
	IDisposable

The CogNdmProfinet type exposes the following members.

Methods

  NameDescription
Public methodDispose  (Inherited from CogNdm.)
Protected methodDispose(Boolean) (Overrides CogNdm Dispose(Boolean).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize (Inherited from CogNdm.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetProfinetConfig
Gets the PROFINET specific NDM settings.
Public methodGetProtocolConnectionStatus
Gets the connection status for the specified protocol.
(Inherited from CogNdm.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNotifyAcquisitionComplete
Notify the remote device (PLC) that an acquisition has completed. You must call this method to notify the PLC when an an acquisiton is complete. If you do not call this function the Trigger Ready bit will never get re-enabled an no more acquisitions can occur.
(Inherited from CogNdm.)
Public methodNotifyAcquisitionDisabled
Optionally notify the remote device (PLC) that the Vision System is unable to receive acquisition triggers.
(Inherited from CogNdm.)
Public methodNotifyAcquisitionError
Notify the remote device (PLC) that an acquisition error has occurred.
(Inherited from CogNdm.)
Public methodNotifyAcquisitionMovePart
Optionally notify the remote device (PLC) that the exposure is complete or the strobe has fired and it is now safe to move the part from the field of view.
(Inherited from CogNdm.)
Public methodNotifyAcquisitionReady
Notify the remote device (PLC) that the Vision System is ready to receive the first acquisition trigger.
(Inherited from CogNdm.)
Public methodNotifyAcquisitionStarted
Optionally notify the remote device (PLC) that an acquisition has started.
(Inherited from CogNdm.)
Public methodNotifyAsyncSoftEventComplete
Notify the remote device (PLC) that an asynchronous soft event has completed.
(Inherited from CogNdm.)
Public methodNotifyError
Notify the remote device (PLC) that the Vision System has encountered an error.
(Inherited from CogNdm.)
Public methodNotifyInspectionComplete(CogNdmInspectionResult)
Notify the remote device (PLC) that an inspection has finished.
(Inherited from CogNdm.)
Public methodNotifyInspectionComplete(Int32, CogNdmUsedAcquisitionIDCollection, Boolean, Int32,  Byte , Int32)
Notify the remote device (PLC) that an inspection has finished.
(Inherited from CogNdm.)
Public methodNotifyJobState
Notify the remote device (PLC) which job is loaded.
(Inherited from CogNdm.)
Public methodNotifyRunning
Notify the remote device (PLC) that the Vision System is running or "online".
(Inherited from CogNdm.)
Public methodNotifyStopped
Notify the remote device (PLC) that the Vision System stopped running or gone "offline".
(Inherited from CogNdm.)
Public methodNotifySystemStatus
Notifies the remote device (PLC) of the Vision System status.
(Inherited from CogNdm.)
Public methodReadUserData
Reads user data sent from the remote device (PLC) to the vision system.

Values returned from this function will not reflect changes to the user data present on the remote system until the remote system signals the vision system that new user data is available by sendng a "Set User Data" signal.

(Inherited from CogNdm.)
Public methodSetProfinetConfig
Sets the PROFINET specific NDM settings. Use this method to set the PROFINET Station Name.
Public methodStart
Start the Network Data Model (NDM). Calling Start() opens network sockets and allows connections from a remote device (PLC). You must call Start() on a CogNdm instance returned from CreateNetworkDataModel  in order for the NDM to connect to a remote device (PLC).
(Inherited from CogNdm.)
Public methodStop
Stop the Network Data Model (NDM). Closes all connections and prevents further connections from being established.
(Inherited from CogNdm.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Events

  NameDescription
Public eventClearError
The NDM raises the ClearError event to inform the vision system that the remote device has been notified of an error reported by the vision system and the error has been be cleared.

Handle this event to know when the remote device has acknowledged an error and normal operation can continue.

(Inherited from CogNdm.)
Public eventJobChangeRequested
The NDM raises the JobChangeRequested event to inform the vision system that the remote device has requested a job change.

Handle this event and use the JobID and JobSlot properties of the event args to determine which job to load and where.

(Inherited from CogNdm.)
Public eventNewUserData
The NDM raises the NewUserData event to tell the vision system that new user data has arrived from the remote device.

Handle this event and call ReadUserData(Int32, Int32) to read the new user data.

Note that changes to the user data present on the remote device cannot be read until the remote device signals the vision system that new user data is available by sending a "Set User Data" signal.

The remote device can send separate "Set User Data" signals for each user data channel. Use the ChannelIndex property of the event args to determine which "Set User Data" signal was received.

Upon returning from the event handler, the remote device is automatically notified by sending the “Set User Data Ack” signal.

(Inherited from CogNdm.)
Public eventOfflineRequested
The NDM raises the OfflineRequested event to tell the vision system that it should go offline.

Handle this event and use the ReturnToPreviousState property of the event args to determine whether to transition the vision system offline or return it to its previous state.

(Inherited from CogNdm.)
Public eventProfinetConfigChanged
The NDM raises the ProfinetConfigChanged event to tell the vision system that the PROFINET specific configuration settings have changed.
Public eventProtocolStatusChanged
The NDM raises the ProtocolStatusChanged event to inform the vision system that the status of the underlying protocol has changed.

Handle this event and use the RemoteAddress and ProtocolStatus properties of the event args to determine how the protocol status has changed.

(Inherited from CogNdm.)
Public eventTriggerAcquisition
The NDM raises the TriggerAcquisition event to inform the vision system that the remote device has requested an image Acquisition.

Handle this event and use the CameraIndex property of the event args to determine which camera should perform the image acquisition.

Set the ResponseCode property of the event args to notify the remote device if an acquisition error has occurred.

(Inherited from CogNdm.)
Public eventTriggerAcquisitionDisabledError
The NDM raises the TriggerAcquisitionDisabledError event to tell the vision system that an acquisition trigger was set but the acquisition trigger was not enabled.
(Inherited from CogNdm.)
Public eventTriggerAcquisitionNotReadyError
The NDM raises the TriggerAcquisitionNotReadyError event when the remote device asserts a "Trigger Camera" signal high without waiting for the vision system to signal that it's ready to receive triggers by setting the "Trigger Ready" signal high.

Handle this event and use the CameraIndex to identify which camera channel was triggered before it was ready.

Your user code should call NotifyAcquisitionComplete(Int32, Int32) to signal that the vision system that it has completed the current acquisition and is ready to receive another "Trigger Camera" signal from the remote device.

(Inherited from CogNdm.)
Public eventTriggerAcquisitionStop
The NDM raises the TriggerAcquisitionStop event to tell the vision system that the Acquisition trigger has been reset.

Handle this event and use the CameraIndex property of the event args to determine which camera trigger was reset.

(Inherited from CogNdm.)
Public eventTriggerSoftEvent
The NDM raises the TriggerSoftEvent event to inform the vision system that the remote device has requested that a soft event execute.

Handle this event and use the SoftEventID property of the event args to determine which soft event should execute.

Set the ResponseCode property of the event args to notify the remote device of the status of the soft event when the event handler returns.

(Inherited from CogNdm.)
Public eventTriggerSoftEventOff
The NDM raises the TriggerSoftEventOff event to tell the vision system that the soft event trigger bit has been reset.

Handle this event and use the SoftEventID property of the event args to determine which soft event has been reset.

(Inherited from CogNdm.)
Top
Remarks

NDM Status Signal Table (Status signals are signals sent from the Vision System to the PLC)
+----------------------------------------------------------------------------------------------------------+
¦        ¦ Bit 7     ¦ Bit 6       ¦ Bit 5     ¦ Bit 4       ¦ Bit 3      ¦ Bit 2   ¦ Bit 1    ¦ Bit 0     ¦
+----------------------------------------------------------------------------------------------------------+  ---
¦ 0      ¦ Online    ¦               Offline                 ¦ Rsvd       ¦ Rsvd    ¦ System   ¦ System    ¦     |
¦        ¦           ¦               Reason                  ¦            ¦         ¦ Busy     ¦ Ready     ¦  S  |
+----------------------------------------------------------------------------------------------------------+  y  |
¦ 1      ¦ General   ¦ Rsvd        ¦ Job Load  ¦ Rsvd        ¦ Rsvd       ¦ Rsvd    ¦ Rsvd     ¦ Rsvd      ¦  s  |
¦        ¦ Fault     ¦             ¦ Completed ¦             ¦            ¦         ¦          ¦           ¦  t  |
+----------------------------------------------------------------------------------------------------------+  e  |
¦ 2      ¦                                  Reserved                                                       ¦  m  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 3      ¦                                  Reserved                                                       ¦  S  |
+----------------------------------------------------------------------------------------------------------+  t  |
¦ 4-5    ¦                                  Current Job ID                                                 ¦  a  |
+----------------------------------------------------------------------------------------------------------+  t  |
¦ 6-7    ¦                                  Error ID                                                       ¦  u  |
+----------------------------------------------------------------------------------------------------------+  s  |
¦ 8-11   ¦                                  Soft Event Ack 0-31                                            ¦     |
+----------------------------------------------------------------------------------------------------------+     |
¦ 12-15  ¦                                  Reserved                                                       ¦     |
+----------------------------------------------------------------------------------------------------------+  ---
¦ 16     ¦ Results   ¦ Inspection  ¦ Results   ¦ Inspection  ¦ Exposure   ¦ Acq     ¦ Trigger  ¦ Trigger   ¦     |
¦        ¦ Buffer    ¦ Passed 0    ¦ Valid 0   ¦ Completed 0 ¦ Complete 0 ¦ Error 0 ¦ Ack      ¦ Ready     ¦  E  |
¦        ¦ Overrun 0 ¦             ¦           ¦             ¦            ¦         ¦ Camera 0 ¦ Camera 0  ¦  n  |
+----------------------------------------------------------------------------------------------------------+  g  |
¦ 17     ¦ Rsvd      ¦ Rsvd        ¦ Rsvd      ¦ Rsvd        ¦ Rsvd       ¦ Rsvd    ¦ Rsvd     ¦ Set       ¦  i  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ UserData  ¦  n  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ Ack 0     ¦  e  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 18-19  ¦                                  Acquisition ID 0                                               ¦  0  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 20-21  ¦                                  Inspected Image ID 0                                           ¦     |
+----------------------------------------------------------------------------------------------------------+     |
¦ 22-23  ¦                                  Inspection Result Code 0                                       ¦     |
+----------------------------------------------------------------------------------------------------------+  ---
¦ 24     ¦ Results   ¦ Inspection  ¦ Results   ¦ Inspection  ¦ Exposure   ¦ Acq     ¦ Trigger  ¦ Trigger   ¦     |
¦        ¦ Buffer    ¦ Passed 1    ¦ Valid 1   ¦ Completed 1 ¦ Complete 1 ¦ Error 1 ¦ Ack      ¦ Ready     ¦  E  |
¦        ¦ Overrun 1 ¦             ¦           ¦             ¦            ¦         ¦ Camera 1 ¦ Camera 1  ¦  n  |
+----------------------------------------------------------------------------------------------------------+  g  |
¦ 25     ¦ Rsvd      ¦ Rsvd        ¦ Rsvd      ¦ Rsvd        ¦ Rsvd       ¦ Rsvd    ¦ Rsvd     ¦ Set       ¦  i  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ UserData  ¦  n  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ Ack 1     ¦  e  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 26-27  ¦                                  Acquisition ID 1                                               ¦  1  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 28-29  ¦                                  Inspected Image ID 1                                           ¦     |
+----------------------------------------------------------------------------------------------------------+     |
¦ 30-31  ¦                                  Inspection Result Code 1                                       ¦     |
+----------------------------------------------------------------------------------------------------------+  ---
¦ 32     ¦ Results   ¦ Inspection  ¦ Results   ¦ Inspection  ¦ Exposure   ¦ Acq     ¦ Trigger  ¦ Trigger   ¦     |
¦        ¦ Buffer    ¦ Passed 2    ¦ Valid 2   ¦ Completed 2 ¦ Complete 2 ¦ Error 2 ¦ Ack      ¦ Ready     ¦  E  |
¦        ¦ Overrun 2 ¦             ¦           ¦             ¦            ¦         ¦ Camera 2 ¦ Camera 2  ¦  n  |
+----------------------------------------------------------------------------------------------------------+  g  |
¦ 33     ¦ Rsvd      ¦ Rsvd        ¦ Rsvd      ¦ Rsvd        ¦ Rsvd       ¦ Rsvd    ¦ Rsvd     ¦ Set       ¦  i  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ UserData  ¦  n  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ Ack 2     ¦  e  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 34-35  ¦                                  Acquisition ID 2                                               ¦  2  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 36-37  ¦                                  Inspected Image ID 2                                           ¦     |
+----------------------------------------------------------------------------------------------------------+     |
¦ 38-39  ¦                                  Inspection Result Code 2                                       ¦     |
+----------------------------------------------------------------------------------------------------------+  ---
¦ 40     ¦ Results   ¦ Inspection  ¦ Results   ¦ Inspection  ¦ Exposure   ¦ Acq     ¦ Trigger  ¦ Trigger   ¦     |
¦        ¦ Buffer    ¦ Passed 3    ¦ Valid 3   ¦ Completed 3 ¦ Complete 3 ¦ Error 3 ¦ Ack      ¦ Ready     ¦  E  |
¦        ¦ Overrun 3 ¦             ¦           ¦             ¦            ¦         ¦ Camera 3 ¦ Camera 3  ¦  n  |
+----------------------------------------------------------------------------------------------------------+  g  |
¦ 41     ¦ Rsvd      ¦ Rsvd        ¦ Rsvd      ¦ Rsvd        ¦ Rsvd       ¦ Rsvd    ¦ Rsvd     ¦ Set       ¦  i  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ UserData  ¦  n  |
¦        ¦           ¦             ¦           ¦             ¦            ¦         ¦          ¦ Ack 3     ¦  e  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 42-43  ¦                                  Acquisition ID 3                                               ¦  3  |
+----------------------------------------------------------------------------------------------------------+     |
¦ 44-45  ¦                                  Inspected Image ID 3                                           ¦     |
+----------------------------------------------------------------------------------------------------------+     |
¦ 46-47  ¦                                  Inspection Result Code 3                                       ¦     |
+----------------------------------------------------------------------------------------------------------+  ---
¦ 48-??? ¦                                  Inspection Results                                             ¦     |
¦        ¦                                                                                                 ¦  R  |
¦        ¦                                                                                                 ¦  e  |
¦        ¦                                                                                                 ¦  s  |
¦        ¦                                                                                                 ¦  u  |
¦        ¦                                                                                                 ¦  l  |
¦        ¦                                                                                                 ¦  t  |
¦        ¦                                                                                                 ¦  s  |
¦        ¦                                                                                                 ¦     |
+----------------------------------------------------------------------------------------------------------+ ----
NDM Control Signal Table (Controls signals are signals sent from the PLC to the Vision System)
+--------------------------------------------------------------------------------------------------+
¦        ¦ Bit 7   ¦ Bit 6  ¦ Bit 5    ¦ Bit 4     ¦ Bit 3  ¦ Bit 2       ¦ Bit 1       ¦ Bit 0    ¦
+--------------------------------------------------------------------------------------------------+  ---
¦ 0      ¦ Set     ¦ Clear  ¦ Reserved ¦ Initiate  ¦  Rsvd  ¦ Rsvd        ¦ Buffer      ¦ Trigger  ¦     |
¦        ¦ Offline ¦ Error  ¦          ¦ Job       ¦        ¦             ¦ Results     ¦ Enable   ¦  S  |
¦        ¦         ¦        ¦          ¦ Load      ¦        ¦             ¦ Enable      ¦          ¦  y  |
+--------------------------------------------------------------------------------------------------+  s  |
¦ 1      ¦                          Reserved                                                       ¦  t  |
+--------------------------------------------------------------------------------------------------+  e  |
¦ 2-3    ¦                          Job Load ID                                                    ¦  m  |
+--------------------------------------------------------------------------------------------------+     |
¦ 4-7    ¦                          SoftEvent 0-31                                                 ¦  C  |
+--------------------------------------------------------------------------------------------------+  o  |
¦ 8-9    ¦                          Reserved                                                       ¦  n  |
+--------------------------------------------------------------------------------------------------+  t  |
¦ 10-11  ¦                          Reserved                                                       ¦  r  |
+--------------------------------------------------------------------------------------------------+  o  |
¦ 12-13  ¦                          Reserved                                                       ¦  l  |
+--------------------------------------------------------------------------------------------------+     |
¦ 14-15  ¦                          Reserved                                                       ¦     |
+--------------------------------------------------------------------------------------------------+  ---
¦ 16     ¦ Rsvd    ¦ Rsvd   ¦ Rsvd     ¦ Rsvd      ¦ Set    ¦ Clear       ¦ Inspection  ¦ Trigger  ¦     |
¦        ¦         ¦        ¦          ¦           ¦ User   ¦ Exposure    ¦ Results     ¦ Camera 0 ¦  E  |
¦        ¦         ¦        ¦          ¦           ¦ Data 0 ¦ Complete 0  ¦ Ack 0       ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  g  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  i  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  e  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  0  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
+--------------------------------------------------------------------------------------------------+  ---
¦ 17     ¦ Rsvd    ¦ Rsvd   ¦ Rsvd     ¦ Rsvd      ¦ Set    ¦ Clear       ¦ Inspection  ¦ Trigger  ¦     |
¦        ¦         ¦        ¦          ¦           ¦ User   ¦ Exposure    ¦ Results     ¦ Camera 1 ¦  E  |
¦        ¦         ¦        ¦          ¦           ¦ Data 1 ¦ Complete 1  ¦ Ack 1       ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  g  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  i  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  e  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  l  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
+--------------------------------------------------------------------------------------------------+  ---
¦ 18     ¦ Rsvd    ¦ Rsvd   ¦ Rsvd     ¦ Rsvd      ¦ Set    ¦ Clear       ¦ Inspection  ¦ Trigger  ¦     |
¦        ¦         ¦        ¦          ¦           ¦ User   ¦ Exposure    ¦ Results     ¦ Camera 2 ¦  E  |
¦        ¦         ¦        ¦          ¦           ¦ Data 2 ¦ Complete 2  ¦ Ack 2       ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  g  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  i  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  e  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  2  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
+--------------------------------------------------------------------------------------------------+  ---
¦ 19     ¦ Rsvd    ¦ Rsvd   ¦ Rsvd     ¦ Rsvd      ¦ Set    ¦ Clear       ¦ Inspection  ¦ Trigger  ¦     |
¦        ¦         ¦        ¦          ¦           ¦ User   ¦ Exposure    ¦ Results     ¦ Camera 3 ¦  E  |
¦        ¦         ¦        ¦          ¦           ¦ Data 3 ¦ Complete 3  ¦ Ack 3       ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  g  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  i  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  n  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  e  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦  3  |
¦        ¦         ¦        ¦          ¦           ¦        ¦             ¦             ¦          ¦     |
+--------------------------------------------------------------------------------------------------+  ---
¦ 20-??? ¦                          User Data                                                      ¦     |
¦        ¦                                                                                         ¦  U  |
¦        ¦                                                                                         ¦  s  |
¦        ¦                                                                                         ¦  e  |
¦        ¦                                                                                         ¦  r  |
¦        ¦                                                                                         ¦     |
¦        ¦                                                                                         ¦  D  |
¦        ¦                                                                                         ¦  a  |
¦        ¦                                                                                         ¦  t  |
¦        ¦                                                                                         ¦  a  |
¦        ¦                                                                                         ¦     |
+--------------------------------------------------------------------------------------------------+ ----
See Also