Hi Forelle,
What card are you using?
First of all you have to make sure the output from your device is debounced.
Regarding the card, in cards such as PCI-DIO-32HS and PCI-6534, in order to avoid ringing, you need to use proper cable such as SH-6868-D1 and also the appropriate termination scheme such as Schottky Diode termination etc.
You can find about the termination in the following link in the user manual of 653x.
Manual Page D-6 Onwards Please do let me know if you have any questions.
Sincerely,
Sastry Vadlamani
Applications Engineer
National Instruments