Capture.State
The current state of the capture engine.
Version History
Introduced in MPX 2.0.
Type
Mpx.CaptureState (read only)
Visual Basic
Syntax
Property State As Mpx.CaptureState
Sample Code
|
' Motion(2) is associated with Axis(2)
Dim motion As Mpx.Motion = controller.Motion(2)
Dim capture As Mpx.Capture = controller.Axis(2).Capture(0)
capture.ConfigurationReset()
capture.SourceEnable(Mpx.CaptureSource.Index) = True
capture.SourceLevel(Mpx.CaptureSource.Index) = True
capture.Edge = Mpx.CaptureEdge.Rising
capture.Arm()
motion.Velocity(5000) ' Move in the positive direction
While capture.State <> Mpx.CaptureState.Captured
Wend
Dim capturedPosition As Double = capture.Position |
Sample Application
Home1
C#
Syntax
Mpx.CaptureState State;
Sample Code
|
// Motion[2] is associated with Axis[2]
Mpx.Motion motion = controller.Motion[2];
Mpx.Capture capture = controller.Axis[3].Capture[0];
capture.ConfigurationReset();
capture.SourceEnable[Mpx.CaptureSource.Index] = true;
capture.SourceLevel[Mpx.CaptureSource.Index] = true;
capture.Edge = Mpx.CaptureEdge.Rising;
capture.Arm();
motion.Velocity(5000); // Move in the positive direction
while (capture.State != Mpx.CaptureState.Captured)
{
}
double capturedPosition = capture.Position; |
Sample Application
Home1
See Also
Arm
Disarm
Enumerations
CaptureState
|