I'm trying to use a digital input to set the .CU input of a CTU instance, in order to count the number of pulses of a pulsed signal. I can see the digital input fluctuating and setting .CU high and low, although the .CD count just shows zero. It seems as though the .M rising edge detection variable is always false. .RESET is set to false - I made sure that the count was not being reset elsewhere in the code. Does anyone have an idea why this could be happening?
from your description, I suspect you have not called the CTU_Instance() anywhere in your code
That makes sense!
Log in to post a comment.