-

Y_GP_VectorCompare

Image
Y_GP_VectorCompare is used to compare the first six elements of a VECTOR  with the first six elements of a second VECTOR . Machine position (in cartesian frame constitutes the first six elements of the VECTOR ) can be compared to a reference position (in cartesian frame) to generate a BOOLEAN output. 

Parameters

* Parameter Data Type Description Default
VAR_INPUT
B EN BOOL The function will continue to execute every scan while EN is held high and there are no errors. FALSE
V Vector1 VECTOR  Vector to be used for comparison.
V Vector2 VECTOR  Reference vector.
V CartesianTol LREAL Tolerance to be used to compare the first three elements of the vectors. LREAL#0.0
V RotationTol LREAL Tolerance to be used to compare elements 3 to 6 of the vectors. LREAL#0.0
VAR_OUTPUT
B ENO BOOL TRUE if EN is TRUE and the function is executing normally. ENO will become FALSE if an internal error occurs. If EN becomes FALSE, ENO becomes FALSE and the function output is maintained at the last state.
B OUT BOOL Output of the function. This will be TRUE only if the absolute delta values for all six elements of the vectors fall within the respective tolerances.


Notes

Example

If Vector1 has the following values (first 3 considered cartesian, next 3 considered rotational):
Image

And Vector2 (considered the reference vector) has these other values:
Image

Then, if the values for both tolerances are high enough for the values of the 2 input vectors, this function returns a bool with the value TRUE because all elements are within the respective tolerances:
Image

Otherwise, the result will be a FALSE:
Image

 


This help information is valid for iCube Engineer Online Help 2025.6

Copyright © 2025 YASKAWA EUROPE GmbH and © 2025 YASKAWA America, Inc.