LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't plot to multiple traces

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!

0 Kudos
Message 1 of 4
(3,696 Views)

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] ...

0 Kudos
Message 2 of 4
(3,695 Views)

But you also need all 3 traces visible. See SetTraceAttribute()

0 Kudos
Message 3 of 4
(3,693 Views)

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!

0 Kudos
Message 4 of 4
(3,690 Views)