AngleMode Property
Applies To
Vision Objects: Line, LineFinder
Description
Sets the output format for the angle detected.
Usage
VGet Sequence.Object.AngleMode, var
VSet Sequence.Object.AngleMode, value
- Sequence
- Name of a sequence or string variable containing a sequence name.
- Object
- Name of an object or string variable containing an object name. The object must exist in the specified sequence.
- var
- Integer variable that will contain the value of the property.
- value
- Integer value or expression for the new value of the property.
Values
- 1 - Default
- Vision constant: VISION_ANGLEMODE_DEFAULT
- Outputs the angle as a real number in degrees from 0 to 360.
- 2 - UseAngleBase
- Vision constant: VISION_ANGLEMODE_USEANGLEBASE
- Outputs the angle based on AngleBase and Directed property settings.
Default: 1 - Default
Remarks
1 - Default
Outputs the angle in the conventional manner as a real number in degrees from 0 to 360°. Directed and AngleBase setting values are not used.
2 - UseAngleBase
Outputs the angle based on the conditions set for the Directed property with the reference angle set for the AngleBase property at the center.
- If the Directed property is "True"
-180 degrees + AngleBase ≤ output angle ≤ 180 degrees + AngleBase - If the Directed property is "False"
-90 degrees + AngleBase ≤ output angle ≤ 90 degrees + AngleBase
Example: The angle output when the AngleBase is set to 0 degrees when detecting a line of 60 degrees.
Search direction: left to right | Search direction: right to left | |
---|---|---|
AngleMode: Default | 60 | 240 |
AngleMode: UseAngleBase Directed: True | 60 | -120 |
AngleMode: UseAngleBase Directed: False | 60 | 60 |
(Unit: degrees)
The output angles for Line and Line Finder objects will vary as shown in the diagram above even if line placement conditions put them on the same line.
The left side is output as 60 degrees and the right side is output as 240 degrees.
If the Directed property is “True”, the object placement conditions are taken into consideration to output the angle using the AngleBase as a reference. As such, the left side is output as 60 degrees and the right side is output as -120 degrees.
If the Directed property is “False”, the angle is output without regard for the object placement conditions. As such, the diagram above would be output as 60 degrees, regardless of the object placement conditions.
See Also
Angle Result, Directed Property