FB_SegmentedCam - Prepare (Method)
|
Type: |
Method |
|
Available as of: |
V1.0.0.0 |
Generation of a segmented cam
Based on the array i_astCamSegments, this method generates a segmented cam with i_diNumberOfSegments segments. Ensure that the values ST_Cam.lrXEnd and ST_Cam.lrYEnd of a segment correspond to the values ST_Cam.lrXStart and ST_Cam.lrYStart of the following segment.
|
Input |
Data type |
Description |
|---|---|---|
|
i_diNumberOfSegments |
DINT |
Number of segments |
|
i_astCamSegment |
ARRAY[1..Gc_diMaxNumberOfCamSegments] OF |
Structure for parameterization of the individual segments. |
|
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 |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> status message q_etDiag <> GD.ET_Diag.Ok -> diagnostic message |
|
|
q_sMsg |
STRING[80] |
Event-triggered message which gives more detailed information on the diagnostic state. |
|
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
|---|---|---|---|
|
OK |
0 |
Ok |
|
|
InputParameterInvalid |
67 |
JobType is indeterminable. |
|
|
InputParameterInvalid |
66 |
NumberOfSegments is routside the valid range. |
|
|
InputParameterInvalid |
68 |
Xend and Xstart must be equal. |
|
|
InputParameterInvalid |
65 |
XStart is greater than XEnd. |
|
|
InputParameterInvalid |
69 |
Yend and Ystart must be equal. |
|
Enumeration name: |
JobTypeUnknown |
|
Enumeration value: |
67 |
|
Description: |
JobType is indeterminable. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
A segment of the segmented cam contains no valid cam entry. |
The q_sMsg output shows which cam is faulty. |
|
Enumeration name: |
NumberOfSegmentsRange |
|
Enumeration value: |
66 |
|
Description: |
NumberOfSegments is routside the valid range. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
The number of segments of the segmented cam is invalid. |
The number of segments must be <= Gc_diMaxNumberOfCamSegments. |
|
Enumeration name: |
Ok |
|
Enumeration value: |
0 |
|
Description: |
Ok |
The generation of a segmented cam was successful.
|
Enumeration name: |
XendMustBeEqualXstart |
|
Enumeration value: |
68 |
|
Description: |
Xend and Xstart must be equal. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
In the case of two consecutive segments of a segmented cam lrXend <> lrXStart. |
Set lrXend of the previous segment equal to lrXStart of the subsequent segment. The q_sMsg output shows which segments are incorrect. |
|
Enumeration name: |
XstartGreaterXend |
|
Enumeration value: |
65 |
|
Description: |
XStart is greater than XEnd. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
The assigned value of the lrXStart variable of a segment is too high. |
The value of the lrXStart variable must be less than the value of the lrXEnd variable of a segment. |
|
Enumeration name: |
YendMustBeEqualYstart |
|
Enumeration value: |
69 |
|
Description: |
Yend and Ystart must be equal. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
In the case of two consecutive segments of a segmented cam lrYend <> lrYStart. |
Set lrYend of the previous segment equal to lrYStart of the subsequent segment. The q_sMsg output shows which segments are incorrect. |