Hi Ben,
Thanks for the reply.
Your right that I'm using the "wait until next" VI in both my user interface loop and my real-time loop. Your answer would make sense to me if I was changing the sleep time in the real-time loop, but I'm only changing the sleep time in the user-interface thread. Why does changing the sleep time in the UI thread affect the amount of time that the real-time thread sleeps when I don't change a thing in there?
Also, I don't think I want to change to the "wait" VI in my real-time loop because I need to maintain determinism in this loop. The "wait" VI may cause my loop to sleep different amounts of time if the amount of processing varies from iteration to iteration.
But thanks to your advice, I have a new theory here. I
changed the "wait until next" VI in the UI loop to be just a "wait" VI. I kept the "wait until next" in the real-time loop. This seemed to fix my problem. My guess is that the RT development environment makes the assumption that loops with the "wait until next" VI are time-critical. This would cause me to have two time-critical loops (the UI and the RT loops). According to the NI article referenced above, this could cause both threads to sleep if one sleeps.
Now that I think about it, this can't be entirely correct either. The NI article says that if the two critical threads are in different execution systems, they don't affect one another. Mine are in different executions systems, but somehow they are still influencing each other. Any thoughts?
But hey, thanks for your help. I think we got a work around that will be good enough for my app. Have a good day.