Help:write data

I have a problem creating a Vi.i need to write the data and show it on the front panel,but when another data come in it keep overwritting my previous data.help pls..

If you want the updated value fron the string control to be written to the file, the string terminal needs to be inside the while loop.
Right now it will get read only once, before the loop starts. (Use execution highlighting to see how dataflow works).
Message Edited by altenbach on 09-18-2007 11:43 PM
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Urgent!!! Need help in file read/write data to a serial port

    Hi,
    I really need someone's help in order for me to complete my project. I have attached a vi which I have taken from an example and integrate to my project. In the vi, I have managed to get the encoder counts using Ni 9411. I need to read/write that data from ni9411 to ni9870 without using any serial port as they are connected to a NI 9104 chasis. May I know whether I am correct in writing the data to my ni9870 port using the vi I have attached? Does anyone know how i can convert the number of counts to a 8-bit data/byte so that I can send the data through the RS232 port? I really need someone's help as I need to finished in 2 weeks time.
    I have also attached an vi on controlling the epos2 controller using instrument driver. Does anyone know how can i integrate this vi to the fpga vi (the one which I need to read/write data to 9870) as I need to send those data to control my epos2 controller.
    Please help me!!!
    Attachments:
    Encoder Position & Velocity (FPGA).vi ‏23 KB
    SINGLEMOTORMODIFIED.vi ‏17 KB

    Afai,
    As I allready suggested you here, call your local NI Office and ask for assistance!
    You really need assistence in a higher level that we can provide via the forums. Otherwise I don't see a chance for you to finish your project in time.
    1. Convert I32 to U8 to write it to the 9870 could be done like this:
    2. The vi to control the epos2.
    There is NO way ( absolutely NO way) to port this vi to FPGA. It's based on VISA calls, uses an event-structure, both are not available at the FPGA.
    The only thing you could do is to analyze the VI, the instruction set and design an FPGA vi which handles the specific instructions you would need.
    I have no experience with epos2 and I'm not 100% sure if this would work as you would like to use it. And doing this needs deep knowledge of LabVIEW, VISA, Instrument Drivers, the epos hardware, FPGA programming, and so on... 
    Christian

  • Write Data storage VI performanc​e issue

    I have a program that logs data from mulitple channels.  It waits for 500 points from each channel, then saves the data (as a raw 2D DBL array) to file, wait for another 500 points, saves and so on.  At the end, I have a raw file.  I created a utility VI that would take the raw file and converts it to a tdm file so I can read it in Diadem.  The utility VI has a for loop.  In each iteration, the loop reads one data segment (the 500-point 2D array), converts the channel data to waveforms and then writes/appends to a tdm file using the Write Data (Channel) storage VI.  The VI works fine for small files.  But as the file gets larger, the conversion time seems to increase exponentially.  Eventually grinding to a halt.
    I noticed that each iteration of the for loop seems to take longer and longer.  So I suspect the Write Data VI may not be simply appending to the existing channel data.  But instead, each time it's probably reading back the waveform data already saved, recombine them with the new data and then rewrite the entire file.  This is just a guess.
    Anyway, I really need some help resolving the performance issue.  Any response will be appreciated.  The conversion VI is attached.
    S.
    LabView 8.0
    Message Edited by Seaman008 on 06-01-2007 01:50 PM
    Attachments:
    Convert2.vi ‏184 KB

    Here are two profile captures.  Each capture start at the first entry into the inner-most for loop and stop when it exited the loop.  Profile2.txt was captured when processing a RAW input file twice the size as in Profile.txt.  I'm not familiar with the VIs listed, but it shows that lot of time was spent in _saveDdtAttributes.vi and _saveDDT.vi. 
    Attachments:
    profile.txt ‏131 KB
    profile2.txt ‏132 KB

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • Read multiple files and write data on a single  file in java

    Hello,
    I am facing difficulty that I want to read multiple files in java and write their data to a single file. Means Write data in one file from multiple files in java
    Please help me out.
    Naveed.

    algorithm should be something like:
    File uniqueFile = new File();
    for (File f : manyFilesToRead)
       while (readingF)
           write(dataFromF, intoUniqueFile);

  • USB 2.0 Mass Storage Device mounting issues and cannot write data on it

    I have a 250 GB external Simpletech Hard Drive (with a USB 2.0 interface). It works flawlessly in a Windows XP environment (strange!!). But when I connect it to my iMac thru the USB port 2 things happen:
    1. Sometimes it mounts, sometimes it does not. It's just capricious. If I boot the system with the USB device attached it mounts. If I connect it "hot", sometimes it does, sometimes it doesn't. Sometimes it does not appear as mounted...I disconect the device and the Mac gets angry.
    2. I can read all the data on the disk, but I can't write any. That is, I cannot use it for backing up any iMac data. The backup utility won't recognize the device either.
    I've seen people going thru the mounting issue (not sure if there is a solution), but I am puzzled about the inability to write data on the hard drive. I am wondering if this is due to a formatting incopatibility? Any hints??
    iMac   Mac OS X (10.4.10)   2.33 GHz, 2GB, 750 GB

    For both the Mac and a Windows PC, format it as 'MS-DOS'.
    Both platforms can read/write to it. A Windows PC is not capable of reading/writing to a Mac formatted (HFS, HFS+) disk without additional software.
    MacFixit has been covering some apparent USB issues which may or may not help you. http://www.macfixit.com/
    I'm still at a loss. I have yet to experience or reproduce the USB issues that a number of users seem to be having. Now that I have sufficient free time, I may look into it.

  • Write data to multiple text files after specific size

    Hello,
    I wrote a code that contineously writes data to  a text file. The problem is I am running this VI for long time and therefore this text file is being bigger in size e.g. more than 10MB. I want to split writing data in this text file after max 1MB size. Can anyone help ????
    thanks in advance.

    CMW.. wrote:
    You could use the "File/Directory Info Function" in the Advanced File VIs and Function palette to check the size. If the file is too big. close it and create a new one.
    I would use the Get File Position since this won't cause Windows to have to do so much.  Assuming you are just writing and not setting the file position manually, this will return the size of the file in bytes (file position will always be at the end of the file).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to write data in the Infocube using BI IP input ready functionality

    Hi All,
    Please help me in the following scenario...
    Input given to me is-- ZCUBSDID cube with associated role ZSP_BW_SAI_BUDGETS-DID_ALL.
    Query is ZR_V7_CO_PA_CH_PB_DID_BUDGET_2 based on agregation level ZALBSDID (& ZALBVDID) in infoarea ZDACOPA.
    I have to write data in the cube by using Input-Ready functionality of BI IP. Can you please provide me step by step procedure for writing the data in the cube as i am very new in IP side.
    Also if any further input required just let me know.
    My Analysis-> I checked that cube is in Planning mode and in Query Designer>Property Pane-->Planning Pane, Query is in Change mode and also associated Keyfigures are in Input-Ready enabled.
    Also i am able to access query in Analyzer.
    This is very critical for me and need to provide solution asap. Please update asap. It really be great help.
    Thanks & Regards
    Rupali Singh

    Hi,
      To enter data in to planning cube through manual planning, you can do the following,
    1. In a query that is used for manual planning, a cell is only input ready if each characteristic value of all the characteristics included in the aggregation level is unique. None of the aggregated values on the aggregation level are therefore input ready: Totals, subtotals and inner hierarchy nodes are not input ready.
    2. To be able to change values for calculated key figures (like Average Price as a quotient of Amount and Quantity), these must be based on input-ready formulas, and at least one operand must be input ready. More information: Defining Inverse Formulas (Designtime) and Inverse Formulas (Runtime).
    3. In order to change aggregated values (with respect to the aggregation level), these values must be disaggregated on all the data records that contribute to the aggregated value of the cell. More information: Disaggregation (Top-Down-Distribution).
    4. If a query used for manual planning includes a navigation attribute that is restricted using a fixed or dynamic filter or a restricted key figure, the system treats the navigation attribute as a normal characteristic. The rule under point 1 applies here. The system only reacts as though the navigation attribute were not part of the query if the navigation attribute is not restricted.
    5. In a query defined on a MultiProvider or a complex aggregation level that you want to use manual planning for, a cell is not input ready if the InfoProvider that is defined by this cell is:
                                a.      Not a real-time InfoCube
                                b.      A real-time InfoCube that has been switched to load mode
    6. If an input-ready query is executed in change mode, but the requested data is locked by another user, the query starts in display mode.
    For more details, you can refer to the following link,
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    Hope this helps you to solve your issue.
    Regards,
    Balajee

  • Write data to serial port every two minutes

    Hi,
       I use VISA-Write to write data to serial port. I want to write a byte every two minutes. What should I do?
      Thanks!

    hengfo,
    that question is not connected to LV nor to VISA. Its more a systematic question....
    So let's view at this a bit more abstract:
    You want to "toogle" between two different messages sent to your interface. So you have to know:
    - What was the last state i sent?
    - When do i have top send the new state?
    Even more abstract:
    - How can i switch between the states?
    Since the states are known before your program is executed, you can insert them into an array. Next, you have to read out the appropriate index from the array which contains your new state. Send the state and go to the next state. Propably you want to change timing, but that's easy too.
    See attached screenshot for a possible solution:
    hope this helps,
    NorbertMessage Edited by Norbert B on 09-11-2007 07:57 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    StateSwitching.PNG ‏8 KB

  • How long does it take to write data from network analyzer

    I am using LabVIEW to control two DC power supplies through GPIB-USB and I have a DAQ-6008 generating 8-bit digital output. I am connecting two DC power supplies and the 8-bit digital signal to my circuit and want to measure s parameters (all S11, S12, S21, S22) and write their magnitude and phase to a .txt file in my laptop. It worked but took about 1.5 minutes to write data (magnitude and phase of four s parameters) for a fixed DAQ output and fixed DC voltage by only sweeping 6 points. Is it a reasonable time? Because eventually I will have more than ten thousand combinations and need to record s parameters for all these combinations and it will take too long. I would like to know which part spends more time or how I can reduce the time to write four s parameters. Thanks a lot.
    Attachments:
    Agilent E3631 Output 2 DC Volts_for loop.vi ‏22 KB
    Agilent PNA Series Config And Read Data_test(4).vi ‏32 KB
    Main(2).vi ‏30 KB

    Hello yll,
    -So you mean I should delete some of the controls
    in the front panel  and make them a fixed value or default in the block
    diagram to reduce the front panel controls
    What Dennis is saying is that your front panel controls are only read once by your program.  The are read at the beginning and the value is passed into the while loop.  This is the value that will be used, even if you change the front panel.  You can verify this by using highlight execution. 
    -What does it mean that I am
    resetting the instrument each time?
    Everytime you call the initialize VI, you send a command for the instrument to reset.  This is not necessary, since you want your settings to remain for the entire program.  You can reset it when you "first" start using it, but as your program keeps going, you do not need to reset it.
    -Do I need the initialize VI and
    close VI in every iteration or I should have them out of the loops so
    all the instrument are initialized and closed only once throughout the
    entire process?
    That is exactly what you should do.
    -For the network analyzer, when you said I only need the
    VIs from initialize.vi to read data.vi (the second one from the end),
    do you mean that I can delete the close.vi? and why does it make the
    program faster?
    You should probably add the close outside the loop, as good practise.  I would still put the initialize outside the loop.
    I hope this helps.
    O. Proulx
    National Instruments
    www.ni.com/support

  • Using Swing applet to write data to file on SERVER

    Hello,
    I'm in the process of writing an applet using Swing (SDK v1.4.2). Here's the deal. The JApplet calls a JPanel, which will be used by customers on my site to enter data. I'm adding a <Save> button to the "form" which is supposed to write data to a file on the server (in order to preserve the customer's preferences).
    Please note that I am NOT attempting to write data to the customer's hard disk. That requires digital certificates, etc. which I am trying to avoid for now.
    Instead, I am using the URL class to access the file:
    URL page = new URL("http://www.whatever.com/mycustomers/preferences.txt")
    I then use the URLConnection class to establish the connection:
    URLConnection conn = this.page.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.connect();
    etc...
    I've created a text file (preferences.txt) on my web site. Using the classes InputStreamReader, BufferedStreamReader, and StringBuffer, I can successfully read the file into a JOptionPane in my applet.
    The problem comes when I try to write data TO this file. I know the file exists because the applet can read it. I've set the permissions on the file to 666. I've got all of the appropriate syntax within a try statment that catches an IOException. I also have JOptionPanes all over the place to let me know where the program is. I've tried different combinations of output streams like BufferedWriter, BufferedOutputStream, StringWriter, but the file does not get updated. When the applet runs, it does not throw any exceptions, not even when I change the URL from "HTTP://www.whatever.com/prefs.txt" to "HTTP:/www.whatever.com/prefs.txt" (only one slash on HTTP, shouldn't I get a MalformedURLException?)
    I apologize for all the background, but I thought you might need it. The bottom line is:
    1) Can an applet write to a file on a remote server (not local hard disk)?
    2) If so, what (if any) caveats are there?
    3) Is there a way to check for file existence or be able to create a new file?
    4) I'm using the HTTP protocol - is there some restriction that prevents an applet from writing to a file using that protocol? If so, is there a workaround?
    5) Assuming that creating/writing a file using the method I've described is possible, what would be the appropriate output streams to use? (Currently, I'm using OutputStreamWriter with BufferedWriter).
    I've been struggling with this for a while. Any help/suggestions would be appreciated.
    Thanks
    P.S. I also posted this message on the Applet development forum, but I've received no response as of yet.

    Http servers support PUT as a mechanism to upload data to a specified URL. Get on the other hand which is what most people are familiar with is how you retrieve that data. The basic URLConnection is an abstraction of the Http connection which can be used for GET and POST operations by default based on doInput(true|false).. If you which to use any of the http methods other than GET|POST you will have to cast the URLConnection to HttpURLConnection so you can gain access to the specific Http functionaility that could not be abstracted.
    Since you are using a hosting service the chances are that you won't be able to use HTTP PUT on their server. Most servers do not support HTTP PUT without configuring them todo so. Now Apache allows localized config through the .htacess file. It might be possible (keep in mind I am not an apache expert) to configure a particular directory to allow HTTP PUT using this .htacess file it may not be possible. You will have to consult the Apache web server documentation for that answer.
    But regardless you can use the HttpURLConnection and the PUT method to send data from your applet to the server. In fact that is the preferred way to do this. If you can not configure your web server to support that method then you will have to develop a Servlet to do it. A servlet has several methods such as doGet(), doPost(), and doPut(). You would override the doPut() method get the URI path create a file and a FileOutputStream to that file, get from the request the inputstream, possibly skip the http headers, and then write byte for byte the incoming data to your OutputStream until you reach the end at which point you would close the OutputStream and send an Http Response of some sort. Typically in HTTP it would be 200 OK plus some web content. You content can be empty so long as your applet recognizes that is what it should expect...
    And away you go...

  • Trying to write data to a text file using java.io.File

    I am trying to create a text file and write data to it by using java.io.File and . I am using JDeveloper 10.1.3.2.0. When I try run the program I get a java.lang.NullPointerException error. Here is the snippet of code that I believe is calling the class that's causing the problem:
    String fpath = "/test.html";
    FileOutputStream out = new FileOutputStream(fpath);
    PrintStream pout = new PrintStream(out);
    Do I need to add additional locations for source files or am I doing something wrong? Any suggestions would be appreciated.
    Thank you.

    Hi dhartle,
    May be that can help:
    * Class assuming handling logs and connections to the Oracle database
    * @author Fabre tristan
    * @version 1.0 03/12/07
    public class Log {
        private String fileName;
         * Constructor for the log
        public Log(String name) {
            fileName = name;
         * Write a new line into a log from the line passed as parameter and the system date
         * @param   line    The line to write into the log
        public void lineWriter(String line) {
            try {
                FileWriter f = new FileWriter(fileName, true);
                BufferedWriter bf = new BufferedWriter(f);
                Calendar c = Calendar.getInstance();
                Date now = c.getTime();
                String dateLog =
                    DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM,
                                                   Locale.FRANCE).format(now);
                bf.write("[" + dateLog + "] :" + line);
                bf.newLine();
                bf.close();
            } catch (IOException e) {
                System.out.println(e.getMessage());
         * Write a new line into a log from the line passed as parameter,
         * an header and the system date
         * @param   header  The header to write into the log
         * @param   info    The line to write into the log
        public void lineWriter(String header, String info) {
            lineWriter(header + " > " + info);
         * Write a new long number as line into a log from the line 
         * passed as parameter, an header and the system date
         * @param   header  The header to write into the log
         * @param   info    The line to write into the log
        public void lineWriter(String header, Long info) {
            lineWriter(header + " > " + info);
         * Enable to create folders needed to correspond with the path proposed
         * @param   location    The path into which writing the log
         * @param   name        The name for the new log
         * @return  Log         Return a new log corresponding to the proposed location
        public static Log myLogCreation(String location, String name) {
            boolean exists = (new File(location)).exists();
            if (!exists) {
                (new File(location)).mkdirs();
            Log myLog = new Log(location + name);
            return myLog;
         * Enable to create the connection to the DB
         * @return  Connection  Return a new connection to the Oracle database
        public static Connection oracleConnectionCreation() throws Exception {
            // Register the Oracle JDBC driver
            DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
            //connecting to the DB
            Connection conn =
                DriverManager.getConnection("jdbc:oracle:thin:@myComputerIP:1521:myDB","user", "password");
            return conn;
         * This main is used for testing purposes
        public static void main(String[] args) {
            Log myLog =
                Log.myLogCreation("c:/Migration Logs/", "Test_LinksToMethod.log");
            String directory = "E:\\Blob\\Enalapril_LC-MS%MS_MS%MS_Solid Phase Extraction_Plasma_Enalaprilat_ERROR_BLOB_test";
            myLog.lineWriter(directory);
            System.out.println(directory);
    [pre]
    This class contained some other functions i've deleted, but i think it still works.
    That enables to create a log (.txt file) that you can fill line by line.
    Each line start by the current system date. This class was used in swing application, but could work in a web app.
    Regards,
    Tif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do i write data in a new row to Spreadsheet

    Hello,
    I have to write data an a existing file but i don't want to write under the existing data but i need to write the new data
    in a new row. I have 2 loop. The first loop aquired data and the second repete the processus. When the first loop is activate i can
    write the data but  what i need is when the second loop repete the processus i want to write the new data in a new row.
    Somebody Can help me?????

    Thanks for reply,
    I used Write to Spreadsheet File in a file.txt. The first loop do  a simple algorithm and each time it's run I have to stock the data in a file and all data aquired it's for one profil . If i want to simulate 3 profil I increment the second loop .I need to stock each profile in a different row
    Attachments:
    simulation.vi ‏18 KB

  • Write data to GrossBuyPr in document lines

    Hi all
    Is there any good workaround to write data to the field "GrossBuyPr" in document lines, according to the circumstance that this field isn't accessible trough the DI API?
    Best Regards, Adrian

    Hi Adrian,
    If it is not exposed to the DI API (which you are right, it seems not to be) then the only way I can think of doing it programatically is by using the UI to set the value in the field in the document in Business One - however, this requires the client to be open and for the document to be added through the GUI and not DI.
    As direct update queries are not supported, I'm afraid I can't think of another way to achieve this.
    Sorry I can't be more helpful,
    Regards,
    Niall

  • Write data to excel template

    Dear all,
    I would like to write data to excel template using POI. What can I do? Please help me. Thank a lot!
    Regards,
    kzyo

    Today's mantra is: "google is our friend"
    Repeat that to yourself several times as you exhale slowly. Through mediation, a solution to your problem will come to you.

Maybe you are looking for

  • Looking for a APP

    I saw a TV commercial tonight where someone traveling in Italy says "My father (dad) grew up in this town" And the iPhone says the sentence in Italian to senior citizen in the town. Looking for an APP where I speak the sentence and the iPhone then tr

  • Apple id is not work

    Hello. I have restored my iphone, when i try to log in with my apple ID it doesn't work. If I log in to iCloud on my computer it doesn't find my phone. Please help me!

  • Macbook freezes with newest iTunes update

    I have Macbook from late 2007 OS 10.5.8, and when I downloaded the newest update for iTunes 10.5.2, it installed succesfully. However, when I opened iTunes after the prompt of successful installation, it gives me an "Updating Library" load window. Af

  • Typing IPA font into Word document

    Is anyone familiar with some convenient way of typing the IPA (International Phonetic Alphabet) font in a Word document. Word doesn't even recognize the IPA font I have installed. The only thing I have been successful with is painfully inserting the

  • Import a GarageBand zip file

    On iPad Safari I downloaded a GarageBand project zip. How do I import it into GarageBand? Thanks.