Ref: LabWindows/CVI 5.5
I am having a problem displaying multiple traces on a strip chart. I use colors and line styles to identify different data signals.
Unfortunately, all the signal traces show up as solid lines despite the attribute setting of the traces (traces are assigned to different line styles to distinguish from each other). What puzzles me is that when I click on another control button which evokes a callback function to open another panel, the existing portion of the trace line in the strip chart turns to the correct line style (VAL_DASH_DOT, VAL_DASH, etc) momentarily, but new data trace still being plotted as solid line. If I close the newly opened panel and then click on the control button to open the panel again
, the portion of the traces that were plotted as solid lines will turn into their correct line style momentarily. Again, the new data trace after that will appear as solid line. Does anyone has any clues of what might cause it to happen like this?
The following codes are used to set up the plot traces:
// Set up and clear the strip chart
SetCtrlAttribute (panel, MYPLOT, ATTR_NUM_TRACES, 40)
// Set Trace Attributes
for (i=0; i<40; i++)
{
SetTraceAttribute (panel, MYPLOT, i+1, ATTR_TRACE_COLOR, TraceColors[i]);
SetTraceAttribute (panel, MYPLOT, i+1, ATTR_LINE_STYLE, TraceStyle[i]);
}
ClearStripChart (panel, MYPLOT);
SetCtrlAttribute (panel, MYPLOT, ATTR_SCROLL_MODE, VAL_CONTINUOUS);