CogIOMCB MethodsCognex VisionPro 9.10

The CogIOMCB type exposes the following members.

Methods

  NameDescription
Public methodClose
Close the device. This releases the underlying hardware, making it available for use later or by another thread. In general, only call this when you are finished using the device, such as when your application is about to exit.
(Overrides CogIODevice Close .)
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Release associated resources and mark this object as disposed.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalize. Ensures that this device is closed.
(Overrides Object Finalize .)
Public methodGetCurrentActivityCount
Cognex internal use only
(Inherited from CogIODiscreteDevice.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetLineAlias
Get the alias or name associated with the specified line on this device. This characteristic is provided solely as a convenience to the user and has no impact upon the operation of this device.
Public methodGetLineEnabled
Is the specified line on this device currently enabled. If the answer is false, you will be prevented from writing to or reading from this line.
Public methodGetLinePolarity(Int32)
Get the polarity for the specified line on this device. With possible values of CogIOLinePolarity.LowToHigh or CogIOLinePolarity.HighToLow, this parameter is used by the Write(), SetValue(), and WriteSyncPulse() methods.
Public methodGetLinePolarity(Int32, Boolean) (Overrides CogIODiscreteDevice GetLinePolarity(Int32, Boolean).)
Public methodGetLinePulseWidth
Get the pulse width, in milliseconds, for the specified line on this device. This parameter is used by the WriteSyncPulse().
Public methodGetPortDirection
Get the currently configured direction for the specified port.
Public methodGetPortFromLine
Get the identifier of the port that is associated with the specified line on this device.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Get the state of the specified line on this device.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodIsInputAsserted
Manually check whether line is asserted or not.
(Overrides CogIODiscreteDevice IsInputAsserted(Int32).)
Public methodStatic memberIsMCBPresent
Cognex Internal Use Only.
Public methodOpen
Open the device. Each CogIOMCB object may be associated with one actual MeasurementComputing PCI-DIO24/S board. Calling this method causes the underlying hardware connection to be established and the hardware to be initialized. Upon successfully calling this method, the IsDeviceOpen property will be true.
(Overrides CogIODevice Open .)
Public methodResetAllWriteActivityCounter
Cognex internal use only
(Inherited from CogIODiscreteDevice.)
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodSetLineAlias
Set the alias or name associated with the specified line on this device. This characteristic is provided solely as a convenience to the user and has not impact upon the operation of this device.
Public methodSetLineEnabled
Specify whether or not the indicated line on this device is enabled. If you set this to false for a given line, you will be prevented from writing to or reading from that line. If a heartbeat is already running on this line, it will not be affected, but you will be prevented from restarting it once you have stopped it.
Public methodSetLinePolarity(Int32, CogIOLinePolarity)
Set the polarity for the specified line on this device. May be either CogIOLinePolarity.LowToHigh or CogIOLinePolarity.HighToLow. This parameter is used by the Write(), SetValue(), and WriteSyncPulse() methods.
Public methodSetLinePolarity(Int32, CogIOLinePolarity, Boolean) (Overrides CogIODiscreteDevice SetLinePolarity(Int32, CogIOLinePolarity, Boolean).)
Public methodSetLinePulseWidth
Set the pulse width, in milliseconds, for the specified line on this device. This parameter is used by the WriteSyncPulse(). If you set this to a new value while a heartbeat is already running on this line, the heartbeat will not be affected. If you then stopped and subsequently restarted the heartbeat on this line, it would reflect this new pulse width value.
Public methodSetPortDirection
Set the direction for the specified port. May be set to CogIOMCBPortDirectionConstants.Output, or CogIOMCBPortDirectionConstants.Input, or CogIOMCBPortDirectionConstants.Undefined.
Public methodSetValue
Set the specified line on this device to the specified state. Note that this method honors the configured polarity of the specified line. That is, if the specified line is configured for HighToLow polarity, the value argument will be inverted.
(Overrides CogIODiscreteDevice SetValue(Int32, Boolean).)
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodWrite(CogIODiscreteData)
Set the state of zero or more output lines as described by the supplied argument. This argument is a data structure holding a set of line/value pairs. This method steps through this set of data, setting in turn each specified line to the specified state.
Public methodWrite(CogIOOutputData)
Set the state of zero or more output lines as described by the supplied argument. This argument is a data structure holding a set of line/value pairs. This method steps through this set of data, setting in turn each specified line to the specified state.
(Overrides CogIODevice Write(CogIOOutputData).)
Public methodWriteSyncPulse
Write a pulse to the specified line of this device. Use the pulse duration and polarity values currently associated with the specified line.
(Overrides CogIODiscreteDevice WriteSyncPulse(Int32).)
Top
See Also