CogCaliper Edge0Position Property Cognex VisionPro 9.5
Position of the first edge with respect to the model origin.

Namespace: Cognex.VisionPro.Caliper
Assembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 69.0.0.0
Syntax

public double Edge0Position { get; set; }

Property Value

Type: Double
Events

Event TypeReason
CogCaliper Changed

Fires when the value of this property changes.

The following state flag may be affected:

Remarks

The expected position of the edge with respect to the edge model origin. In single edge mode, the reported edge location is offset by the Edge0Position value.

If you are using edge-pair mode, you need to specify values for both Edge0Position and Edge1Position. The values you specify determine both the expected width of the edge pair and the location which is reported for the edge pair. If you want to specify an edge model with its origin in the center, you should specify a value for Edge0Position that is the negative of the Edge1Positionvalue, as shown in the following figure:

Default Value: 0.0

Examples

Imports Cognex.VisionPro
Imports Cognex.VisionPro.Caliper
Imports Cognex.VisionPro.ImageProcessing

' Working with a CogCaliperTool object
Dim myCaltool As New CogCaliperTool

' Configure edge polarity, position, and mode to find a light-on-dark, 80-pixel wide object 
myCaltool.RunParams.Edge0Polarity = CogCaliperPolarityConstants.DarkToLight
myCaltool.RunParams.Edge1Polarity = CogCaliperPolarityConstants.LightToDark
myCaltool.RunParams.EdgeMode = CogCaliperEdgeModeConstants.Pair
myCaltool.RunParams.Edge0Position = -40
myCaltool.RunParams.Edge1Position = 40
using Cognex.VisionPro;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.ImageProcessing;

// Working with a CogCaliperTool object
CogCaliperTool myCaltool = new CogCaliperTool();

// Configure edge polarity, position, and mode to find a light-on-dark, 80-pixel wide object 
myCaltool.RunParams.Edge0Polarity = CogCaliperPolarityConstants.DarkToLight;
myCaltool.RunParams.Edge1Polarity = CogCaliperPolarityConstants.LightToDark;
myCaltool.RunParams.EdgeMode = CogCaliperEdgeModeConstants.Pair;
myCaltool.RunParams.Edge0Position = -40;
myCaltool.RunParams.Edge1Position = 40;
See Also