Use this function to clear the current count value using the external input signal when the 2-phase counter is operating. You can also acknowledge the current count value being cleared.
You can only allocate the input terminal of X3 and X7 to the marker input (external input signal).
How to acknowledge the marker input
When the marker input is detected in the external input, the completion flag of the 2-phase marker input under the CH Counter external input completed in the system variable (#L_ExIOCntInExtCtrl) turns ON.
Then, turn on the completion acknowledgment flag of 2-phase marker input to detect the marker input once again. The Operation bit will differ depending on the CH to which you allocate the high-speed counter.
#L_ExIOCntInExtCtrl
The 1st bit in [Counter External Input Completed] is the input completion flag.
a: CH1 2-phase counter input marker input completed
b: CH3 2-phase counter input marker input completed
The 1st bit in [Acknowledge Counter External Input Completed] is the input completion acknowledgement flag.
a: CH1 2-phase counter input marker input completion acknowledged
b: CH3 2-phase counter input marker input completion acknowledged
The figure below shows a timing chart for [Counter External Input Complete] and [Counter External Input Completion Acknowledged].
1) When the maker input turns ON, the count value is cleared.
2) Once the count value is cleared, the completion flag of the counter external input turns ON.
3) Acknowledge that the completion flag of the counter external input is ON and turn ON the completion acknowledgment flag of the counter external input.
4) When the acknowledgment flag of the counter external input is recognized as ON, the completion flag of the counter external input turns OFF.