LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PlotStripChart Skip Count

Solved!
Go to solution

Hi guys, this is hopefully quite a straight forward question.

 

Basically my program acquires data which is then plotted on a strip chart as it is acquired. The data is interleaved and when plotting I would like to be able to skip the first channel in each scan, i.e. say the structure is A-B-C-D-A-B-C-D-A-B-C-D etc, I'd like to just plot B-C-D-B-C-D-B-C-D, is it possible to do this using skipcount in the PlotStripChart function? If so, what value should I use?

 

Many thanks,

 

Ben

0 Kudos
Message 1 of 5
(3,459 Views)
Solution
Accepted by topic author cottonb

You can use the PlotStripChart Starting Index and Skip Count parameters to skip the A data points in your example. If you have 3 traces and you set Skip Count to 1, then it will skip 1 element in the array for every 3 elements that it plots. A more specific way to look at this is that it will plot 3 elements, then skip the 4th. To make this skipped element be the A data set in your array, set the Starting Index to 1 so that you start plotting data from the first B data element and the every 4th (skipped) element will be the A data elements (minus the first A element that was never considered).

 

This may not have been clear because the documentation for the Starting Index parameter is unclear or incorrect. It states that the parameter values should be an even multiple of the number of traces which is not true in your use example. I have filed a bug report to resolve this.

National Instruments
0 Kudos
Message 2 of 5
(3,440 Views)

Thanks very much, yea the description slightly confused me as to how to do it, however your explaination has cleared things up!

0 Kudos
Message 3 of 5
(3,431 Views)
i have three lines to be drawed on Stript Chart control. every line have 200 points,for example! suppose,lineA[200],lineB[200],lineC[200].I creat an array all[600] to save the points of line A,B,C. all[0]=lineA[0] all[1]=lineB[0] all[2]=lineC[0] all[3]=lineA[1] all[4]=lineB[1] all[5]=lineC[1] ........... then ,i use PlotStripChart() to plot lineA and lineC . how could i to do ?
0 Kudos
Message 4 of 5
(3,147 Views)

Correct me if I'm wrong, but I don't think there's a way to skip the middle trace. What you can do is to plot all points and hide trace 2 by calling SetTraceAttribute with ATTR_VISIBLE attribute.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(3,136 Views)