DAQ output to "Array to spreadhseet string"

Please see attached and advice what I am doing wrong.  Cannot connect DAQ output to Array and write a file.  Thanks for any help you can provide.  This is in LabView 8.0.
Attachments:
Battery Test 2.vi ‏81 KB

You guys have been so helpful and I am amazed at your knowledge level.  I have revised my program using your inputs.  I have moved to one while loop and moved the report writing function outside the loop assuming that the report will be written once per Dennis' inputs, reduced the sampling size significantly per Ravens Fan's inputs and RTSLVU's inputs on getting rid of the connection errors. 
One question I have is shouldn't this not be a 2-D output i.e. Voltage vs. Time?  Please see attached and kindly offer any inputs you may have.  I will appreciate anything you can comment on in programming or dressing up the front panel.  My experience level with this is one month.  Thank you so much.
Attachments:
Battery Test 3.vi ‏80 KB

Similar Messages

  • Deleting all elements from array and array to spreadsheet string

    Hello,
    I would like to write a new data file for each "recording" session without closing the VI.  My problem is that the last "recording" session's data is at the top of every successive session's text file.  I do not want this.  I've tried to delete all rows from the array after my array to spreadsheet string function, but I think the problem is somewhere with the shift register and how the array is built.  I'm not too familiar with LabView and this aspect of my interface is driving me crazy.  Attached is my code and two successive data files.  I have not been able to find a solution on these or the LAVA forums.  Any help would be appreciated.
    Also, I know there is an easier way to write this kind of streaming data, but I need to do it this way for other devices and synchronization purposes.
    Attachments:
    testsecond.txt ‏90 KB
    test41.vi ‏80 KB
    testfirst.txt ‏78 KB

    A few more comments to your code:
    Your loop does not have a wait, meaning it spins the empty case millions if times per second, consuming all CPU while not doing anything. Add an indicator to [i] to see.
    To clear a 2D array in one case frame, just don't wire the output tunnel and set it to "use default if unwired". You'll get an empty array. No fancy tools needed.
    I probably would use an event structure and also protect the data if the save dialog is canceled.
    Here's a simple draft that probably requires a bit more work but should show some of the ideas.
    You should also
    add some protection that the VI cannot consume all available memory if it runs forever.
    Create a seperate case to save the data later if the file dialog is cancelled the first time.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    test41MOD.vi ‏107 KB

  • Trouble with array to spreadsheet string

    I am having trouble with the array to spreadsheet string.
    I have a 1-d array of string, the output spreadsheet string never puts a space on the first row, but all others.
    example:
    05:59:29.170    00000101     8        00 00 07 00 0B 0E 0D 0C
     05:59:29.198    00000100     8        00 00 3A 3A 39 39 39 39
     05:59:29.220    00000101     8        00 00 07 00 0B 0E 0D 0C
     05:59:29.248    00000100     8        00 00 39 39 39 39 39 39
    format string is %s and default tab is delimiter.
    this is screwing up my program because of the "scan for string" function can't be used correctly if the spreadsheet string isnt consistent.
    Any suggestions?
    Thanks

    You don't need to use "array to spreadheet string": You could use plain formatting for full control over the output.
    Still, your observation is a bit odd. Could you attach a simple VI that shows the behavior? (Put your input array into a diagram constant).
    LabVIEW Champion . Do more with less code and in less time .

  • \0D and \0A after array to spreadsheet string conversion

    Hi guys, i currently have a VI that manipulates a couple of arrays and writes them to a config file through the config VI.
    Now, i notice 1 problem whereby after my array is comma delimited and converted into a spreadsheet string, a tab and carriage return automatically appears at the end of the string. This causes my resulting config file to have \0D and \0A to appear with my keys in the config file.
    I know it's got to be the array to spreadsheet string conversion that's causing the problem because i don't have such \0D and \0A problem with keys without the conversion.
    How do i solve this?

    The OD and OA are the carriage return and line feed and yes the functona always appends these characters at the end of each line. Probably because this function is normally used to create files that a spreadsheet can read. There are several ways to remove the extra characters. Shown below is the string reversed and the String Subset function uses an offset of two. The output of that is reversed to get a string without the CR and LF. Also shown is getting the string length, subtracting 2 and wiring that to the length input of the String Subset function.
    Message Edited by Dennis Knutson on 07-26-2007 10:57 PM
    Attachments:
    Strip Last Two Characters.PNG ‏6 KB

  • Array To Spreadsheet String and DDE

    I have an array (one dimensional) that I want publish as a dde topic.
    So far I've been able to write all my dde components appear to be working,
    with the exception of the dde set value function in conjunction with Array
    To Spreadsheet String function.
    Array to spread appears to parse the the array the way I want it (that is,
    to create one
    big string with newline chars seperating tokens) but it's output does not
    seem to set correctly. If I look at the value right after I convert it to
    a spreadsheet
    string its good, but if I check it (once it's been loaded) using
    DDE Srv Check Item it comes up blank.
    Does anyone know what I'm doing wrong? I'm feeding the output of array
    to spread driectly into DDE Srv Set Item, shou
    ld it be going through another
    function first? Or am I using the wrong function to parse my array? My
    DDE
    server seems to work ok if I just use single string values, is there something
    about using arrays that I should be aware of? Any feedback is appreciated.

    Hi aschipfl,
    some thoughts about your suggestion:
    - When you want to suggest improvements to LabVIEW you should post in the Idea Exchange.
    - NI will not change the behaviour of functions existing for a long time…
    - NI will probably update the LabVIEW help for that function…
    - a spreadsheet string needs some kind of delimiter, what's the purpose of creating a spreadsheet string without them?
    When you really need a "Array to Spreadsheet String" without delimiters you could take this approach:

  • Find most repeated name in an array of text String

    Can somebody figure out this problem?
    I have an array of text String, each element in array is simply text String which represents name. Assume the length of array is unknown and names can be repeated once or several times
    The problem is to find out repeated name most
    For example, if giving an array below:
    String[] names = {"Watson", "Tom", "Waton", "Tom","Mike", "Watson","Mike"};we know that Watson will be repeated name most. If we do not know array in advance, how I can find most rrepeated name programmatically using Java?
    thanks

    * NameFinder.java
    * Created on April 12, 2005, 5:40 PM
    package javacore.basics;
    * @author
    public class NameFinder {
        private String[] names=null;
        /** Creates a new instance of NameFinder */
        public NameFinder (String[] names){
            this.names = names;
        public String repeatedNameMost(){
            String nameReturn ="Repeated name not found!";
            int count = 0;
            String tempstring="";
            int tempcount = 0;
            for(int i = 0; i<names.length; i++)
              for(int j=1; j<names.length; j++)
                  if(names.equals(names[j])){ 
    tempstring=names[i];
    tempcount++;
    if(tempcount>count && tempcount>1){
    count = tempcount;
    nameReturn = tempstring;
    return nameReturn;
    public static void main(String[] args){
    String[] names = {"Watson", "Tom", "Watson", "Tom", "Watson", "Mike",
    "Isabel","Zhen","Tom","Isabel","Watson","Watson","Tom","Mike"};
    NameFinder nameFinder = new NameFinder(names);
    System.out.println(nameFinder.repeatedNameMost());
    }// End of NameFinder class
    I have tried to run this code
    However, it doesnot give me what I want
    The output is "Milke" not "Watson" when running the code
    I got some good idea from you
    thanks

  • Having trouble converting array to spreadsheet string, storing the file and coverting back to array with complex numbers

    I am working with a network analyzer. I have arrays made of 5 columns the first consisting of an integer and the next four consisting of complex numbers. I am converting the array into a spreadsheet string and then saving the file using the write characters to a file VI. That seems to work well as when I open the file in Excel all the data is there. However when I try to reverse the process, open file and convert back to array, I loose some of the data. Specifically the imaginary parts of my complex numbers are all going to zero. I have narrowed down the problem to be in the conversion from spreadsheet string to array and vice versa. I
    think the problem may be with the 'format' input to the VI. I do not have an adequate resource for this so I am not sure what to put in to accomplish my task. Any takers?

    Hi Biz
    I don't think there is a direct way of converting a complex number to a
    string, so when you convert the array to a spreadsheet string, the
    numbers would be converted to real data.
    However, you could try separating the real and imaginary parts using the
    "Numeric: Complex to Re/Im" function, and then store these - either in
    separate files or in adjacent columns/rows in the same file. Then, when
    you read in the data again, use the "Numeric: Re/Im to Complex" function
    to put the two "halves" together.
    If you actually want Excel to interpret the numbers as imaginary, then
    you'll probably want to create a string for each complex number of the
    form "Re + Im*i" (after separating the Re and Im parts), by using
    "String:Format into String" with 2 numeric inputs and the format string
    "%f+%fi".
    Reading the data back into Labview then would require splitting the
    string into the 2 pieces by using "Stringcan from String" with 2
    numeric outputs (smae precision as original numbers specified by the 2
    Default Value inputs) and the same format string "%f+%fi", and then using
    the above-mentioned "Numeric: Re/Im to Complex" function. It worked for
    me, so if you can't follow what I am describing, send me an email and I
    can email you what I did (LV 5.1.1).
    Paul
    Biz wrote:
    > Having trouble converting array to spreadsheet string, storing the
    > file and coverting back to array with complex numbers
    >
    > I am working with a network analyzer. I have arrays made of 5 columns
    > the first consisting of an integer and the next four consisting of
    > complex numbers. I am converting the array into a spreadsheet string
    > and then saving the file using the write characters to a file VI. That
    > seems to work well as when I open the file in Excel all the data is
    > there. However when I try to reverse the process, open file and
    > convert back to array, I loose some of the data. Specifically the
    > imaginary parts of my complex numbers are all going to zero. I have
    > narrowed down the problem to be in the conversion from spreadsheet
    > string to array and vice versa. I think the problem may be with the
    > 'format' input to the VI. I do not have an adequate resource for this
    > so I am not sure what to put in to accomplish my task. Any takers?
    Research Assistant
    School of Physiotherapy, Curtin University of Technology
    Selby Street, Shenton Park, Western Australia, Australia. 6008
    email: [email protected]
    Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
    "Everyone who calls on the name of the Lord will be saved." Romans 10:12
    "For all have sinned and fall short of the glory of God, and are
    justified freely by his grace through the redemption that came by Christ
    Jesus." Romans 3:23-4

  • Array to spreadsheet string - remove space after delimiter

    Hi
    I created a Labview program to acquire a electrical signal and send it using TCP/IP.
    The image in attachment shows a piece of my code. The AQ subVI was created by me to accomplish the acquisition.
    However, the string that the "array to spreadsheet string" VI returns is something like this:
    -0.800781^ -1.030273^ -1.098633^ -0.942383^ -0.644531^ -0.209961^ 0.258789^ 0.712891^
    The VI is using the ^ character as a delimiter and it is converting commas to points as decimal separators.
    Now, what i would like to do is to remove the space character between the ^ character and the sample value, simply because that is what the receiver of the TCP/IP message wants.
    Can anybody help me?
    Thanks in advance
    Attachments:
    Array to spreadsheet.png ‏7 KB

    hi there
    remove the space between the ";" and "%" in your format specifier.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Array To Spreadsheet String, Empty Delimiter

    The Array To Spreadsheet String function does not accept an empty Delimiter, it uses the Tab character in such case.
    The same is true for the Spreadsheet String To Array function (but of course this function cannot work without a Delimiter).
    I would appreciate one of the following options:
    to allow an empty separator for both functions (for Array To Spreadsheet String this can easily work obviously; for Spreadsheet String To Array you might see an empty string delimiter between each two adjacent characters similar to the Search and Replace String function with an empty search string);
    to document that behaviour properly;
    I would prefer the first option espacially for the Array To Spreadsheet String function. What do you think?

    Hi aschipfl,
    some thoughts about your suggestion:
    - When you want to suggest improvements to LabVIEW you should post in the Idea Exchange.
    - NI will not change the behaviour of functions existing for a long time…
    - NI will probably update the LabVIEW help for that function…
    - a spreadsheet string needs some kind of delimiter, what's the purpose of creating a spreadsheet string without them?
    When you really need a "Array to Spreadsheet String" without delimiters you could take this approach:

  • Write array to spreadsheet string

    Hi,
    I have 3 numeric arrays and 1 string array.  I am try to use the function write array to spreadsheet string.  What is the easy way to do this, since I have both numeric and string, I can't create a 2d array directly?
    Yik
    Kudos and Accepted as Solution are welcome!
    Solved!
    Go to Solution.

    It depends how you want the file to store the data.
    Attached is an example of two methods mentionned above.  You can change the formatting so that you have the data on the same line or different lines.
    There are many solutions depending on exactly what you want to accomplish.
    --- didn't expect to see so many replies so quickly ---
    Most people recommend converting the numeric array to string array first.  I offer an alternative   or a choice of both.. 
    Attachments:
    exampleOfWriteDiffArrayToSprdsht.png ‏28 KB

  • Boolean Array to Hex String - LabVIEW Supplementary Data Conversion Library in version 12 please

    Hello,
    I would like to use the Boolean Array to Hex String.vi in LabVIEW Supplementary Data Conversion Library at http://zone.ni.com/devzone/cda/epd/p/id/3727
    But it is version 4. Can someone give me the library in version 12? Attached herewith.
    Attachments:
    cnvrsion.zip ‏38 KB

    Mass compiled in 8.2.1, which you can open with 2012.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    convrzun.llb ‏65 KB

  • Arrays into a string

    What is the easiest or best way to copy a char array into a string?

    String myString = new String(charArray);

  • Which is lightweight array list or string tokenizer

    which is lightweight array list or string tokenizer:
    I am reading a flat file and doing some text parsing to find some records which matched my search criteria.
    The flat file will have 5K records at the average and each records is in each line. (\n) is the delimiter to the string tokenizer.
    My Doubt is:
    Will it be good to manipulate all the records to the array list and then manipulating and achieve my task or
    Will it be good if i do a just string tokenizer and achieve my task with out an arraylist.
    Note: There is no unique fields in the records so no way to use hashmap/table.

    DrClap wrote:
    Faster? Actually the stated requirements were "lightweight" and "good". It guess I assumed what they usually mean to me.
    However answering this a different way.
    lightweight - your computer won't be heavier no matter which way you choose.
    good - it will have no barring on your concious or your place in the after life.
    good(2) - Write it the simplest way you think you can and worry about performance later if its a problem.

  • Generate a 12 bit digital output at DAQ output pin

    Hi 
      I have only a little knowledge in Labview
     I want to generate a 12 bit digital output at DAQ output pin , from a decimal number. I am using NI USB 6009
     Thanks in advance
      regards DK

    It seems to me that the same question was asked, answered, and marked as solved.
    http://forums.ni.com/t5/LabVIEW/Binary-output-at-t​he-digital-output-pin-as-1111-1111-1111/m-p/249969​...

  • I Need an Array of Rotated String Indicators

    Greetings,
    I need to make an array containing verticle strings. The size of the array will very during runtime.
    I know that for a single string indicator I can ignore the actual control, rotate the caption and change its text property and for a cluster there's an array of references to each member which can be used for accessing the caption text of each member but it appears that all members of an array share a caption.
    Am I correct that there's no way (yet) to do that?
    Peace
    phroggie

    Hello Phrog,
    It seems like the solution proposed by Paul is sufficient for your application. But I would like to suggest an alternative solution  (with its own trade offs) that may address some of your functionality concerns. The width of a string indicator and text wrapping can both be set in the properties menu. Because of these settings, each character would appear vertically stacked. An array of these string indicators could be sized dynamically and viewed using a scroll bar. Unfortunately the letter “m” is wider than combinations of other two letters such as “is”. If the width is set too low then the letter “m” gets cutoff. If the width is set too high then smaller letters like “is” appear on the same line. There is no magic width that prevents these two cases.
    The example I have attached works around the letter “m” by appending a space between each non-m character and uses an indicator width of 23 pixels. This is enough space to display the letter “m” while the inserted spaces prevent smaller letters from appearing on the same line. Despite this inconvenience, you gain the use of built in dynamic array sizing and the horizontal  scroll bar.
    Otherwise, scroll bar functionality is not built into clusters. It is possible to implement a scroll bar for a cluster programmatically as shown in this community example: https://decibel.ni.com/content/docs/DOC-35704
    This solution isn't necessarily easy to implement, so using stacked characters in an array may be a worthwhile trade off depending on your application.
    Earl C
    Applications Engineer
    National Instruments
    Attachments:
    Vertical Strings.vi ‏14 KB

Maybe you are looking for

  • Merging XML documents using DOM

    I have 300 XML documents to merge. They contain structures such as: 1.xml= <MIM> <MIM-ENTRY> <MIM-NUMBER>123456 </MIM-NUMBER> </MIM-ENTRY> </MIM> 2.xml = <Mim> -<Mim-entry> <Mim-title>*604176 SUPPRESSOR OF CYTOKINE SIGNALING 3</Mim-title> </Mim-entry

  • Updating FCS - Quicktime

    Just got done doing a clean installation of Leopard and then FCS2. Of course I nearly finished it yesterday, but while I was doing it I came across the 'don't upgrade Quicktime' to 7.3, and re-started it from scratch. Here's my question: If I don't u

  • Material Transfer between plants

    Dear Experts, We are in need of sending the material from one plant to another plant on job work basis. We need to inward the material in the recieving plant and further process needs to be carried out. Then this needs to be returned to mother plant

  • A/V Controls?

    What happened to the A/V Control panel in Quicktime 10? I liked the capability to view at 1/2 speed and slower. Now all I can do is watch at 2x, 4x and 8x. No slo-mo at all? Anybody know why this function is gone now?

  • Drivers for HP 900 for Windows 7 availability date

    Hi,    Is there anyone knows when drivers for old and current printer models for windows 7 os will be available for download??? Dennis