11-24-2009 03:45 AM
I have a couple of nested for loops, inside the inner most loop is DAQmx acquire (N samples, which gets averaged to effectively one sample), then I take the data out of the acquire DAQmx outside both the loops, which gives me a 2d array and i plot it to an intensity chart. The problem is since it will plot only after the loop finishes, it isn't doing it in real time, which is what i want.
I am attaching my V, it may not run, as it requires USB-6251 but is pretty basic, the two nested loops are there to generate x,y positions [by sending incremental voltages]and then at each point it acquires the data, which i want to plot as an intensity chart.
For example my output is in terms of volatges on two output channels
(1,1) (1,2) (1,3) (1,4) (1,5)
(2,1) (2,2) (2,3) (2,4) (2,5)
(3,1) (3,2) (3,3) (3,4) (3,5)
(4,1) (4,2) (4,3) (4,4) (4,5)
(5,1) (5,2) (5,3) (5,4) (5,5)
which i achieve via the 2 nested for loops, and at each point i acquire the data from sensor, which i want to plot as image in real time.
11-24-2009 03:29 PM
I have modified one of my favorite intensity graph examples to update the graph in real time. This significantly slows things down, but if your data acquisition is already slow, you probably won't notice.
11-25-2009 05:03 AM