Hallo all,
I've some problems with programming graph controls in CVI. I'm measuring data with 10,000 Hz and write this data seperated by an semicolon into an *.txt file. After the Measurement, I want to visualize the data with an graph control. The problem is, when I read one Value from the File, CVI can not draw a "thin Line" so I have to use "connected point" what I want to avoid.
I thought I can take a hand full of data e.g. 50 samples and draw a graph with "thin line". This was the idea.
Here is my code:
while (stop == 0)
{
for(count=0; count<50; count++)
{
end = fgets(puffer, 100, MESS_FILE);
if (end == NULL)
{
stop = 1;
}
if (stop == 0)
{
pch = strtok (puffer, ";");
graph_x[0] = atof(pch);
pch = strtok(NULL, ";");
graph_y_s[0] = atof(pch);
}
}
PlotXY (handle_panel_graph, PANEL_PLOT_GRAPH_2, graph_x, graph_y_s, count-1, VAL_DOUBLE, VAL_DOUBLE, VAL_CONNECTED_POINTS,
VAL_ASTERISK, VAL_SOLID, 1, VAL_RED);
}
How can I solve the problem on a better way?
Greets from germany