LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

data save

Hello, I am trying to save data to an excel file in Labwindows. I have no troubles in saving output values. But I do not know how to save X-axis values in a column. I just couldn't find the code representing X-axis. I use codes like this:

 

PlotY(panel,PANEL_GRAPH_In,&(dataIn[i*numRead]),numRead,VAL_DOUBLE,VAL_THIN_LINE,VAL_EMPTY_SQUARE,VAL_SOLID,1,plotColors[i%12]);

 

Any one have any ideas? Thanks.

0 Kudos
Message 1 of 6
(3,502 Views)

If you are using PlotY() to plot your array dataIn, and dataIn[x] gives access to individual y-axis points of this array,

where  (i*numRead)<= x <((i+1)*numRead), then this 'x' represents your x-axis values for each curve.

'i' represents each curve on your plot and starts from zero and keeps incrementing by 1 for each curve on your plot.

 

Regards,

Sudhir

0 Kudos
Message 2 of 6
(3,492 Views)

As pointed out by Sudhir, the X data array simply does not exist if you are using PlotY: this function plots values against their indices. It is normally used for constant-paced acquisition when the X values are not relevant. If this is your case and you want to store X values anyway you must generate a fake X array and store it on your sheet.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 6
(3,478 Views)

Thanks, Sudhir. The issue is I am trying to read out this number array and save it in excel. But it failed... It seems it is a "fake" array which can not be read out.

0 Kudos
Message 4 of 6
(3,465 Views)

Hello Roberto. Thanks for your reply. I'd love to read the X values out directly instead of generating a fake number sequence... 

0 Kudos
Message 5 of 6
(3,464 Views)

Unfortunately, with PlotY the X array somply does not exist! It has the same significance as the row index in destination Excel sheet.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 6
(3,457 Views)