CogNdmTriggerSoftEventOffEventArgs ClassCognex VisionPro 9.5
Event args returned as part of Cognex's Network Data Model (NDM) TriggerSoftEventOff event.
Inheritance Hierarchy

System Object
  System EventArgs
    Cognex.VisionPro.Comm CogNdmEventArgsBase
      Cognex.VisionPro.Comm CogNdmTriggerSoftEventOffEventArgs

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

public sealed class CogNdmTriggerSoftEventOffEventArgs : CogNdmEventArgsBase

The CogNdmTriggerSoftEventOffEventArgs type exposes the following members.

Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyMessageID
An ID number that uniquely identifies the message.
(Inherited from CogNdmEventArgsBase.)
Public propertySoftEventID
Gets the ID number of the soft event to trigger.
Top
Remarks

Soft Events provide a mechanism for sending general purpose binary signals from the remote device to the vision system. The NDM provides 32 individual Soft Events signals which are uniquely identified by their indices (0-31). The remote device and the vision system can assign specific meanings to the each Soft Event signal based on what is useful to their application context.

To use a Soft Event, the remote device asserts one of the "Soft Event [0-31]" signals high. When the vision system sees this signal transition, the NDM raises the TriggerSoftEvent event. Your vision system code can optionally handle this .NET event and perform any processing that might be necessary.

Your event handler code should use the SoftEventID property of the event args to identify which of the 32 Soft Event signals was received.

Additionally, your vision system event handler code should set the ResponseCode property of the event args to signal to the remote device whether the vision system has finished processing the Soft Event when the event handler returns, or if the soft event processing will continue asynchronously after your event handler code returns.

If you the set the ResponseCode property of the event args to Finshed, the NDM will automatically notify the remote device by sending the appropriately indexed "Soft Event Ack" signal.

If you set the ResponseCode property of the event args to NotFinshed, The NDM will wait until you call the CogNDM's NotifyAsyncSoftEventComplete  method before sending the corresponding "Soft Event Ack" to the remote device.

Note that if you are processing soft events asynchronously you must save the MessageID from the event args so that you can latter pass it to the NDM's NotifyAsyncSoftEventComplete  method to notify the remote device that soft event processing is complete.

In both the synchronous and asynchronous cases the remote device should send/assert the "Soft Event" signal high. Then wait to receive to receive the "Soft Event Ack" signal while the vision system is processing the soft event. Once the remote device sees the "Soft Event Ack" signal go high, it can then set the original "Soft Event" signal low.

When the remote device sets a "Soft Event" signal low the vision system is signaled via the NDM's TriggerSoftEventOff event. Your vision system code can optionally handle this event. After any user event handler code returns, the NDM automatically notifies the remote device by setting the "Soft Event Ack" signal low. Once the remote device sees the "Soft Event Ack" signal go low, it knows that it is now safe to signal another instance of the same soft event.

Note that the NDM's soft event signals are supported by the Comm Card's precision i/o event system. You can configure the NDM soft events signals to automatically cause a CogPrioEvent directly on the Comm Card's real time processor without involving the host OS. This is primarily useful if you need to deterministically set or pulse a discrete output line based on a soft event signal from the remote device.

See Also