How to record data using a while loop?

Hello

I created a .vi I try to use to record several channels of data. I have implemented the user must be able to record data until the "STOP" button is pressed, then the data is saved in a spreadsheet file.

Question No. 1: How to allow the user to store an indefinite amount of data?

If you run the .vi as is, you will see that you are only able to collect 100 points, and registration takes place during Ms. I want to collect about 5 minutes worth of data and have a sampling frequency of 1 kHz.                 Any suggestions?

Question 2: How can I change the worksheet file extension? Let's say I want than to save it as a .csv file?

Thanks in advance for any pointers or suggestions!

I have not looked at your code, but only based on your description I would implement a producer/consumer to save your data.  You must acquire your data in a loop (the producer) and send to your loop of logging (the consumer) using a queue.  Yes, you must save the data, then that is acquired.  In this way, you do not have to worry about storage who knows how much data in RAM.  It's just the disk as soon as he can.

You can save the file with whatever the desired extension.  If you want it to be a CSV file, then do the extension a .csv.

Tags: NI Software

Similar Questions

  • storage of the data output of while loop

    Hello

    I have a data acquisition system set up to read the couple of a transducer. The output needs to be fed with an excel document, once the program stops running, or when a key is pressed.

    with the current code attached, the excel document is created, but it only shows the most recent series of data. How to make the table to store all the data coming from while loop?

    Ive only been programming with labview for two weeks, so chances are that it is something simple, but please help us in any case.

    JM

    To get what you expect, the Terminal output of table a while loop right click and select the option activate Indexing. Usually if you want to save data use queue to pass data inside the while loop to another loop/VI and perform data recording. For all that you have examples, please do a searc in LabVIEW help > find examples.

  • Sharing data between multiple while loops, competitor rates

    Hello

    I am trying to Exchange data between competitor while loops running at different speeds.  What is the recommended way to do this?    In practice, I have 12 indicators and 3 cards I would update (on screen) in the slower loop, although the data acquired and stored on disk in the fastest loop.  The image below is a simplified version of what really works my candidacy.

    I currently use local variables and shared to achieve this.  I heard however that local variables are evil because of their use of memory (data are copied instead of who passed by reference).

    Thanks for your suggestions,

    Adam

    Hi Adam,.

    Yes, here you go.

    Mike

  • How to get out of a while loop?

    How can I get out a while loop?

    I'm new to Labview and I tried to make my first Labview program.

    I took an old example, a sieve to primes. The old Erasthotenes sieve.

    Similar to (Visual Basic example):

    While (l<= k)="" and="" teiler=""><=>

    Teiler = TeilerArray (l)

    Hans,

    What you linked is for the loop FOR, that I had attached is for the WHILE loop.

    Only the type of the loop is different, but the concept or the logic is the same for both.

  • How to control the rate of acquiring data in a while loop

    I'm trying to use a digital trigger to collect data on the rising and falling edge. The design is displayed as below. Now, I save the measured voltage 1 & 2 to the local variable in the while loop. Hoever, the while loop runs at a frequency of more compared to the structure of the case triggered. So I had a lot of repetitive data.  If I record data directly from structure of the case, it will be recorded as data-0-date-0 because of the ongoing case of fake wire.

    I wonder how to revise to save the measured voltage 1 & 2 at the same frequency of up/down edge triggered? Thank you! I have also attached my current version of Labview program, which takes place in time real Labview 2013.

    Mcdullna wrote:

    Thank you for the answer. Could you be more specific about the use of the shift register?

    The case of false just past the value through.  With this configuration, you agree that the data remain in the son, avoiding race conditions.  It is also more effective than the use of local variables.

  • How to upgrade data using load data page?

    Hi all

    im doing a migration page where my user will provide the csv file, so I could load into my table. problem is that loading data using apex collection so I know columns are limited, but I forgot how. (probably 40 something).

    So I decided to split the csv file with the two files with a common column, which is a key. If im guessing two files can be linked using this key. However when I upload the second file, he will still do an insert instead of update action. How updated? is this what I need to set or activate?

    just to check that I tried to download the csv... and then changed some content inside and re upload... even if I that.it always inserts instead of update. Can anyone share how can I update? It's really important because I have a lot of columns to download. so in my situation, the best way is to separate files.

    Help, please...

    In components, under the loading of data shared. On the model of your table, you specify the unique columns (up to 3). I believe that if there is no match, it will insert. If it finds a matching record, it will update. So if you have a single column that is in each worksheet, you must specify here

  • A result of sending the data to a while loop through another loop of TCP communication

    Hi all

    I have 2 screws

    1 matching model (using the method of Grab) which is put inside a while loop. This VI works correctly and returns a string in a specific format (position and the angle of the object).

    2 TCP server who always listens to a specific port, if it receives a correct command string, it sends the string above VI - 1 (position and angle).

    The two 2 screws works if they are in separate VI. But I want to combine them into 1 single VI and I get the problem: Pattern matching doesn't work anymore (the video has only first frame then stops).

    I tried to put the two while loop in parallel or put the TCP while loop inside while loop Pattern Matching. Nothing has worked.

    Pls see my attached VI and the TCP module.

    What is the solution for requirement?

    Thank you all!

    What I would do, is be your two screws at the same time.  Given that you do not send the last result, store the result in a global variable.  Your comparison models written VI the global variable of the results of each iteration of the loop and the TCP bed module global variable results when it receives the right to order and then send it.

  • How to record data every second and present them in a table

    I got a set of data of an instrument and the acquired data to an AI, and I want to compare them in a table.

    Position of time (from AI) frequency (from Instrument) value of Q (of the Instrument)

    0.00

    0.10

    0.20

    0.30

    In the future, I want the table excellent export file.

    Could someone help me with it?

    No, you don't understand. If you have a flag outside the while loop, it will be not updated before the end of the loop. It must also ensure that the data type is correct when you move outside of the loop and I don't think that you did exactly what meant Dominic. I suspect that you wired out of 2D data, and that would be a mistake.

    Below is a simple shift register to create the data for the table.

    You should also check the free LabVIEW tutorials.

  • How to pause and resume a while loop with a button

    Hi all!

    I'm back in LabVIEW, after only a few years and I cannot understand, what at first sight seems to be a simple problem!

    All I want to do is have a while loop in which, for the purposes of illustration, I have the 'random number from 0-1' function on the inside, and I want to be able to pause and resume this help from a button. There are a few other posts on the forum that are very similar and do use "event structures. The problem I encounter is that I can get the genarator random number to start the generation but the break will not stop this!

    I have the feeling that I made a stupid mistake - but I can't understand or google my way out the problem! I enclose my solution so far!

    See you soon!

    I did an example (you can drag and drop the image into a labview diagram > = 2014)

    hope this helps (I just did 2 excerpts, it's the same program)

  • How to extract data using bluetooth other device...

    Hi all

    First, I describe my problem:

    I want an application that extract the xml data in ECG device using bluetooth after accessing this data make some calculation and send it to the server... I am able to serach all the device compatible bluetooth after that, I am also able to connect from the particular device... (Now I use bluetooth Simple device as phone, pc or anything which is Bluetooth)

    Now the problem is... After connection of the device, I want to go get a (for example an image or text document.) file of the device connected using my camera...

    can anyone know how to extract data or file to another device that is currently associated with my camera... using BlackBerry device...

    Please help me to overcome this problem...

    Currently, I am working with Blackberry.6

    As suggested, I would recommend you try the samples provided.

  • Add data in columns while loop

    Good evening

    We use an Ocean Optics HR2000 spectrometer + to record the spectra of the permanence of our laser system. For the spectrometer, we use the plug and play drivers, located here

    (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=7833BD4A31DA1274E04400144FB7D2...

    Our labview program was designed to

    • Store within a well-defined time spectra of laser

    The conditions required for the stored file have been

    • First column: wavelength

    • Added columns: spectrum

    • The column heading - time, after you start the program

    After reviewing the forum, one of the solutions that has been applied that should use feedback nodes, as well as to transpose data later, as you can see in the attached files.

    Our problem:

    • for a short term of the vi, it works fine

    • for a longer race of vi, the file is messed up (see testlong.txt): in the fifth instance of the instance/wavelength loop wrote again in the spreadsheed file

    Is there something extremely stupid, we did here?

    Well, I don't know quite why your program is ugly - it was complicated enough that I just re-did, according to your description.  It is here, and here's how it works:

    The first loop creates ghosts (from line-become-column 2.  I use "Wait until the next multiple" so I cannot ignore the amount of time required for the calculations inside the loop.  As you can see, I use the output time of the initial function elapsed time for the line/column header.

    When the loop exits, I calculate the first row/column, NaN (not a number) to stick in the first position (angle).  I had hoped it would be written as an empty entry in the text file, but it was released as "NaN".  My writing to delimited spreadsheet function is the same as yours, but I left the addition at the entrance of unwired file so that it has retained its default value False, which means that I create a new file each time.

    I tested it for six and 19 seconds and it produce expected results (with a dot as decimal instead of a comma, of course).  Try it, it should do the same for you.

    Bob Schor

  • Save all the data for a while loop

    I already asked a similar question, but it is perhaps not very clear, and there are a few concepts that I did not understand.

    1. I have a keyboard to generate flow DTMF signal (I call it stream because it contains several shades that consist of a full phone number)

    2. I would like to save it as a wav file, but I guess that another format is correct and because the writing on a wav file does not support add so for this particular case, I use writing waving instead of writing to wav format

    My approach is to have a structure of queue so that I can write each iteration results in a file.

    (i) when I try to retrieve the data, there's nothing but 0.

    (II) my intention is to get 8000 samples per second (fs = 8 000) but he back up data so fast

    I have attached the file so if there is a way to solve problems, please help me.

    This vi includes many elements discussed above. There are no provisions for the intervals 'no signal '.

    Changes: Replaced with native features of LabVIEW Mathscript node. Mechanical Action to latch release button.  Cluster to array replaces Unbundle and table to build. Reshape the table to match the shape of the keyboard. Separate searches for frequencies of line and column. Note that this is easily extensible to handle the 4 x 4 keyboard. Structure of the event added. Added the stop command (but not implemented stop to the loop of the file). Added indicators for diagnostic purposes. Added FFT spectrum and graphic.

    I disabled writing to part of the file for testing.

    Lynn

  • How to record video using the NI PCI-1411?

    Hi all

    I have an old NI PCI-1411 Pulnix camera, LabVIEW 7.1.1 and Module NI Vision Development 7.1.0.

    What I want to do is to simply record a video, and I can't find any tools to do so.

    I found an example in the code LV to save the view, but it seems to be too slow to save all frames.

    Am I missing something?

    Thank you

    Jakub

    Hi Jakub,

    There is nothing that directly records because I think that you are eager to reach. To save an image video, you will need to use a write function, to get the data and then save it to a file, some functions also have a read function.

    I suggest that you look at the function reference manual and available in IMAQ, LabVIEW help files and they are also available on our website.

    I found an article that uses a good architecture which may help you to structure your application, for what I understand, that you are eager to make you you will need to make emissions to get the IMAQ camera data into a buffer to save.

    There are also examples available from the example finder LabVIEW avi in the help tab that are a good reference in the development of any application.

    If you have any other questions please ask.

    Thank you

  • Card mother WHS has changed, how to record data

    I'm under WHS with 2 hard drives 1 TB as storage and 1 1 to as backup. I had a motherboard failure and changed out. Now, I was able to boot from the old disks but I can't counsel for WHS. I have a feeling that has to do with the fact that I don't have to reinstall the operating system. I have another computer that I pulled up one of the storage of 1 TB drives to see if I can move the data out of it. I noticed that some of the records have missing data. I have that realized it seems WHS writes data to multiple disks. How a new can OS loaded WHS I recover all my data from the drives?

    http://social.Microsoft.com/forums/en-us/category/WindowsHomeServer/

    They will help you in the WHS forums above.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to select data using the same remote database column name 3

    Hello


    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    E.g.

    SELECT *.
    B.SID, b.status, SUM (b.qty) qantity MAX (b.) date_as_of
    Of
    * ((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) has, *)
    (* (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) b). *
    WHERE b.dept = 'finance '.
    AND a.position = "admin".
    AND a.latest = 'Y' AND (b.status <>"MLT") AND b.qty > 0;
    B.SID GROUP, b.status;

    NOTE: the instructions "BOLD" is just an example of what I want to do but I always get an error beacause of ambiguous column.

    Thanks to advnce. :)

    Published by: user12994685 on 4 January 2011 21:42

    user12994685 wrote:

    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    Not valid. This makes no sense and breaks all the rules of scope-resolution. And if it is in a single database, or uses tables in databases, is not relevant.

    Each object must be particularly well identified. If you cannot do this:

    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a
    

    3 objects cannot share the same alias. Example:

    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
                       *
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    

    You need to combine objects - by using a join union or similar. He will have to be done as follows:

    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
           *
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    

    However, we need to have unique column in a projection of SQL names - so the join of the need to project a unique set of columns. So:

    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    
    DUM DUM
    --- ---
    X   X
    
    SQL> 
    

    I suggest that you look carefully at what opportunities are and how it applies in SQL - and ignore if the referenced objects are local or remote, because it has no effect on the basic principles of scope-resolution.

Maybe you are looking for