CTU not incrementing

jakeg
2022-07-05
2022-07-05
  • jakeg - 2022-07-05

    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?

     
  • i-campbell

    i-campbell - 2022-07-05

    from your description, I suspect you have not called the CTU_Instance() anywhere in your code

     
    • jakeg - 2022-07-05

      That makes sense!

       

Log in to post a comment.