07-16-2014 01:57 PM
So instead of getting one sample per loop, go for 5 or 10? Or more? I can see how that might help...
07-16-2014 03:11 PM
07-16-2014 08:36 PM
I'm not sure if I understand... Can you give me pseudocode? That would be awesome.
07-16-2014 09:05 PM
07-16-2014 10:05 PM
Yes, I did. Basically, it doesn't really fit my purpose. Because I need to graph the data in real time. So someone can watch it. Maybe it won't make a difference if I grab just a few, but yeah...
07-16-2014 10:48 PM
07-16-2014 10:54 PM
07-17-2014 01:24 PM
It's possible that I could. I'll have to talk to my supervisor.
I'm trying it out right now though.
I use getdata(ai, 50) and give it a 100 ms pause every loop.
After a few iterations, it says
"Error using daq.analoginput_nidaqmx_1_22/getdata
OBJ is not running and no data is available. Use START before calling GETDATA
Error in analoginput/getdata
varargout(1) = getdata(uddobj, samples,dataformat); "
I started ai outside of the loop, and the first few iterations it doesn't have any problems. So I have no idea what's going on now...
07-17-2014 02:16 PM
Just checked, I can't use the getdata(). I have to get single values and send them off. Not totally sure why.
So is there anything that could cause the slow down? My code is just "get a value, wait, repeat." I have no idea why that wouldn't work.
07-18-2014 11:52 AM