LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help With Array Building Speed

Hello,

 

I have four files that i would like to load data from.  The files will contain a days worth of temperature data as well as date and time.  I am pulling out the temperature portion and putting it into an array on four separate channels.  I am using this vi to pull historic data together and make a simple bitmap of the graph.  My load time gets exponentially slower as load time goes by.  I was told that initializing the array to all zeros would help with the load time, but that doesn't seem to be the case.  Any advice would be much appreciated. 

 

Thanks in advance,

0 Kudos
Message 1 of 5
(2,404 Views)

Check out the links in this tag cloud taht have the word Memory associated with them.

 

What you want to do is allocate the memory ahead of time and then replace the space allocated with "zeros" with your real data.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(2,398 Views)

You are still building up an arrays ( used insert instead of replace , and that array for your graph)

 

And why are you displaying a new graph for every new timstamp?  

 

I'm not trying to understand what you what to do with all this date conversions .......

 

 

 

 

I forgot to wait the 10min BEN time to save my answer 😉 

Message Edited by Henrik Volkers on 04-16-2010 04:00 PM
Message Edited by Henrik Volkers on 04-16-2010 04:02 PM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 5
(2,393 Views)

Henrik,

I wasn't sure how to read the data in from my text file and have it form a time stamp.  That is why I reform it into a time stamp from string data.  If there is a quicker way to form it and avoid building a new array so that it still works in an XY graph, i'm interested.

0 Kudos
Message 4 of 5
(2,388 Views)

You'd have a lot less code if you just used the Read From Spreadsheet File VI.

 

As for converting the time information, you can do that with the proper format strings:

 

 

 

Message Edited by smercurio_fc on 04-16-2010 01:46 PM
Download All
Message 5 of 5
(2,352 Views)