Converting a single entry within an array into 16 entries within a new array. Building an array without knowing the exact amount of array entries.

I'm developing a VI that reads a text file and does a manipulation on the data it reads. The VI does the following: First, it reads all the ASCII characters from a text file, converts them to 8-bit words, until EOF occurs. Then I do some simple conversion to each byte. The result is that each bit entry of the byte now gives 2 3-bit entries, making a total of 16 3-bit values returned for each byte within the original array. For example, when I read element #0 of the byte array, I get the byte value of 1011000. My VI then converts this to 16 seperate 3-bit values. I can do the conversion just fine. My pro
blem is figuring out how to put these 16 elements into an array to be written out of my 6534 card. I know how to do the DIO write part, but the problem is how do I combine the 16 elements into an array for thousands of bytes read from the text file? Also, the size of the file that I read is unknown until it is read, so I may have to output many sucessive outputs as described above. The first element read would give 16 3-bit elements for the new array, the second byte read would give another 16 3-bit elements and so on upto N values in the original array. Any ideas ?

Place a for loop, wire N with your readed string lenght, pass the string inside and wire it to string subset, with the lenght entry wired to 1 and the offset entry to the loop counter (i). Then, you can play with every character inside the loop, and have an output array composed with the result of every character.
Hope this helps

Similar Messages

  • I am trying to download my photos into I photo with my new Nikon S6300 camera and keep getting the message  The file could not be imported the file is unrecognizable format had no problems with my Canon camera

    Trying to download my pictures to IPhoto with my new Nikon S6300 camera keep getting the message the file could not be imported as the file is unreconizable format. I had no problem with my old Canon camera. Please help

    I am having the same problem which has happened very infrequently before. Generally it's one photo and happened when my battery died.
    However today I tried to download six photos.
    None would download including several others for a total of 21 that would not download.
    Since I had just installed a new powered hub and added three new external 4T hard drives, I got concerned that it was the hub. Then got really worried that I'd have problems with the data I have been backing up.
    However following this sequence of events, I've determined it's not the hub, but still don't know what is causing the problem.
    (1) Put a fresh battery in the camera - same results
    (1.5) Used a different port in the new hub - same results
    (2) Put the card in the card slot in the back of my iMac - no problems except that one image I knew about last week. The six new images imported.
    (3) Tried again using the cable - still same error
    (4) Changed cables - my husband has the same camera - still same error
    (4) Put the card in his camera with his cable - still same error
    (5) Put the card in a card reader and used the same slot in the new hub - no problems - same one wouldn't import but message that there are no new photos to import.
    (6) Moved the offending one image to the Trash while the card was in the card reader
    (7) Put the card back into my camera and used my cable. iPhoto had no error and displayed the message there are no new photos.
    Conclusion:
    Not the camera
    Not the cable
    Not the hub
    Must remove bad photo from the card
    However, I have not had to do that before. I went through several imports on vacation when there was one bad image and just ignored it each time.
    Any idea why this is happening now?
    Thank you

  • I changed my email address and now cannot get into my icloud account to change that because I don't know the password

    I changed my email address and my password on my ipad but when I tried to change the address on my icloud account it keeps asking me for my old password which I no longer know. I can't delete the account because I can't access it without the old password

    Hey rid23466,
    Thanks for using Apple Support Communities.
    If you forgot the password to your Apple ID, you can follow this article to recover it.
    Apple ID: If you forget your password
    http://support.apple.com/kb/ht5787
    Have a nice day,
    Mario

  • HT204053 How do I get into my Icloud account without knowing the password ?

    I reset my phone and i don't remebemer my icloud password and every time i try and change it i never get an email saying reset

    Welcome to the Apple Community.
    Put in a request for another verification e-mail to be sent to you.
    Start here, change your country if necessary and go to manage your account.
    Also check your Mail rules and filtering, the verification mail may be going to a junk folder or even being deleted altogether. You may also wish to contact your mail provider to see if their spam filters are removing the email before it gets to you.

  • My 4500 all in one goes into power save and will not come out of it without pulling the power plug.

    I have tried hitting the power button short and long, pushing every button, but it seems the only way out is pulling the power plug.
    Thanks for any help.

    HI
    This is a known issue and HP is working on Firmware to fix this issue. This will be released soon.
    So please use the workaround for the time being if the printer goes to power saving mode.
    regards
    Mugu
    ---- If my answer was helpful please click the "Kudos" star.
    If your problem is solved please click the "Accept as Solution" button ---->
    Though I work for HP the post are of my own

  • Convert/Cast Single to double inaccurate.

    Whilst I have read some background on floating opint numbers not being able to accurately store numbers such as 0.1, I am not clear why converting from single to double is so inaccurate.
    Converting a single 0.1 to a double 0.1 yeilds
    0.10000000149011600
    But 0.1 can be represented in a double more accurately, even if not perfectly as
    0.10000000000000000
    This stems from the single representation of 0.1 actually equating to 0.10000000149011600 in binary.
    However, we know that the single has a particular level of precision.
    I would like a conersion function that converts single 0.10000000 to double 0.1000000000000000.
    I can appreciate that the standard conversion functions would need to still exist as real numbers for engineering would suffer less overall inaccuracies with the existing rounding functions.
    One other question:
    Can the convertsion be affected by the OS/framework/hardware or will it be consistent on different machines?  Are there any settings that can change the conversion behaviour?

    There is no reason that we should explicitly convert a single precision number to a double precision number using some function as a simple assignment would do the same. Please review the following code:
    float x = 10.5367f;
    double a = Convert.ToDouble(x);
    double b = (double)x;
    double c = x; //same as conversion or casting
    In the previous example, when x is declared as float, the memory space that is allocated is sufficient to hold the value of x as float along with precision. Now when we assign the value to some double variable (by conversion/casting/direct assignment), all
    what happens is,
    1. the space for the double variable is allocated
    2. the value is copied from single the single variable to double variable.
    Now obviously, the value of the single variable does not span as much memory space as the double variable. So when copied to double the remaining memory space of the double variable is still filled up with garbage data. The actual value of the single variable
    is still preserved upto the range of single precision.
    So frankly speaking, there is no such straightforward way that can be used to fill the garbage digits with 0s.
    I personally recommend that you use "decimal" instead of "double" if any such conversion is required.
    Thanks.

  • How do i get the music on my ipod into my itunes library on new computer

    how do i get the music from my ipod into my itunes library on new computer

    If they are all purchases from the iTunes Store you can transfer the purchases from your iPod to the library by following the steps here: http://support.apple.com/kb/HT1848

  • How to append a new entry in a list of 100,000 names without iterating the list each time?

    I have a list of 100,000 + names and I need to append to that list another 100,000 names. Each name must be unique. Currently I iterate through the entire list to be sure the name does not exist. As you can imagine this is very slow. I am new to Java and I am maintaining a 15+ year old product. Is there a better way to check for an existing name?

    We are using a Java list because that is how the original developers coded it. I don't think they planned for that many entry's. I know I need to re factor this which is why I am asking for opinions on how to  make this more efficient. Currently we don't use a database for anything in the product so I would like to stay away from that if possible.
    Ok - but it still raises the question in my mind as to how that data is being used.
    I gave you a couple of options that will take care of the UNIQUE requirement (HashTable, HashMap) but the BEST solution depends on:
    1. How often new entries are made
    2. How often entries are deleted
    3. How often entries are changed
    4. How often entries are accessed
    5. How the data is actually used
    If you just have a one time requirement to merge the two lists then just do it and get it over with - it won't really matter how you do it.
    But Hash classes will present their own performance issues if the typical access is for many, most or all of that 200k+ entries.
    Without knowing the full set of requirements we can't really know just what part of the process needs to be optimized.

  • How can I get into my Ipod Classic (160GB) when it is screen lock without entering a combination?

    My Ipod Classic (160GB) was recently put into screen lock without knowing the combination, is there a way to bypass this?

    I think this article will help
    http://support.apple.com/kb/HT1350

  • Trying to load pre-2006 lso files into Logic 8 on my new intel Mac Pro

    I'm trying to load pre-2006 lso files into Logic 8 on my new intel Mac Pro, but they crash the app every time. files saved 2006 and later load OK. Anybody shed any light on this or know of a fix (other than the laborious work-around of re-saving all early lso's in logic 8 on the PPC and physically moving them via a portable drive to the new machine)?
    (BTW, those files also crash the Logic 7 installed on the intel Mac.)

    Upon further work with my migration, I find I was incorrect in the time frame assertion of these failed files: apparently, the creation/modification dates have nothing to do with it and the reality is that some files fail at random, while others load just fine. right now it looks to be about 50/50 Beats me why this is.
    Anyway, for those interested, I've discovered a very helpful key to the quick processing of file data for a plethora of files (i. e. re-saving the "bad" lso files as Logic 8 projects on the older CPU and moving them over to my new machine), and that is the 'control key/launch' of the app. I hadn't realized that Apple had added this feature to Logic to enable easier work on multiple song files when one does not require the audio.
    For those who don't know about it, the 'control key/launch' provides an option to disable the core audio at app start-up, thus allowing files to load instantly without loading the plug-in library files associated with tracks - great for copying MIDI data between song files, or in this case, re-saving a batch.
    Still puzzled, though, as to why so many older lso files crash Logic when they attempt to load on my new CPU.

  • Converting a single column table into a two-column table

    Hi everybody
    What I'm trying to do is convert a single column table into a two-column table. Here an example:
    Table A (single column):
    ID1
    ID2
    ID3
    ID4
    ID5
    Table B (two-column) should be:
    ID1 ID2
    ID3 ID4
    ID5
    I already did it by looping through a cursor and making an insert every 2 rows, but don't like performance.
    Is there an easier/faster way to do this?
    Thanks in advance
    Oscar

    with t as (
               select 'ID1' col1 from dual union all
               select 'ID2' from dual union all
               select 'ID3' from dual union all
               select 'ID4' from dual union all
               select 'ID5' from dual
              ) -- end of sample table
    select  col1,
            col2
      from  (
             select  col1,
                     lead(col1) over(order by col1) col2,
                     row_number() over(order by col1) rn
               from  t
      where mod(rn,2) = 1
    COL COL
    ID1 ID2
    ID3 ID4
    ID5
    SQL> SY.

  • Want a single entry for alarms in the "AlarmsWindow"

    Hi,
    I have an alarm in Lookout that comes in fairly frequently.  This is normal for this alarm, it comes in and out of alarm by itself.  After the alarm clears itself it becomes blue (the unacknowledged color).  When the alarm goes back into alarm it is displayed in the "AlarmsWindow" on a new line.  So after getting this alarm eight times I will have 8 entries in my AlarmsWindow. 
    How can I make it so that I will only get a single entry in the AlarmsWindow per alarm?
    I have tried the following paramenters in the Lookout.ini file, but they don't seem to do anything.
    [Alarms]
    MostRecent=1
    OldAlarmsLimit=0
    I edited the file in my Lookout4 directory and then restart lookout.  I have also tried restarting all the the Lookout services...  with no lock
    Please help,
    Thanks.

    Thanks for the reply!...
    Actually, I'd prefer not to use auto acknowledge if it can be avoided... precisely for the reason you've mentioned.  (i.e. because it is a global thing...)  I don't want my other alarms to auto acknowledge. 
    Ideally  I would like there to be a way for there to be just a single entry for an alarm, where the time stamp would update whenever the alarm is active.
    The problem is that my customer has a pressure gauge that they monitor for low pressure... but at certain times of the day the pressure readings will bounce around the setpoint level for the low pressure alarm.  For example, if the pressure setpoint is 70 psi, then we might see a period of time where we get 100 alarms because during that time of the day the pressure fluctuates between 68 and 73 psi frequently.  All these alarms flood the "AlarmsWindow" making it hard to see other valid alarms.  So the customer would like to see just one alarm entry for ALL occurances of the pressure alarm.
    It sounds like the .ini file entries I mentioned should do just that, but when I try it nothing different happens...  is there something different I have to do to get those .ini entries to work?  Has anyone had success with thise .ini entries?
    please help... thanks!

  • Converting a single space between sentences with two spaces.

    Hi,
    I'd like to convert all single whitespaces after a sentence to two whitespaces, e.g. This is a sentence! The next sentence is separated by two spaces. This would result in the conventional style of two spaces between sentences, unlike html style. I want to find either a .,?, or ! followed by one whitespace, followed by a capital letter, so: "[.|?|!] [A-Z]". Then I want to just replace this with the same thing except two spaces. If I do this:
                        textString = textString.replaceAll(". [A-Z]", ". [A-Z]");
    it finds these matches, but it literally prints out these:
    How about DeLillo[.|?|!] [A-Z] still haven't read him[.|?|!] [A-Z]r Saul Bellow[.|?|!] [A-Z] told you I like Herzog a lot...maybe
    thanks for your help!
    -Won

    You don't want to add a space if there is already a second space. The following will turn any number of spaces after the sentence into two spaces. Note if the whitespaces include a \n\n (paragraph mark) it will turn everything into one long paragraph.
    replaceAll("([\\.\\?!])\\s+", "$1  ");

  • Getting a single value from an array collection

    I have an array collection that was created from an XML file
    through the HTTP Service. One of the nodes in the XML file was
    product_number and I can display all of the items in this node in a
    datagrid so I know the array has the name of the node in it.
    I would like to be able to retrieve a single item from the
    array collection (e.g. a product_number = to xxx) and assign it to
    a variable.
    I would also like to be able to assign all the items in a
    particlur column (e.g. all product_numbers) to separate variables
    at the same time.
    Any help would be greatly appreciated.

    You can apply a filterFunction.
    Or you can do it the brute force way: loop over the elements,
    and test for the value you want.
    As far as putting values into variables, I am not sure what
    you want.
    And this is not a Flex Builder question and should go in the
    General Discussion forum.
    Tracy

  • Convert domains Single values

    Hi!
    I'm trying to convert domains Single values (fromvalue range) into another languages. .
    Thx
    ilhan

    What is your db version?
    In 11g you can do
    SQL> var str varchar2(30)
    SQL> exec :str := 'SCOTT,KING,JONES,ALLEN'
    PL/SQL procedure successfully completed.
    SQL> select empno, ename from emp, xmltable(('"' || replace(:str, ',', '","') || '"'))
    where ename = trim(column_value)
         EMPNO ENAME    
          7788 SCOTT    
          7839 KING     
          7566 JONES    
          7499 ALLEN    
    4 rows selected.

Maybe you are looking for