<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: disarray clearing arrays ! in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241042#M131237</link>
    <description>thanks for the pointers, i'll look into the statemachine approach and
post up how i get on. got a couple of questions though. firstly, what
do people use to convert their vi's to png's. is it an export from
labview, or some thirdparty application? finally i can't find the
function to simplify the boolean expression in the first loop. in
altenbach's recorder.png what is used to get that what looks like a 1d
string array?&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 13 Jul 2005 15:25:39 GMT</pubDate>
    <dc:creator>staggerlee</dc:creator>
    <dc:date>2005-07-13T15:25:39Z</dc:date>
    <item>
      <title>disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239967#M130795</link>
      <description>i've written some code using 6.1 that acquires data for a given period
of time,&amp;nbsp; storing it in an array via a&amp;nbsp; while loop and shift
register etc. once the acquisition is complete (loop stops) the data
gets saved to file. the program then sits there waiting for another
trigger to start acquiring again. thing is on subsequent acquisitions
data gets appended to the array. so on next file creation data
contained is present acquisition and all those that ocurred before.
only posts i find close are using 'replacing array subsets' etc, but
can't seem to get away from dimesional/data-type errors etc going down
this road. once the loop has stopped and file is written i want to
clear the array ready for next acquisition. i'm in total array
disarray. please can someone help!&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance. &lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Jul 2005 01:43:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239967#M130795</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-12T01:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239970#M130796</link>
      <description>After writing the file, assign the shift register an array constant with no data. You can make an array constant by right clicking on the shift register and selecting "create constant".</description>
      <pubDate>Tue, 12 Jul 2005 02:06:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239970#M130796</guid>
      <dc:creator>Odd_Modem</dc:creator>
      <dc:date>2005-07-12T02:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239974#M130798</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;You need to initialize your shift register with an empty array on the left (see image). This way the shift register will be empty next time the loop starts.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/attachments/ni/170/130798/1/InitShift.png" /&gt;&lt;/P&gt;
&lt;P&gt;Still, it is more efficient to preallocate a full size array (especially if you know the final size exactly) and use "replace array subset". That should be no problem. What are the dimensions of your arrays? Please attach a simplified example so we can figure it out.&lt;/P&gt;&lt;P&gt;Message Edited by altenbach on &lt;SPAN class="date_text"&gt;07-11-2005&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:26 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2005 02:25:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/239974#M130798</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2005-07-12T02:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240464#M130982</link>
      <description>thanks guys for the replies. i've attached some code, so you can see
what i'm trying to do. i think once the data array is built i need to
pass it to another array prior to saving it to file. this second array
can be 'replaced' with data from the next acquisition from the first
data array. does this make sense? i tried doing this taking dimensional
values from the first array to initialise array etc, but just got
dimensional errors.&lt;BR /&gt;
&lt;BR /&gt;
again, thanks in advance for any info that helps.&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Jul 2005 17:20:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240464#M130982</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-12T17:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240511#M131002</link>
      <description>&lt;DIV&gt;Just a few comments to the code, I still don't quite understand your exact needs. (just an image, I no longer have LabVIEW 6.1).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;I think you should built the entire thing into a statemachine, with each structure corresponding to a state.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;Check the shipping examples for ideas.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;Notes:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;It does not make sense to write to an indicator&amp;nbsp;and its local variable at the same time. This is redundant.&lt;/LI&gt;
&lt;LI&gt;Use wires if possible.&lt;/LI&gt;
&lt;LI&gt;Use the proper path tools for paths. using string operations makes in platform dependent.&lt;/LI&gt;&lt;/OL&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Jul 2005 18:32:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240511#M131002</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2005-07-12T18:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240777#M131122</link>
      <description>I agree with altenbach, a state machine would be nice here and will make it easier to modify and maintain in the future, plus you'll be able to eliminate some of the structures that you are currently using.</description>
      <pubDate>Wed, 13 Jul 2005 08:08:06 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/240777#M131122</guid>
      <dc:creator>Stuart_R</dc:creator>
      <dc:date>2005-07-13T08:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241042#M131237</link>
      <description>thanks for the pointers, i'll look into the statemachine approach and
post up how i get on. got a couple of questions though. firstly, what
do people use to convert their vi's to png's. is it an export from
labview, or some thirdparty application? finally i can't find the
function to simplify the boolean expression in the first loop. in
altenbach's recorder.png what is used to get that what looks like a 1d
string array?&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Jul 2005 15:25:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241042#M131237</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-13T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241058#M131244</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;You can just take a screen capture of the active window (alt-PrtScr), paste it into a graphics program (e.g. MS paint, photoshop, corel phhotopaint)&amp;nbsp;and save as png.&lt;/P&gt;
&lt;P&gt;LabVIEW itself can get the panel and diagram image of any VI and save it as PNG. An example code is shown &lt;A href="http://forums.ni.com/ni/board/message?board.id=170&amp;amp;message.id=124219#M124219" target="_blank"&gt;HERE&lt;/A&gt;&lt;/P&gt;. 
&lt;P&gt;To create an string array diagram constant, first place an empty array container and then drop a string diagram constant&amp;nbsp;in it.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2005 15:47:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241058#M131244</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2005-07-13T15:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241359#M131374</link>
      <description>thanks for all the help, brilliant. things are running smoother now. going to rework a state machine version of the code too.&lt;BR /&gt;
thanks again.&lt;SPAN&gt;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://ni.lithium.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Jul 2005 03:25:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/241359#M131374</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-14T03:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/242189#M131751</link>
      <description>got working on a state machine version of my code.&lt;BR /&gt;
a 'record' state aquires data for one minute, then changes to a 'file'
state, that saves the data.&amp;nbsp; it then goes to a 'mode' state that
sits there untill the next correct time to acuire data is reached. then
it's back to 'record' and 'file' states. etc etc. problem i'm having is
that the file created has no data. any pointers much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2005 17:38:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/242189#M131751</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-15T17:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: disarray clearing arrays !</title>
      <link>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/242253#M131788</link>
      <description>sorted, i forgot to pass the sound format structure to the snd write wav file vi, doh!&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2005 19:58:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/disarray-clearing-arrays/m-p/242253#M131788</guid>
      <dc:creator>staggerlee</dc:creator>
      <dc:date>2005-07-15T19:58:26Z</dc:date>
    </item>
  </channel>
</rss>

