LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

System crashes on certain circumstances and Hint for work with graph

Hy there,
under certain circumstances (try to create a new string control) my program
crashes, the system load increases to 100% and a "Break Execution" won't
work any more.
This happens only after moving a cursor in an existing graph on the same
panel where I want to create this control.
Any explanations?

Oh, btw, I create plots by using the function PlotLine. If I want to change
the attributes of the plot or for example use the snap-to-point cursors, do
I have to store the returned plothandles? And how could I store these? (You
don't understand this question? See the example down there..)
Thx a lot
Harald

/* Create Graph with sinus, balck color.
Want to change color of plot subsequ
ent to red */

int i;
double ActVal, LastVal;

PlotPoint (panel, Graph, 0, 0, VAL_EMPTY_SQUARE, VAL_BLACK);
LastVal = 0.0;

for (i = 1; i < 1000, i++)
{
ActVal = sin(i);
PlotLine(panel, Graph, (i-1), LastVal, i, ActVal, VAL_BLACK);
LastVal = ActVal;
}

SetPlotAttribute (panel, Graph, (PlotHandle??), ATTR_TRACE_COLOR,
VAL_RED);

/* Snap-to-point cursor are only snapping to the first point. */

=======================================
Flying:
The knack lies in learning how to throw
yourself at the ground and miss
(The Hitch Hiker's Guide)
mailto:HIlg@gmx.net
0 Kudos
Message 1 of 2
(2,677 Views)
I can't tell from the provided information what could be causing your crash. If you have a reproducible example, you can send it to our support engineers at http://www.ni.com/ask and they can provide an explanation. As for the second question, yes you need to save to plot handles to change their attributes later. The best way to do this is most likely with an array or a link list of handles.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,677 Views)