.

Capture.Position

The encoder position value that was captured when the capture’s trigger conditions were met. The captured encoder position can be used in conjunction with the associated Axis’ Origin property to:

Version History

Introduced in MPX 2.0.

 
  • Set a zero position (home position).
  • Calculate the ActualPosition value corresponding to the captured encoder position.

Type

Double (read only)

Units

Seconds

Visual Basic

Syntax

Property Position As Double

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

double Position;

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

State

Axis Object
Origin
Feedback

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering