Manually schedules an I/O event to occur relative to
some other previous state.
Namespace: Cognex.VisionPro.CommAssembly: Cognex.VisionPro.Comm (in Cognex.VisionPro.Comm.dll) Version: 65.1.0.0
Syntax
Parameters
- scheduleType
- Type: Cognex.VisionPro.Comm CogPrioEventScheduleTypeConstants
Which type of scheduling to use (time or encoder based).
- scheduleValue
- Type: System Double
How many milliseconds or encoder ticks from the previous state until the event occurs.
- relativeState
- Type: Cognex.VisionPro.Comm CogPrioState
The event is scheduled relative to this previous state.
Return Value
Type: CogPrioScheduledEventTokenA CogPrioScheduledEventToken which can be used to discover the instant at which the I/O event was scheduled or to cancel a scheduled event.
Exceptions
| Exception | Condition |
|---|---|
| CogScheduledEventTooLateException | Thrown if event scheduling failed because the event would have occurred in the past. |
| CogScheduledEventOverflowException | Thrown if event scheduling failed because the maximum number of outstanding scheduled events has been reached (Current firmware sets this limit at 1000). |
| NotImplementedException | Thrown if scheduleType is set to Encoder. |
| InvalidOperationException | Thrown if this object is not part of the CogPrio.Events collection or if CogPrio.Valid is false when Schedule() is called. |
Remarks
A precision I/O event can occur as a result of one of the configured event causes (see CausesNdm , CausesLine ).
A precision I/O event can also occur as a result of manual user scheduling.
- Use Schedule(CogPrioEventScheduleTypeConstants, Double, CogPrioState) to manually schedule precision I/O events to occur at a specific instant. Scheduling an event returns a CogPrioScheduledEventToken.
- Use State to discover the state of the Comm Card at the instant the scheduled event was accepted by the scheduling mechanism. This is useful when you need to know if the event was scheduled "in time".
- Use Cancel to cancel the scheduled event before it occurs.
See Also