How to quickly clear an array used in a shift register?

Hello all,
I'm sure this is a quick one, but I'm missing the concept.
I have an array of boolean in a shift register. I have a case where I need to basically 'reset' the array rather than append to it....what is the best way to do this?
Thank you,
cayenne
Solved!
Go to Solution.

stevem181 wrote:
Of course, it is possible that my benchmark program is flawed.
Yup, disable debugging and you will see that the inner FOR loop is folded in both cases and the time drops to about zero.
Testing with debugging enabled is potentially unfair, because the reshaping will have more debugging code because there are more potential places to probe a wire, for example. All that said, I don't really know what's more efficient. That would require much more sophisticated testing. My point was just a reminder that there are always many ways to do things.
(This is under LabVIEW 2012. Constant folding and dead code elimination of course differ between compiler versions)
Granted, I typically don't use any of these two versions: I also omit the diagram constant, set the tunnel to "use default if unwired" and keep in unwired in the "clear" case. Less diagram clutter and quicker coding.
Here's how it would look like.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Folding.png ‏13 KB
UseDefault.png ‏3 KB

Similar Messages

  • How to populate multi-cluster arrays using matlab code?

    Hi,
    I have an array of clusters containing two 'Double' elements in each cluster. I am looking for a method to populate this array using MATLAB code. I need around 1000 clusters in the array, so populating it using the front panel is not practical. There is also some calculation involved in deciding the value in each element. If there is an example or a method to do this, please point me in the right direction.
    Thanks

    altenbach wrote:
    Can you attach a typical file so we know that the structure is? It is easy to convert from any data structure to any other data structure. You could even read it as a 1D string array and parse each line into a cluster, for example. It all depends on how the fil is arranged. You could also read the file as a flat string and chop it up into the desired structure later.
    I have attached the .vi file. I need to convert the spreadsheet to an array of clusters, thats where I'm getting stuck. (The vi is an example from help libraries)
    That is the part where I need to change so that I can use a spreadsheet.
    Attachments:
    Buffered counter.vi ‏52 KB

  • How do I clear the cache using a Mac with ver. 3.6.3?

    I am using a Mac OS x (10.6.2). I need to clear the cache in Firefox ver. 3.6.3. Please help. Thank you.
    == This happened ==
    Not sure how often
    == Today

    You are most welcome

  • How to quickly transpose 3d array?

    Dear all:
    I just  run into a strange problem. I have a 3d array, say, 400(page) x 55(rows) x 512(columns), and I would like to transpose it to 55(pages) x 512(rows) x 400(columns). I used the code as attached to this message. The speed is too slow. It takes more than 1.5 minutes in my machine. Can someone modify my code or give me some suggestion how to increase the speed? Thank you very much for your help.
    Attachments:
    convert.vi ‏17 KB

    Hi ccyang,
    your code was unnecesarily slow.
    And it was exponential (the more elements, the slower it got) because you resized the array at every for-loop iteration.
    On a 40x40x40 array your solution is 6 times slower, at 80x80x80 it is 12.
    Here's my solution:
    Ton
    Message Edited by TonP on 12-06-2006 08:26 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    convert_01.png ‏10 KB

  • HT201274 I erased my iPad to clear but wanted to use my Apple ID this seems to have brought all data back how do I clear but still use my Apple ID to keep the games I have purchased not photos and e mail

    I erased my iPad to give to my son as I have bought a mini.      However all of his games are on my iPad so I used my apply I'd but this seems to have loaded all of my data how do I transfer games only

    I have had the iPad since June 2013. I did buy it new. I want to register it under my current Apple ID so that it shows up in the same place as my other devices when I log on.
    I can't look at any of the service history or anything else related to it unless I can clear it's registration and link it to my active account. Does that make sense?

  • How do i clear the space used by MAIL on my iPhone5 ?

    I am using the iPhone5 16GB and lately am facing free memory space available issues.
    I checked on the memory used by various apps and found that MAIL is using 5GB alone.
    Kindly help me in reducing this...
    Earlier iOS version, I recollect we had an option to choose how many mails to be downloaded in the MAIL app; but I am not seeing that option in the latest iOS version.
    Please help !!

    Correct.
    http://www.apple.com/iphone/specs.html
    Language support for English (U.S.), English (UK), French (France), German, Traditional Chinese, Simplified Chinese, Dutch, Italian, Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish, Finnish, Norwegian, Korean, Japanese, Russian, Polish, Turkish, Ukrainian, Hungarian, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malay, Romanian, Slovak, Croatian, Catalan, and Vietnamese
    Keyboard support for English (U.S.), English (UK), French (France), French (Canadian), French (Switzerland), German, Traditional Chinese (Handwriting, Pinyin, Zhuyin, Cangjie, Wubihua), Simplified Chinese (Handwriting, Pinyin, Wubihua), Dutch, Italian, Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish, Finnish, Norwegian, Korean, Japanese (Romaji, Ten Key), Japanese (Kana), Russian, Polish, Turkish, Ukrainian, Estonian, Hungarian, Icelandic, Lithuanian, Latvian, Flemish, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malay, Romanian, Slovak, Croatian, Bulgarian, Serbian (Cyrillic/Latin), Catalan, Vietnamese, Tibetan, Macedonian, and Cherokee
    Dictionary support (enables predictive text and autocorrect) for English (U.S.), English (UK), French, German, Traditional Chinese, Simplified Chinese, Dutch, Italian, Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish, Finnish, Norwegian, Korean, Japanese (Romaji), Japanese (Kana), Russian, Polish, Turkish, Ukrainian, Hungarian, Lithuanian, Flemish, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malaysian, Romanian, Slovak, Croatian, Catalan, Vietnamese, and Cherokee

  • How to record sound into array using DAQ ?

    Hi to everyone
    Im last year student , im using LABVIEW for the first time.
    i have an myDAQ , i need to record audio go through the analog ports/AUDIO INPUT of the myDAQ, into array, for later singal proccesing.
    its for my final project.

    First, Learn to use LabVIEW with myDAQ is a series of videos.  To quote the Introduction,
    The Learn to LabVIEW with MyDAQ provides fundamental LabVIEW knowledge for a great out of the box experience with your MyDAQ. Each unit provides a set of videos to allow you to learn at your own pace and review material an unlimited number of times. As well, most videos are accompanied by minor exercises which will help drive home important topics and challenge you along the way.
    View the videos, do the exercises, and I suspect many of your questions will be answered.  If you write some LabVIEW code and have a problem, come back, show us your code, and explain the problem.
    Bob Schor

  • How to append data in array

    I use three read waveform nodes to read data from three channels of
    oscilloscope. The data of each channel are 1D array, and I use build
    array node to change them into 2D array. It can work well now.
    When I want to continuously reading data, I put the read waveform nodes
    and build array node into a while loop structure(a timer controls the
    time when to stop). That means every time, the program calls read
    waveform nodes and then changes them into 2D array. The problem is:after
    each loop, the data stored in the 2D array are overwrited. So, at last,
    I can only get the last loop data.
    I want to append the data into the 2D array, but I do not know how to
    implement? I have tried put the build array outside the while loop,
    unfortunatel
    y, it does not work.
    Any advice would be appreciated.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    The shift register is a built in way to carry data forward from one
    iteration of a loop to the next iteration.. Anything that you feed into the
    right shift register appears a data at the beginning of the next loop. You
    already have Build Array to combine three 1D array Elements into a single 2D
    array. Use another Build Array function to combine the current 2D array
    with the previous 2D array to create a combined array. To do this, you must
    change the input mode of the Build Array function to Array (not Element).
    This will concatenate the arrays and make the continuous data that you are
    after.
    The only other hidden step is that you must use Initialize Array to feed a
    blank, 2D array into the left shift register to clear any leftover data.
    Michael Munroe Mailto:[email protected]
    A Better Complete Development Engineering Firm
    San Mateo, CA 94403 http://www.abcdefirm.com
    [email protected] wrote:
    > Because I am very new to Labview and in fact, English is not my native
    > language, I can not understand the sentence that "combine the current
    > reading with the previous reading from the left shift register and save
    > it back to the right shift register" means.
    >
    > Now, I want to descript my question in a simple way:
    > In a while loop, I use a build array node to build three 1D arrays into
    > one 2D array. For each time when while loop repeats, the value of these
    > 1D arrays change, I want to append the new data to the previous ones.
    > But in my program, the data in the build array are overrided after the
    > while loop repeating.
    > So, How to append the data instead of overriding them in the while loop
    > structure?
    >
    > Thanks a lot!
    >
    > zhljh
    >
    > In article <[email protected]>,
    > Michael Munroe wrote:
    > > You need to combine the build array function with the shift register.
    > Pop
    > > up on the edge of the loop and Add Shift Register. You can combine the
    > > current reading with the previous reading from the left shift register
    > and
    > > save it back to the right shift register.
    > > --
    > > Michael Munroe Mailto:[email protected]
    > > A Better Complete Development Engineering Firm
    > > San Mateo, CA 94403 http://www.abcdefirm.com
    > >
    > > [email protected] wrote:
    > >
    > > > I use three read waveform nodes to read data from three channels of
    > > > oscilloscope. The data of each channel are 1D array, and I use build
    > > > array node to change them into 2D array. It can work well now.
    > > > When I want to continuously reading data, I put the read waveform
    > nodes
    > > > and build array node into a while loop structure(a timer controls
    > the
    > > > time when to stop). That means every time, the program calls read
    > > > waveform nodes and then changes them into 2D array. The problem
    > is:after
    > > > each loop, the data stored in the 2D array are overwrited. So, at
    > last,
    > > > I can only get the last loop data.
    > > > I want to append the data into the 2D array, but I do not know how
    > to
    > > > implement? I have tried put the build array outside the while loop,
    > > > unfortunately, it does not work.
    > > > Any advice would be appreciated.
    > > >
    > > > Sent via Deja.com http://www.deja.com/
    > > > Before you buy.
    > >
    > >
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • How to access a Access array in flex

    Hi
          Guys can any body explain me how to access an array.Actually i am succsufully getting value from array named Dynamic array.
                       DynamicArray[i].language_1[0].translation;
    here the node language_1 is not static it may be language_2 or language_3 or language_4 ect.. so i put that getting value in a variable named key
    var key:String = 'language_1'; //Suppose i am getting right value here in key
    So please guide me how i access my dynamic array using key so that i got same value as previous code give.
    i already tried:-DynamicArray[i].key.translation;
                           DynamicArray[i][key].translation;
    but every time got error.
    for more clarity i put array structure here
    DynamicArr= Array (@43b1271)   
        [0] = Object (@43ad219)   
            contentlanguage_1 = Array (@43b1431)   
                [0] = Object (@4417a11)   
                    choice_id = "0"   
                    deleted = "N"   
                    downloadurl = "http://94.126.48.105:80/cgi-bin/WebObjects/DataVit.woa/wa/Download/getImage?imageId=1281&f ilename="   
                    selected = "Y"   
                    translation = "2_486"   
                length = 1   
        [1] = Object (@4417949)  
    please Help me out
    Thanks In Advance
       Vineet Osho

    Hi Vineet Osho,
    You haven't tried ---> DynamicArray[i][key][0].translation; This will work
    You tried -> DynamicArray[i][key].translation; (This is wrong as you havent specified on which index you want to access)
    If still doesn't work ty this...
    Try  (DynamicArray[i])[key][0].translation;
    If the above one doesn't work then try the below one...
    var obj:Object = DynamicArray[i];
    var translation:String = obj[key][0].translation;
    Thanks,
    Bhasker

  • How do I clear the "drop down menu" of past titles I have searched for?

    How do I clear the drop down menu of titles that have been searched for in the past? Example; If I type in a word such as craig, then craigslist appears in the drop down menu, how do I clear this?

    Use these steps to remove saved (form) data from a drop-down list:
    #click the (empty) input field on the web page to open the drop-down list
    #highlight an entry in the drop-down list
    #press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries

  • Any way to save data in loop without using shift register or feedback loop

    Hello all
    I was thinking, is it possible to save data in a loop to next iteration without the use of a shift register or a feedback loop?
    I need the possibility to reload data within a loop from a lvm file, but I want to use the same data until i load some new ones.
    The reason why I don't want to use the shift register or feedback node is due to speed, even though I am not sure if the shift register
    actually moves all the data from one register to another, or if it is stationary until a change in the data occur.
    The data I want to reuse is medium-large (6 force measurements, 2 pressure, 1 flow channels)of about 10sec data in each file with samplingsrate of 2kHz..
    In my analysis program I have many CPU demanding calculations and 3D graphs, so I just want to minimize the CPU load as much as I can for each part of the
    software..
    I have attached a small VI to explain what I am talking about.
    I now I shouldn't use the express VI, and I am going to change that as well - this is just a proof of concept! 
    Hope you guys can help me understand this shift register better...
    Thanks!
    - Tommy 
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.
    Attachments:
    visual.vi ‏34 KB

    tombech wrote:
    [...]The reason why I don't want to use the shift register or feedback node is due to speed[...]
     Tommy,
    shift register are the fastest you can ever get...........
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to get the values of an Array using JSP Tags

    Hey guys,
    I need some help. I've splited a String using
    fn:split(String, delim) where String = "1,2,3,4" and delim is ,
    This method returns an Array of splited Strings. how do i get the values from this array using jsp tags. I don't wanna put java code to achive that.
    Any help would be highly appreciated
    Thanks

    The JSTL forEach tag.
    In fact if all you want to do is iterate over the comma separated list, the forEach tag supports that without having to use the split function.
    <c:set var="list" value="1,2,3,4"/>
    <c:forEach var="num" items="${list}">
      <c:out value="${num}"/>
    </c:forEach>The c:forTokens method will let you do this with delimiters other than a comma, but the forEach tag works well just with the comma-delimited string.

  • How do you create an array without using a shell on the FP?

    I want to be able to read the status of front panel controls (value, control box selection, etc.) and save it to a file, as a "configuration" file -- then be able to load it and have all the controls set to the same states as were saved in the file. I was thinking an array would be a way to do this, as I have done that in VB. (Saving it as a text file, then reading lines back into the array when the file is read and point the control(s) values/states to the corresponding array element.
    So how do I create an array of X dimensions without using a shell on the front panel? Or can someone suggest a better way to accomplish what I am after? (Datalogging doesn't allow for saving the status by a filename, so I
    do not want to go that route.)

    Thanks so much m3nth! This definitely looks like what I was wanting... just not really knowing how to get there.
    I'm not sure I follow all the icons. Is that an array (top left with 0 constant) in the top example? And if so, that gets back to part of my original question of how to create an array without using a shell on the FP. Do I follow your diagram correctly?
    If I seem a tad green... well I am.
    I hope you understand the LabVIEW environment and icons are still very new to me.
    Also, I had a response from an NI app. engineer about this problem. He sent me a couple of VI's that he threw together approaching this by using Keys. (I still think you are pointing to the best solution.) I assume he wouldn't mind m
    e posting his reply and the VI's for the sake of a good, thorough, Roundtable discussion. So here are his comments with VI's attached:
    "I was implementing this exact functionality this morning for an application I'm working on. I only have five controls I want to save, but they are all of different data types. I simply wrote a key for each control, and read back that key on initialization. I simply passed in property node values to the save VI at the end, and passed the values out to property nodes at
    the beginning. I've attached my initialize and save VI's for you to view. If you have so many controls that this would not be feasible, you may want to look into clustering the controls and saving the cluster as a datalog file.
    Attachments:
    Initialize_Settings.vi ‏55 KB
    Save_Settings.vi ‏52 KB

  • TS3297 iTunes puts up a message "The item you've requested is not currently available in the Hong Kong Store." I had not requested anything from the HK store at that point, and I have never used any store other than the HK one. How I can clear that messag

    I've been running iTunes on WinXP for years with few problems.  I have all my iTunes files on an external USB drive. I just bought a new PC running Win7, 64-bit.
    I connected the external USB drive to the new PC and installed 64-bit iTunes on it. When iTunes started up, I pointed it at the iTunes directory in the external drive, using Edit > Preferences > Advanced > iTunes Media Folder Location. It showed a progress bar that it was updating the iTunes Library. I signed in and authorized the new machine. I have one spare authorization.
    Then iTunes put up a message "The item you've requested is not currently available in the Hong Kong Store." I had not requested anything from the HK store at that point, and I have never used any store other than the HK one.
    When I click OK, the iTunes Store page remains blank, apart from saying "iTunes Store" in the middle of the page.
    I went to "View My Account" and pressed the Reset button to "Reset all warnings for buying and downloading items", but that doesn’t fix this particular warning. I also tried Edit > Preferences > Advanced > Reset Warnings and Rest Cache.
    But still, every time I click the “App Store” button in the iTunes Store window, the message appears. If I click the Books, Podcasts or iTunesU buttons, these display normally.  So I’m stuck with being unable to purchase apps, other than through my iPad and iPhone.
    If I move the external drive back to the XP machine, the same thing happens.  If I go to another PC - a notebook running Vista - everything is normal.
    Any idea how I can clear that message?
    Thanks for any help you can offer.

    Further info on my question above.
    I have tried re-validating my credit card, which apparently fixed it for some. 
    I have also tried uninstalling, re-downloading and installing again.
    Neither of these steps fixed the problem.

  • I deleted all my photos and videos and then delete the deleted files but the photo app is still taking up 12 GB of space and I have no room for new stuff.  How can I clear the memory space used by my deleted videos and photos?

    I deleted all my photos and videos and then delete the deleted files but the photo app is still taking up 12 GB of space and I have no room for new stuff.  How can I clear the memory space used by my deleted videos and photos?  I don't know why the photos are still taking up space and if I will have to reset my phone to get rid of the problem.

    Hey there TowneJ,
    Welcome to Apple Support Communities.
    The article linked below provides troubleshooting tips that’ll likely resolve the issue that you’ve described, where deleted files appear to be taking up space on your iPhone 5.
    If you get a "Not enough free space" alert on your iPhone, iPad, or iPod touch - Apple Support
    So long,
    -Jason

Maybe you are looking for

  • Replicat goes down. when new table added to source

    Hi I am using a 10gR2 setup on Linux (using em's) and then a 11g. I have a goldengate setup. Everything seems to be working fine except when we add a table at the source it doesn't get replicated on the target? and the replicat gets abbened-ed when r

  • IDoc to File[EDI] using seeburger BIC Mapping Tool

    Hi Gurus, I'm having a scenario of IDoc to EDI FIle, I'll be using IDoc DESADV.DELVRY03.ZDELVR0X; Kindly advise steps needed in BIC Mapping Tool. I've already referred to this post /people/dijesh.tanna/blog/2008/05/25/sap-pixi-content-conversion-usin

  • DVD upscaling?

    Hi, I'm planning to buy a full HD (1080p) plasma to use with my mini as an AV server connecting via a DVI-HDMI cable. My question is about upscaling standard DVD content: If I play a 'standard' def DVD through the mini (either from the disc or from a

  • Bluetooth won't send, Programs won't install

    Whenever I try to send a file via bluetooth, a picture appears on the dock, but then quickly closes. I can't get it to stay open long enough for a window to open up. Also, the picture that appears isn't even the bluetooth symbol that's supposed to ap

  • How to get imports of a class OR how to fix javadoc-@link/@see

    I'm generating classes based on existing classes. The new code also contains the javadoc-comments. These comments can contain @link- and @see-tags. In the original source everything works nicely since all necessary classes are imported. However, insi