11-04-2012 08:37 AM
Please have a look at the attached VI and chart output. Can someone explain why the wait time is so unreliable and hwo to fix it?
11-04-2012 08:46 AM
You are trying to get reliability on a windows PC for a loop with a 2 msec wait. Windows is not that reliable. It probably is going off and spending time doing other stuff.
11-04-2012 08:46 AM
Welcome to windows. With such small times as 2ms there's no guarantee windows will return in time, as you notice. What are you trying to do?
/Y
11-04-2012 08:51 AM - edited 11-04-2012 08:52 AM
i'm trying to read from an instrument as quickly as I can (and I cant just go in and get 100 pts every 100ms)
Any options out there for me?
11-04-2012 09:15 AM
What instrument are you trying to work with? Are you sure it can even respond as quickly as every millisecond?
Can it supply multiple data points in one request?
The more reliable method would be to request the last 100 data points and ask for it every 100 msecs.
If it was a DAQ card, you'd be setting up a continuous data acquisition and would request all the data in the buffer (or a lot of data on a regular basis). Then the timing functions of the DAQ card would guarantee all of your data is 1 millisecond apart.
11-04-2012 09:51 AM
Xitron 2802. It can respond every MS...but you're right. I've been going back and fourth between using 'history' vs. real-time pinging. I guess history is the best approach - letting the instrument control its own sample rate.