enrico - 2020-04-06

I'm using a Raspberry pi 3 a+ and i have to read a digital input that changes its status at 300Hz. The program cycle time is about 80us. I have tried to use a simple program with a coil and a contact in LD but the delay from the input and output is about 4ms. How can i update I/O more rapidly?