Text output using string indicator from subVI to mainVI

Hi,
I think I asked similar question before, but since then my program got more complicated.
Here is my issue.
I have a program with nested loops to print out the stream of strings in subVI
and it needs to be updated in a string indicator in mainVI.
When I say "update", it needs to be updated as it comes out line by line, not by
the block when the loop is finished.
I was not successful doing this by both shift register or RefNum.
Maybe I do not know the advance usage these two.
So can someone show me how?
I have attached simplified version of my labview program.
Thank you in advance!!!
Solved!
Go to Solution.
Attachments:
MainSubStrIndicator.zip ‏12 KB

Hi horanyee,
use some standard shift registers to achieve your goal... They will keep the previous valu so you can ad the new line!
Message Edited by GerdW on 09-11-2009 08:43 PM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
subVI.vi ‏8 KB

Similar Messages

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • Creating a text output using XML Publisher

    Hi All,
    Recently i created a  report for my client using XMl Publisher. The Data Definition was XML and the template type was RTF and i got the output in a PDF format. All was going smoothly until the client decided at the last moment that they wanted to print this in a dot matrix printer!
    I've read some articles on XSL- Text layout templates. But i can't get my head around it (I'm Functio-Technical as opposed to Techno-Functional )
    How do i convert my RTF template to give me a text output?
    Miranga

    From what I know, you will have to create another template based on "XSL" layout or eText layout (both of them require different coding methods). The RTF can not create text outputs even in 11g. This is based on my experience so far. You can create RTF output (available by default) based on the current layout that you use for PDF and see if it can be printed in a dot matrix printer though.

  • Show indicator from subvi

    Hello
    I am very new in programming with labview. I have a problem showing property of a boolean indicator of a Subvi in a mainvi. The Subvi contains a while loop where the property of the indicater is set.
    I have attached the two files in Labview-version 8.0.
    The problem is that the property of the indicator of the main vi only changes at the seconed time. The reason for the problem is clear. The property of the indicator is set only once in the beginning and not continuous. Can somebody complete the attached vi´s with the necessary functions so that I can comprehend it. May be I can solve the problem with a global variable or a reference. I tryed a lot but my skills in programming are not so gut.
    Thank you for your help
    Attachments:
    Mainvi Indicator.vi ‏11 KB
    Subvi Indicator.vi ‏17 KB

    Thank you all for your replies
    @davidpcl : The VI´s you gave to me could help me a lot. But by using these vi´s one other problem was generated.
    I want to open thes SubVi several times by the MainVi. The problem ist the correct parameterization of especially the stop-button. With the parameterization you gave me I could not use it several times in the MainVi.
    Can somebody give me a help?
    I attached the two new fiels.
    Attachments:
    MainVI addon.vi ‏17 KB
    SubVI addon.vi ‏23 KB

  • How can i delete a UserName  from a text file using Strings or io.

    hi i m trainee
    i have been assigned to make java program which deletes a UserName and
    his Passwor from a Text File
    i m unable to do it using the code below
    plz help
    do reply
      import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java .applet.*;
    import java.io.*;
    class Del extends JFrame  implements ActionListener
         String s2;
         JTextField CWDMUserDText = new JTextField();
         JButton CWDMSecDelButton = new JButton("DELETE");
         JLabel CWDMUserLabel = new JLabel("USER NAME");
         JPasswordField CWDMPassDText = new JPasswordField();
         JLabel CWDMPassLabel = new JLabel("PASSWORD");
         //String user,pass;
         /* CONSTRUCTOR*/
              Del()
                   Container contentPane=getContentPane();
                   contentPane.setLayout(null);
                  setLocation(400,200);
                   contentPane.add(CWDMUserDText);
                   contentPane.add(CWDMSecDelButton);
                   contentPane.add(CWDMUserLabel);
                   contentPane.add(CWDMPassDText);
                   contentPane.add(CWDMPassLabel);
                  CWDMUserLabel.setBounds(20,70,100,25);
                  CWDMPassLabel.setBounds(20,100,100,25);
                   CWDMUserDText.setBounds(150,70,100,25);
                   CWDMPassDText.setBounds(150,100,100,25);
                   CWDMSecDelButton.setBounds(80,135,100,25);
                   CWDMUserDText.addActionListener(this);
                   CWDMPassDText.addActionListener(this);
                   CWDMSecDelButton.addActionListener(this);
                   contentPane.setBackground(Color.CYAN);
                   setVisible(true);
                   setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void actionPerformed(ActionEvent ae)
                  if(ae.getSource()==CWDMSecDelButton)
         //             user = CWDMUserDText.getText();
         //          pass = CWDMPassDText.getText();
         //          showarr();
                   s2 = CWDMUserDText.getText();
                   CWDMUserDText.setText("");
                   CWDMPassDText.setText("");
                   DelUser(s2);
              public static void main(String args[])
                   Del myframe1= new Del();
                   myframe1.setSize(300,200);
                   myframe1.setVisible(true);
              public void DelUser(String s)
                   //int a;
                   try
                        FileReader fr = new FileReader("file.txt");
                        BufferedReader br = new BufferedReader(fr);
                       String s1;
                       int a;
                       int len = s.length();
                       System.out.println(len);
                       //s2 = CWDMUserDText.getText();
                        while ((s1=br.readLine()) !=null)
                             if((a=s1.indexOf(s))>0 && (a=s1.indexOf(s))!=0)
                                  System.out.println(a);
                        fr.close();
                   catch(FileNotFoundException e)
                        System.out.println("exception occured");
                   catch(IOException e)
                        System.out.println("io");
         }

    Some tips:
    1) If you are adding or deleting stuff from a text file you need to write a new, modified file and then, optionally, do something like:
    rename the old file to whatever.bak or the like.
    rename the new file to the old.
    2) Don't depend on System.out so much on a GUI application. For example if you get an exception use javax.swing.JOptionPane to display an alert (and show the message from the exception). You can write the stack trace to System.out if you want.
    3) Don't muck about with calculating bounds for screen objects, let a layout manager sort it out. I like BoxLayoutManager for most things like this.
    4) For bonus points do your IO in a separate Thread. Generally you don't want anything happening in an actionPerformed method which significantly delays it's return. The method should launch a new Thread to do the job, and disable the button until the Thread finishes.

  • How can I convert output data (string?) from GPIB-read to an 1D array?

    Hello all,
    I am reading a displayed waveform from my Tektronix Oscilloscope (TDS3032) via the GPIB Read VI. The format of the waveform data is: positive integer data-point representation with the most significant byte transferred first (2 bytes per data point).
    The output data of GPIB-Read looks like a string(?) where the integer numbers and a sign like the euro-currency sign are seperated by spaces e.g. #5200004C3 4 4 4 4 3C3C3........ (C represents the euro-currency sign).
    How can I convert this waveform data into a 1D/2D array of real double floatingpoint numbers (DBL) so I can handle the waveform data for data-analysis?
    It would be very nice if someone know the solution for this.
    t
    hanks

    Hi,
    First of all, I'm assuming you are using LabVIEW.
    The first you need to do is parse the string returned by the instrument. In this case you need to search for the known symbols in the string (like the euro sign) and chop the string to get the numeric strings. Here are some examples on parsing from www.ni.com:
    Keyword Search: parsing
    Once you parse the numeric strings you can use the "String/number conversion VIs" in the String pallette.
    Hope this helps.
    DiegoF.Message Edited by Molly K on 02-18-2005 11:01 PM

  • Update Indicator from SubVi in Main Vi

    Hi, I am new to labview and have recently undertood the concept of Control Refnum. Because all the examples online are related to passing controls to the subvi and triggerign an event there, I am able to do it and it works. I am here because I could not find any example where indicator values are passed back to the Main Vi. I have attached my two Vis and will appreciate if someone could help me understand and apply this concept.
    I am just pressing a button in Main Vi and want the LED and number indicator in my main vi to update from the sub Vi. Currently it only updates in Sub Vi.
    Thanks
    Attachments:
    Actual.vi ‏8 KB
    A_TRAILER.vi ‏18 KB

    lsbu wrote:
    I will have nearly 8-10 events in my final program and I find it easier to shift them to sub vi.
    That's very few events.  Did you not know the event structure can handle many events?  At that point, it is as hard to manage as a single case structure (which is dirt easy).  Trust me.  It will be a lot easier to manage a single event structure than trying to follow your references everywhere just to try to figure out who is handling what event.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Limiting text output using CFM

    I have a news website in which I want to display about three
    lines of each entry whiles the rest of the story is read on a
    detail page. Can somebody help me out with the code that will
    automatically cut off text display and give way to a 'more' link?
    Thanks.

    That part does not go into the query, but is put onto the
    page and it is
    what the enduser see's. What the code is saying is show 255
    characters from
    the left.......of what the query brings back. If you increase
    the number 255
    then of course it will bring back that much more info....if
    you decrease it
    will do the opposite.
    "chrisdonkor" <[email protected]> wrote in
    message
    news:eoa6d6$h3r$[email protected]..
    > Hello c_wigginton, thanks for your reply. However, I
    have still not been
    > able
    > to get it to work. This is my <cfoutput> query
    >
    > <CFOUTPUT query="Comments" maxrows=10>
    > <a
    >
    href="cad_cn_detail.cfm?tblNewsCatID=#tblNewsCatID&tblNewsID=#tblNewsID#"
    > class="menu04">#cComment#</a>
    > </CFOUTPUT>
    >
    > where in the above query do I place -
    #left(qry.article,255)#
    > Thanks for your help.
    >

  • Positioning string indicator scrollbar using a control reference?

    How can I control the position of the scrollbar of a string indicator from within a subVI?

    Pass a ref of the indicator to the sub-VI and then use property node where you have selected;
    Text.ScrollPosition
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • RTF OR Text Output

    Hi All,
    We are migrating from 11.5.10 to R12. We have check printing customize program. In this program we are priting text output using Concurrent progam which is based on Oracle report writer. Concurrent program output is Text.
    Now I want to migrate this to R12, I was searching everywhere to find sample program which generates TEXT output similar to RTF template provided by Oracle IBYDC_STD1.rtf.
    Please tell me how to proceed further.
    Thanks

    Not sure for a pre-printed stationary, you need the concurrent program output to be in Text format. Ideally, you can design you check in a RTF/PDF format. Additonally, you can look into following files.
    IBYDC_LSR.rtf
    PAYUSCHKWVXML_en.rtf
    APCHECKPYMTSUP.rtf
    Cheers,
    ND

  • How can I export formatted text from a string indicator?

    Does someone know how I can export formatted text (i.e., parts of the text have different formatting, such as color, fontsize, etc.) from a string indicator? Using copy/paste does not work, as it only exports unformatted plain text.

    Hello Sparti,
        Thank you for your suggestions, they are all very useful, and I plan to use the HTML feature under Report Generation to export the formatted text from Labview. However, I am still not sure how I can extract the formatted text from a *string indicator* and transfer it to one of those VIs, so that it can be exported to other applications. Let me give some more specific info on what I am trying to achieve:  I am monitoring the communication between two pieces of equipment. A string indicator shows all the data flow, with different colors for data coming from different instruments. I managed to do that by using a property node and playing with the selection and font color properties. Now, if you just wire the output of the string indicator, the formatting is gone and all you get is just plain black text (for instance, try to programmatically transfer the formatted text from one string indicator to a different string indicator and you will see that the formatting is not preserved). Even if you try the "brute force" method of manually selecting and copying the text in the indicator and pasting it to Word, LV does not export the formatting. But, if you paste *within*  LV (for example, paste it to a string constant in your diagram), then it works. To extract the formatted string from the indicator, I also tried to use a property node, but without success. I am trying to avoid duplicating part of my code to generate the same color-coding scheme on a report. It would be way easier to be able to transfer the formatted text from the string indicator. This is particularly annoying, because the information is there, stored in the data structure associated with the string indicator. But how can I put my hands on it? Any ideas?

  • Using same string indicator in different stacked sequences

    Hi guys, I want to use the same string indicator in different stacked sequences. I tried to wire the output of every string constant through the sequence to my string indicator outside the sequence block but then I get an 'Wire connected to an undirected tunnel' error. What is the best way to use the same indicator for all the sequences?
    Solved!
    Go to Solution.

    GerdW wrote:
    GerdW wrote:
    @TiTou:
    Problems with copy&paste?
    not even :-o
    GerdW wrote:
    @TiTou:
    Problems with copy&paste?
    not even :-o
    see : http://forums.ni.com/t5/Feedback-on-NI-Discussion-Forums/Text-lines-and-images-get-duplicated-when-I...
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • How to retrieve IndividualStrings from a txt file using String Tokenizer.

    hello can any one help me to retrieve the individual strings from a txt file using string tokenizer or some thing like that.
    the data in my txt file looks like this way.
    Data1;
    abc; cder; efu; frg;
    abc1; cder2; efu3; frg4;
    Data2
    sdfabc; sdfcder; hvhefu; fgfrg;
    uhfhabc; gffjcder; yugefu; hhfufrg;
    Data3
    val1; val2; val3; val4; val5; val6;
    val1; val2; val3; val4; val5; val6;
    val1; val2; val3; val4; val5; val6;
    val1; val2; val3; val4; val5; val6;
    i need to read the data as an individual strings and i need to pass those values to diffarent labels,the dat in Data3 i have to read those values and add to an table datamodel as 6 columns and rows depends on the data.
    i try to retrieve data using buffered reader and inputstream reader,but only the way i am retrieving data as an big string of entire line ,i tried with stringtokenizer but some how i was failed to retrive the data in a way i want,any help would be appreciated.
    Regards,

    Hmmm... looks like the file format isn't even very consistent... why the semicolon after Data1 but not after Data2 or Data3??
    Your algorithm is reading character-by-character, and most of the time it's easier to let a StringTokenizer or StreamTokenizer do the work of lexical analysis and let you focus on the parsing.
    I am also going to assume your format is very rigid. E.g. section Data1 will ALWAYS come before section Data2, which will come before section Data3, etc... and you might even make the assumption there can never be a Data4, 5, 6, etc... (this is why its nice to have some exact specification, like a grammar, so you know exactly what is and is not allowed.) I will also assume that the section names will always be the same, namely "DataX" where X is a decimal digit.
    I tend to like to use StreamTokenizer for this sort of thing, but the additional power and flexibility it gives comes at the price of a steeper learning curve (and it's a little buggy too). So I will ignore this class and focus on StringTokenizer.
    I would suggest something like this general framework:
    //make a BufferedReader up here...
    do
      String line = myBufferedReader.readLine();
      if (line!=null && line.trim().length()>0)
        line = line.trim();
        //do some processing on the line
    while (line!=null);So what processing to do inside the if statement?
    Well, you can recognize the DataX lines easily enough - just do something like a line.startsWith("Data") and check that the last char is a digit... you can even ignore the digit if you know the sections come in a certain order (simplifying assumptions can simplify the code).
    Once you figure out which section you're in, you can parse the succeeding lines appropriately. You might instantiate a StringTokenizer, i.e. StringTokenizer strtok = new StringTokenizer(line, ";, "); and then read out the tokens into some Collection, based on the section #. E.g.
    strtok = new StringTokenizer(line, ";, ");
    if (sectionNo==0)
      //read the tokens into the Labels1 collection
    else if (sectionNo==1)
      //read the tokens into the Labels2 collection
    else //sectionNo must be 2
      //create a new line in your table model and populate it with the token values...
    }I don't think the delimiters are necessary if you are using end-of-line's as delimiters (which is implicit in the fact that you are reading the text out line-by-line). So the original file format you listed looks fine (except you might want to get rid of that rogue semicolon).
    Good luck.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to read some lines from a text file using java.

    hi,
    i m new to java and i want to read some lines from a text file based on some string occurrence in the file. This file to be read in steps.
    we only want to read the file upto the first Occurrence of "TEXT" string.
    How to do it ,,,
    Kinldy give the code
    Regards,
    Sagar
    this is the text file
    dfgjdjj
    sfjhjkd
    ghjkdg
    hjkdgh TEXT
    ikeyt
    ujt
    jk
    tyk TEXT
    rukl
    r

    Hendawy wrote:
    Since the word "TEXT" is formed of 4 letters, you would read the text file 4 bytes by four bytes. Wrong on two counts. First, the file may not be encoded 1 byte per character. It could be utf-16 in which case it would be two byte per character. Second, even if it were 1 byte per character, the string "Text" may not start on a 4 byte boundary.
    Consider a FileInputStream object "fis" that points to your text file. use fis.read(byte[] array, int offset, int len) to read every four bytes. Convert the "TEXT" String into a byte array "TEXT".getBytes(), and yous the Arrays class to compare the equality of the read bytes with your "TEXT".getBytes()Wrong since it relies on my second point and will fail when fis.read(byte[] array, int offset, int len) does not read 4 bytes (as is no guaranteed to). Check the Javadoc. Also, the file may not be encoded with the default character encoding.
    The problem is easily solved by reading a line at a time using a BufferedReader wrapping an InputStreamReader wrapping a FileInputStream and specifying the correct character encoding.
    Edited by: sabre150 on Apr 29, 2009 2:13 PM

Maybe you are looking for

  • Internet sharing via dongle, how to set password for wifi network created?

    I am using a USB dongle with my Mac book Pro to share internet through AirPort, so that i can access my mac book's wifi from my iphone. This works great, but it is an open network and I woud like to set up a password. If anyone can point me in the di

  • Hi. Please give me info.

    Good evening, first of all thank you for your help. I am writing to obtain information about a BB curve 8900. Currently, the operating system is v4.6.1.109. Desktop software tells me that the update is available to  5.0 1004. I need to know if upgrad

  • Connecting to Accessories

    I have a 3rd party connection in my car that allows me to play my iPod through the car stereo. With my old 5th generation, I was able to make selections right from the iPod when it was connected to the system through the dock connector. When my iPod

  • Safari's Extensions Installation Problem

    I'd like to install some extensions to Safari however I can not make it happen. Always I get this message, "An error occurred while installing the extension "..."". I use Safari 6.0.3. How can I fix this problem. Thanks.

  • Opportunity Status

    Hi, I created a new opportunity type, and maintained a new status profile for it. I have assigned 'No reason necessary' to the subject profile in order to inactivate this field, but when creating a new opportunity, the status field is greyed out and