LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Array to Multicolumn Listbox data's manipulation

Array.jpg 

 

Hi  - I want to display the above mentioned array in muticolumn listbox with 2 columns , first column needs to be belongs to array [0] (Date and time ) and second column needs to be belongs to array [1] and array [2] ( Cone and Vane strings).

 

I have tried to implement the same, please go through the attached VI and I cannot make the above mentioned array data's into two column multi column listbox data's (that is , can't able to display the array [1] and array [2] data's in single column.

 

Please let me know the solution to resolve this as soon as possible.

 

Thanks and Regards,

Dinesh

 

 

 

 

 

 

 

0 Kudos
Message 1 of 6
(6,062 Views)

Well, your VI is a complete mess and has several CPU burner loops that run as fast as the computer allows. There is also a lot of duplicate and overly complex code. Programmed correctly, code with all this functionality could probably fit on a postcard. 😄

 

Anyway, for just building the multicolumn listbox, here's somewhat simpler code. Hopefully you can adapt it to your problem.

 

Note that you probably want to add only one row at a time, and you only want to add to the listbox and save to the file when new data arrives and not millions of times per second. Try a queue, for example.

Message 2 of 6
(6,056 Views)

Hi - Thanks a lot for your valuable reply.Here, I also want to display the whole logged data's in that multi column listbox.

 

The logic that was given by you is updating only the latest values. What can I do for logging all datas until stop button presses with out any duplication.

 

Please do the needful.

 

Thanks and Regards,

Dinesh

0 Kudos
Message 3 of 6
(6,042 Views)

All I showed you how to update the listbox with new rows, in a finite way using a FOR loop. You would use a while loop and append new rows whenever new data arrives. The array manipulation is the same. You can easily append the new data to file too.

As I said you need to use queues.

0 Kudos
Message 4 of 6
(6,018 Views)

@dineshniot wrote:

Hi - Thanks a lot for your valuable reply.Here, I also want to display the whole logged data's in that multi column listbox.

 

The logic that was given by you is updating only the latest values. What can I do for logging all datas until stop button presses with out any duplication.


As I said, queues would be a solution. Here's a quick draft how the output of two random producers can be logged.

 

 

I recommend NOT to accumulate data forever, because at one point you will run out of memory. You should log all data to file, but e.g. only display the last 100-1000 entries in the listbox (not shown). 

0 Kudos
Message 5 of 6
(6,007 Views)

Thanks a lot for your valuable solution.

0 Kudos
Message 6 of 6
(5,980 Views)