07-08-2013 01:47 AM
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
07-08-2013 02:40 AM - edited 07-08-2013 02:41 AM
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.
07-08-2013 04:21 AM
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
07-08-2013 10:19 AM - edited 07-08-2013 10:40 AM
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.
07-08-2013 10:49 AM - edited 07-08-2013 12:06 PM
@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).
07-10-2013 12:46 AM
Thanks a lot for your valuable solution.