01-25-2013 07:09 AM
LabWindows/CVI 8.5
I need to have two traces in a Strip Chart control visible, with different data in each. How?
I'm a bit confused on the multiple traces feature of the Stip Chart in LabWindows/CVI. In another post just done I described a situation where I used to be able to have a strip chart with a single trace that alternated color as it went across, depending on operator input. Somewhere along the way, the strip chart object was changed where that no longer works. So I thought that with having multiple traces in the strip chart, I could plot one group of data to one trace and another group to another trace. This doesn't seem possible. The help for PlotStripChart says that it plots the points to each trace. My question is if all traces get the same data, what is the point in having multiple traces? If I can't get two traces to have different data, then they'll both look exactly the same. Am I overlooking something?
Thanks!
01-25-2013 07:28 AM
Hi,
do you have the sample userint\stripchart ? It demonstrates a strip chart with three different traces. The relevant function call is
PlotStripChart (panel, PANEL_CHART, datapoints, 3, 0, 0, VAL_DOUBLE)
where datapoints is an array of size 3, and trace 1 plots datapoints [0], trace 2 plots datapoints [1] ...
01-25-2013 08:52 AM
But you also need all 3 traces visible. See SetTraceAttribute()
01-25-2013 09:42 AM
Ah, an array! That makes sense. So in a two-trace chart, the even indices in the array would be plotted on one trace and the odd indices on the other. I'll try that as soon as I can. I was expecting to be able to include the trace number in the PlotStripChart message. Thanks!