Which products are affected?
ESP-SPAC-CAM1 (libraries cam), versions ≤ V1.4
How is the reaction?
The status signal nState of the function block L_CamSetXAxisVelocity shows status -20 (error: The touch probe position not within the clock pulse length) not before an x touch probe signal has been detected by the function block input L_CamSetXAxisVelocity.bTpReceived.
When does the problem occur?
The problem occurs when the x touch probe functionality (bTpEnable = TRUE) the set position for the x touch probe at the function block input (dnTpPos_p) is not within the clock pulse length (either in case of negative values or more than the maximum s values). In this case the status signal nState is not set to status -20 immediately. This will not happen before a x touch probe signal has been detected by the function block input bTpReceived.
Possible diagnostics?
The behaviour can be examined by switching on the x touch probe synchronisation (bTpEnable = TRUE) and preselecting a set position for the x touch probe < 0 or > double of the clock pulse length (see documentation of the function block L_CamSetXAxisVelocity). The status signal nState remains = 0. The signal nState is set to -20 for one task interval after an x touch probe signal has been detected by the input signal bTpReceived.
Short-term measures/recommendations?
When the set position for the x touch probe is preselected please make sure that via an external comparison with the x clock pulse length (maximum x value, e. g. input signal dnActXLength_p) the touch probe position is always within the permissible range between 0 and double of the x clock pulse length.
Evaluation:
The described behaviour leads to a later detection of incorrect set input signals for the function block L_CamSetXAxisVelocity. By means of an additional query on over-range or active limitation (e. g. modulo operation with the maximum x clocking time) you can make sure that impermissible values for the x touch probe set position are detected or that the x touch probe set position is even limited usefully.