12-07-2015 03:33 PM
I have modified the DAQmx sample code sychAI-AO.cws slightly to offer more output wavforms. I can read simultaneously on one channel no problem. Then when I try two channels I read in an array of N (N>>2, a lot of PlotStripChart examples have N=2 with 2 traces so it updates one point at a time... I don't want that.) samples. 0 to N/2-1 is what AO1 (output channel 1) writes out, and N/2 to N-1 is what AO2 writes out. Now if I set the number of traces to 2 and try to plot them on a stripchart I get the entire array 0 to N-1 on both traces.
How do I plot an array of say 10000 samples on 2 traces with the array grouped by channel?
Thank you
Solved! Go to Solution.
12-07-2015 05:48 PM
I changed my DAQmxReadF64 to Group by Scan Number instead of by channel and set skipcount = 0 and staringIndex = 0 and that worked exactly the way I wanted it to... but according to documentation it should not work.
12-09-2015 06:19 AM
Why you say it shouldn'work? It seem the exact way it should to me.
12-09-2015 12:18 PM
You are right RobertoBozzolo. I guess I was initially confused by the documentation of skipcount and startingindex, but I got some clarifcation from an answer on the labwindows forum. Possibly a post by you 🙂 I just don't understand how groupbychannel didn't work. What should skipcount and startingindex be if I have an array of 1000 elements and the first 500 elements are my first trace and the last 500 are my second trace?
Thanks again.
12-09-2015 04:12 PM
You can't organize your data this way, that's how stripcharts work. You can plot a single point per trace by passing an array with one element per trace. Passing a larger array simply permits to plot more points per trace, but the intreleaved structure is to be respected anyway.