Raspberry PI GPIO Example

Hi MarkusR
This is digital input equivalent to a PLC’s High Speed Counter input.
As an example scenario : counting the products moving on a conveyor at a speed for 20 products per second
That is why I have to have a very low latency . As suggested by Eugene, Interrupts are the best way, but I am not so strong in python to write a program which communicates with Xojo. And I somehow do not feel comfortable with the idea of 2 programs for a single task.
Thanks for your response