The method SetTargetMatrixInPlaneRotationList allows you to define a set of constraints for the generation of a matrix of targets contained in a selected working plane.
The rotation of the targets is randomly selected from a list provided by you.
To define a specific value for a constraint, set the minimum and the maximum to the same value.
The following is an example of matrix generation of targets:
Targets generation order, according to the selected working plane:
Targets generation order, according to the selected working plane and the value of i_stMatrixElementsStep:
i_alrRotationList[1] := 90.0;
i_alrRorationList[2] := 180.0;
i_alrRotationProbabilityList[1] := 3.5;
i_alrRotationProbabilityList[2] := 1.5;
In 1.5/5 (30%) of the cases, a rotation value of 90.0 is used.
In 3.5/5 (70%) of the cases, a rotation value of 180.0 is used.
Input |
Data type |
Description |
---|---|---|
i_udiNumberOfRows |
UDINT |
Number of rows of the matrix of targets. |
i_udiNumberOfColumns |
UDINT |
Number of columns of the matrix of targets. |
i_etPlane |
Used to select a working plane (for example, XY, XZ, YZ). The value of this input cannot be ROB.ET_WorkingPlane.None. While a specific working plane is selected, any generated pose describes a position contained in the plane (the position along the third 3D axis is set to 0) and a rotation about a vector normal to the plane. |
|
i_stMatrixOriginPosition |
Position of the matrix origin. The targets are generated starting from this position. It must be contained in the selected working plane. |
|
i_stMatrixElementStep |
Position steps along the X, Y and Z axes, used for the generation of the positions in the matrix. The value provided here must be compliant with the selected working plane. |
|
i_alrRotationList |
ARRAY [1... Gc_uiMaxNumberOfRotations] OF LREAL |
List of rotations. On each call of the method, a rotation value is selected according to the probabilities listed in i_alrRotationProbabilityList. |
i_alrRotationProbabilityList |
ARRAY [1... Gc_uiMaxNumberOfRotations] OF LREAL |
List used to define the probabilities related to the random selection of a rotation from i_alrRotationList. The probability of each rotation is evaluated as the ratio between the value assigned to each element of the array and the total sum of the listed values. |
i_etOrientationConvention |
Convention for the rotation angles of the orientation. |
|
i_alrTargetTypeProbabilityList |
ARRAY [1...Gc_uiMaxNumberOfTargetTypes] OF LREAL |
Every index of this array is linked to a specific target type and every element contains a value that affects the probability that a target with a certain target type is randomly generated. The probability of each target type is evaluated as the ratio between the value assigned to each element of the array and the total sum of the listed values. Example: A value in the field [1] of the array is linked to the generation of targets of type 1, field [2] is linked to type 2, and so on. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
ET_DiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
q_sMsg |
STRING[80] |
Event-triggered message that gives more detailed information on the diagnostic state. |
q_etDiag |
q_etDiagExt |
Enumeration value of q_etDiagExt |
Description |
---|---|---|---|
Ok |
Ok |
0 |
The parameters was successfully set. |
InputParameterInvalid |
NumberOfColumnsRange |
63 |
The number of target columns is out of range. |
InputParameterInvalid |
NumberOfRowsRange |
62 |
The number of target rows is out of range. |
InputParameterInvalid |
NumberOfTargetsRange |
54 |
Number of targets out of range. |
InputParameterInvalid |
MatrixElementStepXRange |
57 |
Invalid value of the X position step. |
InputParameterInvalid |
MatrixElementStepYRange |
58 |
Invalid value of the Y position step. |
InputParameterInvalid |
MatrixElementStepZRange |
59 |
Invalid value of the Z position step. |
InputParameterInvalid |
OrientationConventionInvalid |
38 |
Invalid orientation convention. |
InputParameterInvalid |
PlaneInvalid |
37 |
The selected working plane is invalid |
InputParameterInvalid |
PositionXRange |
40 |
The X position range provided as constraint of the random generation is invalid. |
InputParameterInvalid |
PositionYRange |
41 |
The Y position range provided as constraint of the random generation is invalid. |
InputParameterInvalid |
PositionZRange |
42 |
The Z position range provided as constraint of the random generation is invalid. |
InputParameterInvalid |
RotationProbabilitiesSumInvalid |
49 |
The sum of the orientation probabilities provided by you is zero. |
InputParameterInvalid |
RotationProbabilityRange |
48 |
A negative value for one of the probabilities related to the list of possible rotations was provided. |
InputParameterInvalid |
TargetTypeProbabilitiesSumInvalid |
61 |
The sum of the probabilities is zero. |
InputParameterInvalid |
TargetTypeProbabilityRange |
60 |
The value of one of the probabilities is negative. |
UnexpectedProgramBehavior |
RandomSeedInvalid |
39 |
The random seed value was initialized to an invalid value |
Enumeration name: |
NumberOfColumnsRange |
Enumeration value: |
63 |
Description: |
The number of target columns is out of range. |
Issue |
Cause |
Solution |
---|---|---|
The number of target columns is out of range. |
The number of columns provided as input is outside the range [1, Gc_udiMaxNumberOfGeneratedTargets]. |
Verify that the value of the number of columns is within a proper range. |
Enumeration name: |
NumberOfRowsRange |
Enumeration value: |
62 |
Description: |
The number of target rows is out of range. |
Issue |
Cause |
Solution |
---|---|---|
The number of target rows is out of range. |
The number of rows provided as input is outside the range [1, Gc_udiMaxNumberOfGeneratedTargets]. |
Verify that the value of the number of rows is within a proper range. |
Enumeration name: |
NumberOfTargetsRange |
Enumeration value: |
54 |
Description: |
Number of targets out of range. |
Issue |
Cause |
Solution |
---|---|---|
Provided value out of range. |
The target of i_udiNumberOfRows and i_udiNumberOfColumns is bigger than Gc_udiMaxNumberOfGeneratedTargets. |
Verify that i_udiNumberOfRows * i_udiNumberOfColumns ≤ Gc_udiMaxNumberOfGeneratedTargets. |
Enumeration name: |
MatrixElementStepXRange |
Enumeration value: |
57 |
Description: |
Invalid value of the X position step. |
Issue |
Cause |
Solution |
---|---|---|
Invalid value of the X position step. |
The X position step of the matrix elements is invalid. |
Verify that i_stMatrixElementsStep.lrX is compliant with the selected working plane. |
Enumeration name: |
MatrixElementStepYRange |
Enumeration value: |
58 |
Description: |
Invalid value of the Y position step. |
Issue |
Cause |
Solution |
---|---|---|
Invalid value of the Y position step. |
The Y position step of the matrix elements is invalid. |
Verify that i_stMatrixElementsStep.lrY is compliant with the selected working plane. |
Enumeration name: |
MatrixElementStepZRange |
Enumeration value: |
59 |
Description: |
Invalid value of the Z position step. |
Issue |
Cause |
Solution |
---|---|---|
Invalid value of the Z position step. |
The Z position step of the matrix elements is invalid. |
Verify that i_stMatrixElementsStep.lrZ is compliant with the selected working plane. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Success |
The parameters were successfully set.
Enumeration name: |
OrientationConventionInvalid |
Enumeration value: |
38 |
Description: |
Invalid orientation convention. |
Issue |
Cause |
Solution |
---|---|---|
The orientation convention is invalid. |
The input value of i_etOrientationConvention is invalid. |
Provide one of the permissible values of ROB.ET_OrientationConvention. |
Enumeration name: |
PlaneInvalid |
Enumeration value: |
37 |
Description: |
The selected working plane is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The selected working plane is invalid. |
The provided value does not identify a known working plane. |
Verify that the value is chosen from this set:
Refer to, Robotic Library Guide - ET_WorkingPlane. |
Enumeration name: |
PositionXRange |
Enumeration value: |
40 |
Description: |
The X position range provided as constraint of the random generation is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The X position range provided as constraint of the random generation is invalid. |
The X position of the matrix origin is invalid. |
Verify that i_stMatrixOriginPosition.lrX is contained in the selected working plane. |
Enumeration name: |
PositionYRange |
Enumeration value: |
41 |
Description: |
The Y position range provided as constraint of the random generation is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The Y position range provided as constraint of the random generation is invalid. |
The Y position of the matrix origin is invalid. |
Verify that i_stMatrixOriginPosition.lrY is contained in the selected working plane. |
Enumeration name: |
PositionZRange |
Enumeration value: |
42 |
Description: |
The Z position range provided as constraint of the random generation is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The Z position range provided as constraint of the random generation is invalid. |
The Z position of the matrix origin is invalid. |
Verify that i_stMatrixOriginPosition.lrZ is contained in the selected working plane. |
Enumeration name: |
RandomSeedInvalid |
Enumeration value: |
39 |
Description: |
The random seed value was initialized to an invalid value. |
Issue |
Cause |
Solution |
---|---|---|
The random seed value was internally set to an invalid value. |
- |
Contact your Schneider Electric representative. |
Enumeration name: |
RotationProbabilitiesSumInvalid |
Enumeration value: |
47 |
Description: |
The sum of the rotation probabilities provided is zero. |
Issue |
Cause |
Solution |
---|---|---|
The sum of the orientation probabilities provided by you is zero. |
The sum of the probabilities listed inside the input i_alrRotationProbabilityList must be greater than 0. |
Verify that the sum of the provided probabilities is greater than 0. |
Enumeration name: |
RotationProbabilityRange |
Enumeration value: |
48 |
Description: |
A negative value for one of the probabilities related to the list of possible rotations was provided. |
Issue |
Cause |
Solution |
---|---|---|
A negative value for one of the probabilities related to the list of possible rotations was provided. |
One of the probabilities inside i_alrRotationProbabilityList has a negative value. |
Verify that every probability has either a zero or a positive value. |
Enumeration name: |
TargetTypeProbabilitiesSumInvalid |
Enumeration value: |
61 |
Description: |
The sum of probabilities is zero. |
Issue |
Cause |
Solution |
---|---|---|
The sum of the provided probabilities is 0. |
The sum of the probabilities listed inside the input i_alrTargetTypeProbabilityList must be greater than 0. |
Verify that the sum of the provided probabilities is greater than 0. |
Enumeration name: |
TargetTypeProbabilityRange |
Enumeration value: |
60 |
Description: |
The value of one of the probabilities is negative. |
Issue |
Cause |
Solution |
---|---|---|
The value of one of the probabilities is negative. |
One of the probabilities inside i_alrTargetTypeProbabilityList has a negative value. |
Verify that every probability has either a value of 0 or a positive value. |