Front GPIO Counter issue

  • Hi there,

    I have a mE5-MA-VCL Framegrabber and I am using the Front GPIO in differential mode, pull-up mode and not inverting signal (I set correctly the configuration on the cmd line).

    I am sending a 0.1 Hz square wave (50 % duty cycle) on pins 13 and 14 by means of a function generator with amplitude +/- 5V. Moreover I have connected GPI GND (pin 15) with GND (pin 6) and pin 7 with pin 10 (5V power supply).

    I have developed an Applet that simply detects the rising edge of this signal and then counts the edges providing me this value with a GetStatus block.

    The problem is that everytime I get a rising edge this variable increases randomly of 1, 2 or 3 instead of 1. I tried to change the amplitude of the input signal but I get the same problem. I can assure the signal is clean (checked with an oscilloscope).

    I was wondering if connecting directly pin 7 with pin 10 can give some trouble. Do you have any suggestions?




  • Dear Fabio,

    Thank you for providing a screenshot of the used design.

    Only counting the Rising-Edge of the signal is fine. By default SignalEdge is set to RisingEdge. In case of using both edges it may count 0, 2, 4, 6, ...

    You expect: 0,1,2,3,4,...N

    So fo N pulses you would like to see N as a result.

    Using Gnd as direction for PulseCounter will count forward +1 per pulse.

    Your design does not seem to be the problem.

    I guess that you have a "bouncing" input, means this kind of behaviour (Wikipedia)

    To surpress this you can use VA operator SignalDebounce.

    Please configure the debouncing bits/ticks as required in your case.

    A mE5-MA-VCL used a system clock of 125 MHz, that means the signal is samples with a period of 8ns.

    So 4 ticks of de-bounce would represent a period of 32ns.

    Please let me know if this was helping you or if we have to investigate a different idea.

    Have you configured the Front GPI for a differential signal using the gpio-tool?

    Best regards

  • Hi Björn,

    thanks for your quick response. I've added a SignalDebounce to my design, I already knew that block :)

    I get rid of this issue if I place a 1000 tick debounce time e.g. 8 uS. This can be acceptable for me, but just wanna figure out why it happens. If I place a LVTTL signal on one of the 34-pin connector input I don't have this problem.

    Anyway yes, I use the gpioTool to configure input as differential.

    Best regards,


  • Hi Biorn,

    I mean if I give a 3 Volt single ended signal on 34 pin connector (pin 9-10) everything works fine.

    In addition to my previous messages I tried to insert a 100 ohm resistor between the differential wires and I noticed that I need only 800 nS of debounce time instead of 8 uS. I guess there is no termination resistance on the board.

    Maybe this can help to figure out better.



  • Dear Fabio,

    Thank you for the additional details and espcially the resistor check ending up at 800ns bouncing time.

    But that may see some improvements with slight modifications.

    Here we have some schematics:




    More details: InputConfigFGPIO

    Today I will join some people from the hardware department and discuss a solution of this.

    Then you will receive an update over here...

    Best regards