Stefan,
It is very difficult to go through your code and determine what the problem is. It would be much easier if you gave us a description of your problem.
Are you trying to measure and analog or digital signal?
What frequency are you expecting, how are you generating it, what are you getting?
If analog, what is your sampling frequency?
If digital, how do you have your counters set up?
Also, if it is neccesary to read your code, the project you attached does not open properly, it complains that LEBENSDAUERPRUFUNGDlg.ico is missing.
Please describe your problem further as described above, and we'll see what can be done.
Regards,
Amaury R.
-NI Applications Engineer.