10-30-2015 05:12 PM - edited 10-30-2015 05:14 PM
Hello everyone,
I am using myRIO 1900 for my Active Noise Cancellation project. I need to process the audio signal @44.1kHz sample rate and 50 samples per frame . So, I am using myRIO High Throughput personality.
Now my problem is simple, I want to measure the each iteration time ( loop time) . I went for normal tick count ( msec). Used in a standard way [https://decibel.ni.com/content/docs/DOC-11078].
But my indicator value is oscillating between 1 and 2. It is supposedly 1.13msec, but how to find the exact timer value ??
I think , I cannot increase the resolution of tick count(msec) as it is by default has 1 msec resolution and I cannot use external clock source as I am using myRIO.
Help me to calculate the precise loop time.
Thank You.
Solved! Go to Solution.
11-01-2015 02:54 PM
If this were running on Windows you could use the high resolution tick count function but the only way I know of getting sub ms timing on RT is to use a timed loop and monitor the iteration duration. You can use a 1MHz timing clock which would give you a 1us resolution.
You just have to be careful with this because it will change the priority so it may change how your application is running and doesn't always correlate to how fast the process will run if it is not in a timed loop.
11-01-2015 03:23 PM
RT has express VIs for timers. You can use this: http://zone.ni.com/reference/en-XX/help/371361J-01/lvexpress/tick_count/