Jump to content

Keps

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Keps

  1. Thanks for the advice and the vi. It was the wait ms function that I needed. I know it won't be deterministic in windows but it was just terrible. I still don't quite understand when the timer was starting on the wait ms multiple since the timer in the second loop started after the first ended. Anyway it is well behaved now, within the constraints of windows.

    I like the wait.vi and would use it, but this code is not mine and time is of the essence here.

  2. Here is the code. It steps through a few array values in each for loop, the first one totaling 200ms and the second 300. The result is timing that sometimes resembles the programmed values, but it is usually much shorter than the 500ms total.

    I'm not sure I fully understand the problem. Posting some code would help the debug process.

    From my current understanding, it sounds like the Wait (ms) would be the function you want. The Wait Until Next ms Multiple function will sit there until the ms counter reaches a multiple of the programed value. So the first loop you set to 200ms. The Wait Until Next ms Multiple will sit there until the counter reaches 200. Next loop, you set the loop rate to 75. The Wait Until Next ms Multiple will sit there until the counter hits 225. So then you really only had a 25ms loop. Check out this snippet as an example.

    post-11268-0-08356500-1291764241_thumb.p

    Note: You may have an output clock value off by 1ms due to Windows timing.

    post-18563-0-80198800-1291765228_thumb.p

  3. I have an executable application that is running on an XP netbook. It is controlling a USB DAQ device from NI (don't have the model number off hand). It is attempting to do things in 10s of milliseconds and the timing, as you might expect is terrible. I understand that but, the timing is too short! This I don't understand at all. It is effectively setting some digital channels to one state for 200ms, changing the state after another 300ms and repeating this over and over again. The timing is all over the place but averages about 60% of what it is programmed from.

    Any idea how bad timing winds up shortening these intervals? I am using the wait ms multiple function.

    Any help, advice etc. would be greatly appreciated.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.