The CogJob class is the work unit of QuickBuild. It consists of an acquisition FIFO and a collection of vision tools.
Each CogJob is associated with a particular camera channel which feeds images to the vision tools for processing.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro.QuickBuild CogJob
Namespace: Cognex.VisionPro.QuickBuild
Assembly: Cognex.VisionPro.QuickBuild.Core (in Cognex.VisionPro.QuickBuild.Core.dll) Version: 69.0.0.0 (69.0.0.0)
Syntax
The CogJob type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogJob |
Default CogJob constructor. The newly constructed CogJob has no name.
| |
| CogJob(Boolean) |
CogJob constructor that also creates an empty CogToolGroup. The newly created CogJob can then be used with the CogJob edit control.
| |
| CogJob(String) |
CogJob constructor with CogJob name.
|
Methods
| Name | Description | |
|---|---|---|
| CloneParameters |
CloneParamters. Internal use only.
| |
| CopyParameters |
CopyParameters. Internal use only.
| |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Equals | (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| Image |
Image() remvoes and returns the oldest image in the image queue. Image() will return null if the image queue is empty. Care must be taken to not remove images from the image queue if the CogJob is running image processing.
| |
| Image(Int32, Boolean) |
Image(int,bool) allows any image to be looked at and/or removed from the image queue. Care must be taken to not remove images from the image queue if the CogJob is running image processing.
| |
| ImageQueueFlush |
Flush/clear the image queue of all images. This method cannot be called while the CogJob is running.
| |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| IOValidate |
This function detects all the possible I/O configuration errors and returns them in a string.
The user must call this routine after adding a new CogJob to the CogJobManager.
This routine enables all the I/O lines, if possible, that are used by this job.
| |
| OnDeserialization |
Serialization Callback. Internal use only.
| |
| Reset |
Reset puts the CogJob into its initial state.
| |
| ResetAllStatistics |
Reset all statistics to their default states.
| |
| RestartThroughputCalculation |
Restart the calculation of the throughput calculations.
| |
| ResumeAndRaiseChangedEvent |
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.) | |
| Run |
Run the CogJob just once. This Run method uses the RunMode of the CogJob determines which parts (acquisition and/or image processing) actually run.
| |
| RunContinuous |
Run the CogJob in a continuous loop. The CogJob will not stop running until Stop() is called. This Run method uses the the RunMode of the CogJob determines which parts (acquisition and/or image processing) actually run.
| |
| Shutdown |
Shutdown terminates all internal threads inside the CogJob. Shutdown also disposes of any contained acquisition fifo and vision tools. Shutdown must be called to allow the CogJob to cleanly terminate.
After the CogJob has shutdown, it cannot be run again. Do not persist (save) a shutdown CogJob, since it cannot be run again, even after de-persisting it.
| |
| Stop |
Stop forces the CogJob to stop running. Only CogJobs running continuously can be stopped. This method returns immediately and does not wait for the CogJob to stop. Once the CogJob has completely stopped, the Stopped event will be fired.
If the CogJob is not running, this method has no effect.
| |
| SuspendChangedEvent |
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.) | |
| ToString | (Inherited from Object.) | |
| VisionToolLink(Int32) |
Returns the stored CogVTLink object using a integer index.
| |
| VisionToolLink(String) |
Returns the stored CogVTLink object using a link name.
| |
| VisionToolLink(String, CogDestinationQueueConstants) |
Returns the stored CogVTLink object using a link name and its type.
| |
| VisionToolLinkAdd |
Add a new CogVTLink object to the CogJob. A CogVTLink object represents either an input (an image) or output (results collection) to or from the CogJob.
| |
| VisionToolLinkRemove(String) |
Remove a CogVTLink object by its link name.
| |
| VisionToolLinkRemove(CogVTLink) |
Remove a CogVTLink object by its reference.
|
Fields
| Name | Description | |
|---|---|---|
| SfAcqFifo | Acq Fifo State Flag | |
| SfAcquisitionRunStatus | Acquisition Run Status State Flag | |
| SfImageQueueCapacity | Image Queue Capacity State Flag | |
| SfName | Name State Flag | |
| SfRealTimeQueueCapacity | Image Queue Capacity State Flag | |
| SfRemainingRuns | RemainingRuns State Flag | |
| SfRunCount | Maximum number of job runs State Flag | |
| SfRunCountEnable | RunCountEnable State Flag | |
| SfRunMode | Run Mode State Flag | |
| SfRunStatus | Overall Job Run Status State Flag | |
| SfStartCount | Start Count State Flag | |
| SfStartMode | Start Mode State Flag | |
| SfStartTriggerRate | Start Trigger Rate State Flag | |
| SfState | Run State State Flag | |
| SfThroughputAlgorithm | Total Job Throughput Algorithm State Flag | |
| SfThroughputSampleSize | Total Job Throughput Sample Size State Flag | |
| SfTotalAcquisitionErrors | Total Acquisition Errors State Flag | |
| SfTotalAcquisitionOverruns | Total Acquisition Overruns State Flag | |
| SfTotalAcquisitions | Acquisition Run Status State Flag | |
| SfTotalEncoderOverruns | Total Encoder Overruns State Flag | |
| SfTotalJobIterations | Total Job Iterations State Flag | |
| SfTotalJobThroughput | Total Job Throughput State Flag | |
| SfTotalJobThroughputMax | Total Job Throughput Max State Flag | |
| SfTotalJobThroughputMin | Total Job Throughput Min State Flag | |
| SfTotalVisionToolAccepts | Total Vision Tool Accepts State Flag | |
| SfTotalVisionToolErrors | Total Vision Tool Errors State Flag | |
| SfTotalVisionToolRejects | Total Vision Tool Rejects State Flag | |
| SfTotalVisionToolWarnings | Total Vision Tool Warnings State Flag | |
| SfVisionTool | Vision Tool State Flag | |
| SfVisionToolLinkAdd | Vision Tool Link Add State Flag | |
| SfVisionToolLinkRemove | Vision Tool Link Remove State Flag | |
| SfVisionToolRunStatus | VisionTool Run Status State Flag |
Properties
| Name | Description | |
|---|---|---|
| AcqFifo |
Get or set the acquisition fifo.
| |
| AcqFifoState |
Read-only property to get the state of the acq fifo. Internal use only.
| |
| AcqFifoSyncPulse |
Gets an interface to a synchronization pulse. This pulse will be
fired from the thread that acquires images, just before each
acquisition attempt, allowing you to synchronize with that thread.
| |
| AcqFifoSyncRoot |
Read-only property to get the AcqFifoSyncRoot. Internal use only.
| |
| AcquisitionProcessThread |
Internal use only.
| |
| AcquisitionRunStatus |
Read-only property which returns the AcquisitionRunStatus of the CogJob.
| |
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| HasManager |
Read-only property to check if the CogJob has a CogJobManager. Internal use only.
| |
| ImageQueueCapacity |
Get or set the image queue capacity.
| |
| ImageQueueCount |
Read-only property which returns the number of images in the image queue.
| |
| IndependentProcessThread |
Internal use only.
| |
| IOInfoList |
Returns the CogIOInfoList, which is used to map I/O signals to physical
devices in the system. Cognex internal use only
| |
| JobRunStopSyncRoot |
Read-only property to get the JobRunStopSyncRoot. Internal use only.
| |
| JobScript |
Cognex Internal Use Only.
| |
| Manager |
Get or set the CogJob's CogJobManager. Internal use only.
| |
| Name |
Gets or sets the name of the CogJob.
| |
| OwnedIndependent |
Read-only property to retrieve the CogJobIndependent object.
| |
| RemainingRuns |
Get or set the number of remaining job runs.
| |
| RunCount |
Get or set the maximum number of job runs.
| |
| RunCountEnable |
Enable or disable RunCount
| |
| RunMode |
Get or set the CogJob's RunMode.
| |
| RunningSyncBoolean |
Gets an interface to a synchronization boolean. This boolean will be
true if the threads of this job have been told to run and have not
yet stopped. Otherwise it will be false.
| |
| RunStatus |
Gets the last RunStatus of the job.
| |
| ScriptError |
Cognex Internal Use Only.
| |
| ScriptObj |
Cognex Internal Use Only.
| |
| StartCount |
Get or set the number of StartAcquires in the acq fifo's queue.
| |
| StartMode |
Get or set when StartAcquires are put into the acq fifo's queue.
| |
| StartTriggerRate |
Get or set the trigger rate when the CogJob's StartMode is IssuedAtFixedRate.
| |
| State |
Gets the running state of the CogJob.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) | |
| ThroughputAlgorithm |
Get or set the CogJob throughput algorithm.
| |
| ThroughputSampleSize |
Get or set the CogJob throughput sample size.
| |
| TotalAcquisitionErrors |
Get or set the total number of acquisition errors.
| |
| TotalAcquisitionOverruns |
Get or set the total number of acquisition overruns.
| |
| TotalAcquisitions |
Get or set the total number of acquisition completed.
| |
| TotalEncoderOverruns |
Get or set the total number of encoder overruns.
| |
| TotalJobIterations |
Get or set the total number of job iterations.
| |
| TotalJobThroughput |
Get or set the CogJob throughput at a particular instant.
| |
| TotalJobThroughputMax |
Get or set the maximum CogJob throughput.
| |
| TotalJobThroughputMin |
Get or set the mininum CogJob throughput.
| |
| TotalVisionToolAccepts |
Get or set the total number of vision tool runs that had an accept result.
| |
| TotalVisionToolErrors |
Get or set the total number of vision tool runs that had an error result.
| |
| TotalVisionToolRejects |
Get or set the total number of vision tool runs that had a reject result.
| |
| TotalVisionToolWarnings |
Get or set the total number of vision tool runs that had a warning result.
| |
| UserData |
UserData. Internal use only.
| |
| VisionTool |
Get or set the CogJob's VisionTool.
| |
| VisionToolLinkCount |
Read-only property which returns the number of link objects contained within the CogJob.
| |
| VisionToolRunStatus |
Read-only property which returns the RunStatus of the vision tool.
| |
| VisionToolSyncPulse |
Gets an interface to a synchronization pulse. This pulse will be
fired from the thread that runs the vision tools, just before each
run of the tools, allowing you to synchronize with that thread.
| |
| VisionToolSyncRoot |
Read-only property to get the VisionToolSyncRoot. Internal use only.
|
Events
| Name | Description | |
|---|---|---|
| AcquisitionError |
Raised when an acquisition error occurs.
| |
| AcquisitionTimeout |
Raised when an acquisition timeout occurs.
| |
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| GarbageCollectionRequested |
Raised whenever garbage collection is requested. Internal use only.
| |
| ImageAvailable |
Raised when a new image is available in the image queue.
| |
| ImageQueueFlushed |
Raised when the image queue is flushed.
| |
| ImageQueueOverflowed |
Raised when the image queue overflows.
| |
| ImageRemoved |
Raised when an image is removed from the image queue.
| |
| IOError |
Raised when any I/O error occurs.
| |
| ProcessedIOResultAvailable |
Raised after the record is removed from the realtime queue and the job
internally processes the record for I/O.
| |
| Ran |
Raised when the CogJob has ran one iteration.
| |
| ResetComplete |
Raised when the CogJob has been fully reset.
| |
| Running |
Raised when the CogJob has started running.
| |
| Stopped |
Raised when the CogJob has completely stopped.
| |
| VisionToolError |
Raised when a vision tool error occurs.
| |
| VisionToolLinkAdded |
Raised when a vision tool link is added.
| |
| VisionToolLinkRemoved |
Raised when vision tool link is removed.
|
Remarks
Examples
See Also