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.

Tags: NI Software

Similar Questions

  • 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.

  • 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

  • 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 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.

  • problem with the storage of the data in the table

    Hello

    I'm having the problem on the storage of data in the table. My problem is that whenever he makes a loop, the table just keep replacing them rather save to the next index. At 0, the value is 123, and 1 is 234. But I saw that all the data capture all crush to 0 until the last data see the 0. How can I fix this problem?


  • 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.

  • writing the file text in while loop

    Here's my question about writing data to a file in a text while loop... better written as I can.

    I have a case of Init where I have the user choose a path and a name. I go out the ref and then I gave, which are written to the file. The loop will take 40 000 pieces of data write to the file and return to the business of data get to collect another 40 000 data points. But when I open the file, I get only one as big as 430KB file. I'm not sure but can somone show me an example to analog data of a DAQ help, make a calculatoin on this subject, write to a file, and repeat that adding it in the same file at the end of previous data?

    See the attachment for LV 8.0 versions

  • Storage of the data in a table problem

    Hi guys,.

    I have the following schema:

    < xsd: element name = "Details" type = "DetailsType" / >
    < xsd: complexType name = "DetailsType" >
    < xsd: SEQUENCE >
    < xsd: element name = "count" type = "xsd: Integer" / >
    < xsd: element name = "loop" type = "xsd: Integer" / >
    < xsd: element name = "test" type = "xsd: Integer" / >
    < xsd: element name = "test2" type = "xsd: String" / >
    < xsd: element name = "test3" type = "xsd: String" / >
    < xsd: element name = "ReceiptArr" type = "xsd: String" maxOccurs = "unbounded" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >

    where I said ReceiptArr in a table.

    I try to copy the data in the table, but it does not work.

    I want the data to be like that

    ReceiptArr [1] = 12345
    ReceiptArr [2] = 23456
    ReceiptArr [3] = 78900
    .
    .
    .
    etc.


    Here is my statement copy of bpel


    < copy >
    < expression = "ora:getNodes ('receiveInput_Get_InputVariable', 'CashReceipt', concat ('/ ns2:CashReceipt / ns2:Detail [', bpws:getVariableData('DebtorVar','/ns9:Details/ns9:loop'),'. / ns2:receipt_number'))" / >
    < variable = "DebtorVar."
    Query = "Concat ('/ NS9:Details / NS9:ReceiptArr [', bpws:getVariableData('DebtorVar','/NS9:Details/NS9:loop'),']')" / >
    < / copy >

    and it fails, does anyone know how I can complete my table in bpel?

    Thank you
    K

    Hello
    I had to do in the past, and this is the approach I used. Create two variables, one for a number of records and the other as an index of the loop. The index of the loop the value 1 and get a number of nodes in the xml data in the entry for the second variable. Then the loop through the input xml data while the loop index is less than the record number, set the value of your table and incrementing the index of the loop, the use of brackets around the loop index (i.e. open close bpws:getVariableData('Variable_loopIndex') of the angle. I see that when I post this message, this part of the code is eating, and in my browser at least when I replace the ASCII for support, it is displayed instead of the media.

    There might be better ways to address the issue, but it worked for my process. I have not tested the below with your types to xml schema, but here's an example of how this can stand as a model using my code:











    condition = "bpws:getVariableData('Variable_loopIndex') < = bpws:getVariableData('Variable_recordCount')" > "

              


    Query = "/ ns2:CashReceipt / ns2:Detail / ns2:receipt_number [bpws:getVariableData('Variable_loopIndex')]" / > ""

    Query = "/ ns9:Details / ns9:ReceiptArr [bpws:getVariableData('Variable_loopIndex')]" / > ""









    Hope this helps
    Candace

    Published by: cmcavaney on June 25, 2009 08:26

  • With an average of the data output.

    Hello

    I am a new user of Labview. I need to write a labview program that will average my output in a single data data.

    Basically I have an XY graph which results in a table and the idea is to average the data points.

    This is the kind of program that I use.

    Thank you

    Mutah

    Hi Nicole,.

    You can index the table and use the average function (within the mathematics - probability and statistics). Then, you will get the average value of each table. If you want to see the averages in a table, then you can combine average values in a table again...

    Hope this help out you

  • How can I update the values out of while loop

    The LabView waveform chart updates every 0.1 sec.

    When a user clicks on a button, I want to LabVIEW to wait 5 sec and beep for 5 sec.

    Meanwhile, it should be to update permanently the wavefrorm graph.

    When I have the structure case inside the while loop, it interferes with the updates of the waveform graph.

    When I structure case outside the while loop, the structure of the case is never executed.

    What can I do?

    I thought about it using the example of design of producer/consumer model.

    http://decibel.NI.com/content/docs/doc-5404

    It allows a variable that is updated in a while loop to update outside the while loop while the loop is running.

  • Distribute the data output waveform of niScope Multi Fetch Cluster

    Now divide the data in a table 1 d of the clusters.  I use a PXI-5421 function generator and a PXI-5122 digitizer.  The output data of retruns NiScope Multifetch Cluster.vi of the waveform as a table 1 d of the cluster of 3 elements.  This table contains the information of channels 0 and 1.  I am trying to extract information from component waveform of each channel, so I can work on them a wave two re - assemble.  Can someone point me in the right direction?  I can't seem to find the right tool in the tools of painting or a cluster of.  Thank you.

    Jeff

    You just use a table of Index and a Unbundle by name or Unbundle.

  • Problems of storage of the data in excel

    Hi people!

    I created a program that reads a voltage signal and therefore calculates the number of peaks at some point. What I have a problem with is to save the values as the program is calculating.

    Usually I build and array and store these values in a ".csv" file and open it in excel. It worked for me before, but when I tried with the program that I come to it gave me an error saying 'you have plugged the 2 tables of different sizes. I also joined the program for your reference.

    If someone would be able to let me know what went wrong in my code, then that would be really useful. In addition, if there is another way to store values in excel and then let me know.

    Thank you

    Piraux

    You have some problems. First of all, your program will not record the latest result. You spend just 3 different scalars off the while loop. Either activate auto-indexation on or use a shift register and a construction table function. Since you have scalars off the while loop, the build dashboard you have outside creates a 1 d table. Of course, you can't pass that converts 2D table.

    Try the simple change, I joined.

  • What is the best way to run multiple instances of the class containing infinite while loop?

    Hello

    I have a several instances of the class (say a, b, c,...) that have the same parent and I want to run the same methods overridden to all instances in parallel.

    For example:

    a.init ()-> a.run ()-> a.stop ()-> a.run ()-> a.stop ()->

    b.init ()-> b.run ()-> b.stop ()->->->

    c.init() ->           ->             -> c.run() ->               -> c.stop()

    ...

    See the attachment for more details.

    The problems are now:

    1. the 'run' - method does not return until it receives the external trigger

    2. everything to run methods return in a different time

    1 chip means I can't use autoindexed for loop because in this case b.run () will have to wait before the end of a.run (), right? Is it possible to run to the loop in parallel?

    2 chip means that an object must be able to run and stop independently from others.

    What is the most elegant solution? The solution copy - paste in the attachment works for 3 instances, but there are currently 10 and more is coming.

    Juha

    In fact, what I wanted to know was "how to add the 'P' loop '... Easy, after you ask the right question.

    In the attachment, there is a test.vi that has two numerical indicators in a certain time-infinite loops. If I leave the parallelism, the two digital are incremented infinitely. If I don't allow parallelism, only the first is incremented (he never leaves the infinite while loop).

    To solve my original problem, I can make an init-start-stop branch within a loop-parallel-indexing for and make sure that there are the same number of instances of loop as there are objects in my array of objects (object array is an autoindexed in the loop for).

    Also good point about the vis environment. I should also add that.

  • local storage in the data store

    I have 4 ESXi 5.5 cluster nodes (host1, 2... 5) + 3par storage, I noticed that the local drive of host2 is detected as a data store.

    When I create a VM and I choose the data store, I can see all data related to my on3par LUN stores but it seems this drive local host2 too!

    I would like to remove it! Can you offer me please?

    You must hide hide this data store using permissions, you must run the following procedure: Open-> inventory-> warehouses vSphere-> select the select data-> permissions VMFS store-> click the user or group in the list and set them to 'No access' - are not propagated.

    Once achieve you its judgment showing everywhere.

Maybe you are looking for

  • Audio iPhone 7 clicks with 3.5 mm adapter

    Hey guys, this is my first day with the new iphone 7. I had the version 256 GB black with Telstra. I just plugged my Bose QuietComfort headphones to the phone using the 3.5 mm provided with the phone adapter. Even before playing any music, I could he

  • JAVASCRIPT TURNED OFF SUDDENLY. CANNOT BE ENABLED

    All of a sudden, I can't get into Facebook. Message says javascript is disabled. When I foillow the instructions on this web site to allow it, told me to go to 'Options', but it isn't here under preferences - content or tools - content. I have reinst

  • Color change after sharing the project

    I use an iMac OS X 10.11.4, mid-2011 and FCP worm 10.2.2.  I'm processing the photos that have been color corrected from Raw files in Photoshop and imported directly into FCP.  I did no color correction in FCP (color balance) or color Board.  When I

  • need a software update for a1000

    Need a software update to software bug and bug Bluetooth headsetAfter disconnecting Bluetooth audio driver doesn't work until you restart, once that Bluetooth is connected bluettoth only works until you restartNeed to update software asp

  • Applications stopped working

    I want to install a new windows Server 2008, and once I have install a new application, he pointed out that the application has stopped working, I thought it was a problem of window, I re-installed the Windows Server 2008, but still the same thing, w