LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve data from table & plot XY Graph

Hi All,
 
I am trying to save some 3 columns & 10 rows of data to table. I'm able to retrieve the same. But when I trying to get column 1 data to one array for some comparison purpose by using index array. This is working ok by showing the array size of 10.
 
If I try to increase the data to 12 rows. this is also fine when I try to retrieve the data to array, showing the array size of 12. But when I reduce the data to 10 rows back or even lesser say 9 rows like, I am getting the array size as 12 not the actual 10 or 9. How to resolve this?
 
I am using these data for drawing graph in xy-graph. First column values meant for X axis. And the col. 2 & 3 are for Y axis. So I’ll get a graph band.
 
Hope somebody will answer my query.
 
 
Thanks & Regards,
 
Kousy

 
0 Kudos
Message 1 of 7
(3,125 Views)
Hello Kousy,

I am not sure I am clear on what is the point, could you post you vi so that we can provide better advices ?

Trying to help...

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 7
(3,117 Views)
Hi,
 
I am attaching the vi in LV8.0
 
Is there any option of saving this into earlier version of  Lv7.1
 
Thanks & Regards,
 
Kousy
0 Kudos
Message 3 of 7
(3,114 Views)
Hi,

I don't have LV8, only 7.1.1...

To save to LV 7.1 I think you have to do "save with option" and choose te correct tickbox 😉



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 7
(3,110 Views)

Hi,

I am attaching the same in LV7.1

Regards,

 

Kousy

0 Kudos
Message 5 of 7
(3,108 Views)

One thing that I think you may not be taking into account is that LabVIEW treats the table like a 2D array. If you initialize one column with 13 elements, all columns with information will have 13 elements inside of them. I believe that this is why you are seeing 12 regardless. However, if you need just the information inside of the column you can take the array, search for 0s, and replace them with "NaN" constants. This will mean that there is no data associated with the 0 values. Or you could take the arrray and look for the first zero, and then use a "Get Array Subset" to get only the valid data. Let me know if you need any other help on the issue and let us know how it goes.

Tyler H.
National Instruments

 

0 Kudos
Message 6 of 7
(3,094 Views)
I know table is a 2D array. What you said is true when we have 5 rows 3 cols of data, if we forget to enter data into some col, it should treat the other column values as '0'. This is acceptable.
 
But my question is, when I don't want to have 5th row data (4 rows (& 3 cols) of data is sufficient) I deleted 5th row's data in all 3 columns. And I saved. Now onwards, table should treat, it has only 4 rows & 3 cols of data. This is not happening. But on seeing it looked so.  because of table is an array of strings. So it shows us it has only 4 rows & 3 cols of data. But when we try to index values stored in table & plot graph, it showed it had still 5 rows of data with the last row's value as 0 (but we deleted!!)  This is creating problem in drawing graph in
XY Graph from the table of data.
 
But I did that workaround you told when I implented table in my application itself. I thought, I dont know how to handle tables efficiently. thats why I poseted a query.  But it seems to be there is no betterway to handle this case directly.
 
Anyway thanks for your reply.
 
 
Kousy
0 Kudos
Message 7 of 7
(3,079 Views)