LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to plot multistrips

I want to show multistrips in one chart,and i scaled every strips,in the chart
i can see only one, when I cancel scaling,that is ,delete 1,2,3,4
I can see all of the strips.why?
void CVIFUNC PlotStrips (int panelID, int controlID,int traceNum, double *buf[500])
{
//every element of buf is 0;
int i,j;
double *Merge ;
double scale;
Merge=(double*)malloc(traceNum*500*sizeof(double));

for(j=0;j { //2
QScale1D (buf[j], 500, buf[j], &scale); //3
}//4
for(i=0;i<500;i++)
{
Offset=0;
for(j=
0;j
{
Offset=Offset+100.0/(traceNum+1) ;
Merge[j+i*traceNum]=buf[j][i]+Offset;
}
}
PlotStripChart (panelID, controlID, Merge, traceNum*500, 0, 0,
VAL_DOUBLE);

}
0 Kudos
Message 1 of 3
(3,045 Views)
Hi! The first and the third arguments of QScale1D are array of double. In your example code, you do not show the declaration of buf. Is it declared as an array of double arrays (double "double" array)? Also, in your comment, you say that every element of buf is 0. If buf is an array of double arrays, does this comment mean that all the elements in buf, which are double arrays, are initialized to null? Or, do you mean that all the elements of double arrays in buf are set to double value of 0? If it is the latter case, then it doesn't matter if you call QScale1D or not, all the elements would remain 0.

Regards,
Mika Fukuchi
Applications Engineering
National Instruments
Message 2 of 3
(3,045 Views)
thanks for your anwser.
i initialize all the elements to 0,you mean when i call Qscale1D,every elements of buf remain 0?
0 Kudos
Message 3 of 3
(3,045 Views)