Constantly add data to the chart 2D

Hi I'm going to be very difficult to deal with some great paintings. What I'm trying to do is create a program that monitors the 23 entries of a controller for cRIO. Here is the flow of the program:

1. the program starts and collects 1 sample per second of each entry and place into a 2D array, which has 23 columns and 10 rows

2 only collect 10 samples, constantly replace the samples in this array.

3. once a threshold is crossed any of the entries take the previous table and add it to a different 2D array that contains 360 000 rows and 23 columns.

4. once the table is inserted permanently add data of each entry in the new table at 100 samples/s.

5. the big Board has 360 000 lines because the program must be able to record data for one hour if necessary.

I used 23 separate tables and it worked OK but it was much to ineffective and the program was slow. I can't get data to enter in the right table and I'm pretty frustrated so any help will be much appreciated. Thank you

Adam

At least I'd be initialize your berries to the largest possible size that you may encounter. When adding data use the subset of table replace to update the table with your new data. In addition, I would put these paintings in a shift register. Avoid to display an indicator of control to data, do not use local variables or property nodes to access the data. or the other.

Also, do you need to have all the data in the application while it is running? You can use medium running or other methods to reduce the amount of data, you should keep in mind? May store data to disk and keep only part of it in memory and read only comprehensive data when you need it?

Tags: NI Software

Similar Questions

  • Add data at the end of a specific line in the text file

    Hello

    I'm trying to add data at the end of the last 4 lines of the text file attached with the ' table to add.  4 rows (422.5800 entry), I would add the first entry of the 'Array to add' entry, on the 5th line to add the second entry of the 'Add picture' and so on.  How can I do this?

    Any help will be appreciated.

    Sincerely,.

    hiNi.

    After re-reading your post, I think that's what you really want to start adding after the first 4 rows.

  • Add data in the header of a .wav file

    Hello guys,.

    I seek your help for a small problem that I can't spend during my internship.

    Here's what I want to do: I acquire signals that I write a .wav file. What I would do then is to reopen this .wav file and add data in the header, such as the sensitivity of the microphone for example. I am doing this is because it's one of our program of works, it can resume the pressure vs time signal using this information. I already have the hex code I need to add, but I was not able to determine if such a thing is possible or not after a day of research ideas would be greatly appreciated. I wonder if Matlab might do the trick but I prefer to stay with the 'normal '... screws

    Thank you very much for your help.

    To insert data into the middle of a file, you will need to rewrite the entire file after that point, as Gerd said in the linked post.  I would do the following:

    1. Search for the location you want to put your new piece
    2. Read 65 000 bytes from forward and store in a local cache (shift registers work well for this, or just a wire at this point).
    3. Write your new piece, taking note of how long it is
    4. Give your data buffered less the length of your new song
    5. Read a 65 000 other bytes and put it in a new buffer
    6. Write the end of the old buffer and a part of the new buffer until you get to 65 000 bytes
    7. Repeat 4 to 6 until you reach the end of the file
    8. Update the offsets in the header to match the new locations of piece, since you have moved things

    You can probably do it with both data pads in a pair of registers at offset in a loop.  The 65 000 bytes is chosen for best performance.  You can use other sizes, but your speed can suffer.  Let us know if you encounter any problems.

  • Add data in the dumpfile parameter in command exp

    Hello

    I have installed 10.2.0.1 on windows server 2003.

    I took the backup hot using the command.
    Exp username/pwd FILE=C:\DataBaseBackups\3AMNEO.DMP LOG=C:\DataBaseBackups\3AMNEO.LOG
    which works very well.

    I made a batch file that have this code and that run daily at some point and overwrite existing (i.e. the last day) backup. But I don't want to do.

    I would like to add data with the file name so that every day, it creates a new backup. (No more write existing backup.)

    My goal is to do a daily backup without replacing existing backup automatically.

    Thank you

    Hello

    hope this helps

    http://DBA.ipbhost.com/index.php?showtopic=804

    Concerning
    Mozka

  • Save the data in the chart to the file constantly

    I'm analog data Aqcuerir of USB 6000 data acquisition and display on the chart. I have to save all the data in a file as well (text or excel... or at least a file). It is easy to configure so that the data is saved after the stop button was so press until the end of the race. However, I need to write to a file when running because he could be running for days. In such a period extended, the buffer is an overload, and the data is lost.

    Could you please indicate some kind of how to write data to a file constantly during measurement, wthout record in the buffer?


  • Adds data to the binary file as concatenated array

    Hello

    I have a problem that can has been discussed several times, but I don't have a clear answer.

    Normally I have devices that produce 2D image tables. I have send them to collection of loop with a queue and then index in the form of a 3D Board and in the end save the binary file.

    It works very well. But I'm starting to struggle with problems of memory, when the number of these images exceeds more than that. 2000.

    So I try to enjoy the fast SSD drive and record images in bulk (eg. 300) in binary file.

    In the diagram attached, where I am simulating the camera with some files before reading. The program works well, but when I try to open the new file in the secondary schema, I see only the first 300 images (in this case).

    I read on the forum, I have to adjust the number of like -1 in reading binary file and then I can read data from the cluster of tables. It is not very good for me, because I need to work with the data with Matlab and I would like to have the same format as before (for example table 3D - 320 x 240 x 4000). Is it possible to add 3D table to the existing as concatenated file?

    I hope it makes sense :-)

    Thank you

    Honza

    • Good to simulate the creation of the Image using a table of random numbers 2D!  Always good to model the real problem (e/s files) without "complicating details" (manipulation of the camera).
    • Good use of the producer/consumer in LT_Save.  Do you know the sentinels?  You only need a single queue, the queue of data, sending to a table of data for the consumer.  When the producer quits (because the stop button is pushed), it places an empty array (you can just right click on the entry for the item and choose "Create Constant").  In the consumer, when you dequeue, test to see if you have an empty array.  If you do, stop the loop of consumption and the output queue (since you know that the producer has already stopped and you have stopped, too).
    • I'm not sure what you're trying to do in the File_Read_3D routine, but I'll tell you 'it's fake  So, let's analyze the situation.  Somehow, your two routines form a producer/consumer 'pair' - LT_Save 'product' a file of tables 3D (for most of 300 pages, unless it's the grand finale of data) and file_read_3D "consume" them and "do something", still somewhat ill-defined.  Yes you pourrait (and perhaps should) merge these two routines in a unique "Simulator".  Here's what I mean:

    This is taken directly from your code.  I replaced the button 'stop' queue with code of Sentinel (which I won't), and added a ' tail ', Sim file, to simulate writing these data in a file (it also use a sentinel).

    Your existing code of producer puts unique 2D arrays in the queue of data.  This routine their fate and "builds" up to 300 of them at a time before 'doing something with them', in your code, writing to a file, here, this simulation by writing to a queue of 3D Sim file.  Let's look at the first 'easy' case, where we get all of the 300 items.  The loop For ends, turning a 3D Board composed of 300 paintings 2D, we simply enqueue in our Sim file, our simulated.  You may notice that there is an empty array? function (which, in this case, is never true, always False) whose value is reversed (to be always true) and connected to a conditional indexation Tunnel Terminal.  The reason for this strange logic will become clear in the next paragraph.

    Now consider what happens when you press the button stop then your left (not shown) producer.  As we use sentries, he places an empty 2D array.  Well, we dequeue it and detect it with the 'Empty table?' feature, which allows us to do three things: stop at the beginning of the loop, stop adding the empty table at the exit Tunnel of indexing using the conditional Terminal (empty array = True, Negate changes to False, then the empty table is not added to the range) , and it also cause all loop to exit.  What happens when get out us the whole loop?  Well, we're done with the queue of data, to set free us.  We know also that we queued last 'good' data in the queue of the Sim queue, so create us a Sentinel (empty 3D table) and queue for the file to-be-developed Sim consumer loop.

    Now, here is where you come from it.  Write this final consumer loop.  Should be pretty simple - you Dequeue, and if you don't have a table empty 3D, you do the following:

    • Your table consists of Images 2D N (up to 300).  In a single loop, extract you each image and do what you want to do with it (view, save to file, etc.).  Note that if you write a sub - VI, called "process an Image" which takes a 2D array and done something with it, you will be "declutter" your code by "in order to hide the details.
    • If you don't have you had an empty array, you simply exit the while loop and release the queue of the Sim file.

    OK, now translate this file.  You're offshore for a good start by writing your file with the size of the table headers, which means that if you read a file into a 3D chart, you will have a 3D Board (as you did in the consumer of the Sim file) and can perform the same treatment as above.  All you have to worry is the Sentinel - how do you know when you have reached the end of the file?  I'm sure you can understand this, if you do not already know...

    Bob Schor

    PS - you should know that the code snippet I posted is not 'properly' born both everything.  I pasted in fact about 6 versions here, as I continued to find errors that I wrote the description of yourself (like forgetting the function 'No' in the conditional terminal).  This illustrates the virtue of written Documentation-"slow you down", did you examine your code, and say you "Oops, I forgot to...» »

  • It is better to define a waveform properties of scale before or after sending new data to the chart?

    Hi, I wonder what is the best time to update the properties of the graphic scale waveform.

    I'm sampling data every 15 minutes for 192 samples, or 48 hours.  I want to draw these samples with x in absolute scale so the scale maximum x is time and x minimum scale at the time mode is x max in less than 48 hours (172800 seconds).  I want also to intermediate-scale markers 6 hours apart and to be multiples of 6 hours.  for example at 06:00, 12:00, 18:00.  It works by using nodes of property but sometimes intermediate markers are on the hour 6 multiple and sometimes they are at 6 hours after the scale min marker.  for example, 09:15, 15:15, 21:15.  Is there a way to ensure that the intermediate markers are on the hour 6 multiples?

    Thank you

    Neville

    Neville,

    I don't think there is a function of the order of execution by using nodes of property information across your graph. If you are concerned about the speed of your VI, I would recommend writing to the property node before update you the chart. I believe that this will ensure that the chart will update only once: when the new data is sent to the curve, as opposed to the update with the new data, then with the new scale.

  • Add data at the beginning of the text file

    Hello

    How can I do to add the data to the top of the file instead of down as the attached VI?

    Thank you

    hiNI.

    Read the entire file, the value of the offset position of the 0 file, and then write the data with the new data in the upper part.

  • Need for a versatile to pass data to the chart

    Hello

    I have a sub - vi that performs data analyses. I pulled out the results through a def type. I want that this type def to include data necessary to plot the results on a XY Chart.

    My problem is that the data will sometimes contain only 1 and sometimes multiple data series dear. or sometimes the output should be a cluster of two 1 d-tables, sometimes it must be an array of clusters. Is there a good way to do this?

    vs

    udka wrote:

    You can try using for loop with indexing enabled so you will come to know how much coulumns you have during execution and clusters and then indexing on so that you always have table of clusters.

    You are on the right track.  Just need a little before the loop to transpose the table (to properly make the indexing job) and remove the data from the x-axis.

  • How to add data to the SD card file?

    I use OutputStream to write data to a file on the sd card.

    Before you start coding, I assumed that we can use a similar api seek() but I couldn't find a way to move the file position.

    is it possible to add data using OutputStream or any other method?

    FileConnection.openOutputStream (long byteOffset)

    byteOffset - number of bytes to skip from the beginning of the file when the positioning of beginning of the OutputStream. If the supplied offset is greater than or equal to the current size of the file, the OutputStream is positioned at the end of the file to be added.

  • problems with the date in the chart in the first instance

    Hello

    I have a date selection field (P2_START_DT), which has a default value in a table

    Here's the code I used to set the default (thanks again to the expert for assistance)

    Start

    Select max (REC_DATE) dt in: P2_START_DT

    from TABLE_A;

    return: P2_START_DT;

    end;

    on the same page, I have a report (Type: SQL query) and a chart that takes P2_DATE as a parameter

    This is a sample report SQL condition

    ...

    where

    RECORD_DATE >: P2_START_DT

    This is a condition of samlpe SQL used for the graphics

    ...

    where

    RECORD_DATE >: P2_START_DT

    condition is about the same for both

    My problem is that when the page is loaded for the first time, the P2_DATE field and the report shows good data but my chart shows nothing.

    to test, I added a button to submit the page.

    When I click on the button both my chart and the report shows the right data... suggesting that for some reason any graph is not picking up the default value for P2_START_DT when the page is first loaded

    Please notify.

    The default value for your item is not saved in session state until you offer page.  When your chart is rendered the first time the value of your object in session state (which makes graphic references) is not defined.

    Create a calculation for your section header to set the value of the element in the session before the rendering of the graphics state.

    Calculate the point: P2_START_DT

    Calculation Point: before header

    Type of calculation: (single return value) SQL query

    Calculation:

    select max(REC_DATE) dt
    from TABLE_A;
    

    Condition Type: point value / Expression 1 a NULL column

    Expression 1: P2_START_DT

  • HSlider as the range of dates in the charts

    IM using hslider as a date range to view database
    on the dates selected for the chart.
    My problem is how to change the chart data, based on the selection of the date of the hslider
    Note: there are 3 sets of line in the table, so the data set should be based on the range of the hslider date selection

    Any idea! Examples

    found a use for good double cursor if you try to do something like google, thank you cards to brendan, good job.
    http://www.stretchmedia.ca/code_examples/chart_range_selection/main.html

  • Simple Question: Can I add data to the target home page?

    I have a daemon process that I followed and I want to put the vendor, version, start time, path, etc. on the homepage of target. How can I do this?

    As far as I understand it, I can add graphics to the home page of the target and create reports, but I have not found how to do this.

    I use GC 10.2.0.5.

    That is right. The new version of the Guide extensibility should be somewhere online now, or should be available soon. That describes the feature that allows you to put the cards on the home page. Unfortunately, it won't really focus on what you want to do. All that is allowed through this feature is pie charts, histograms and graphs for time series.

    The best solution is probably to create a report with the information that you want, save appears in the homepage of the target instance reports sub-tab.

  • How to sort the data in the chart

    Hi, the data feeds that I show on my chart are a kind of account for each of their life cycle. For example, we have 20 in lifecycle = Production, 15 to life = pre direct cycle, 15 = testing life cycle, so on. I want to be able to sort the data by the nature of the life cycel, so in this case, the test-> advance live-> production rather than alphabetically. How to do this?

    Put a 2nd column in your report by using the field of life cycle and then write a CASE statement WHEN:

    CASE {cycle} during the 'Test' THEN 1
    WHEN 'pre Live' THEN 2
    and so on...
    ELSE 0 END

    Hide this column and use it as the sort order.

    see you soon
    Alex

  • How to add data to the table?

    Hello

    As it is in question. Can I add data (new items) in table dynamically? I say my table 1 d is size 3, but I would like to add three items. Should I change size table first?

    See you soon,.

    K

    Hi K,

    Ray is right!

    Maybe this thread will also help you because there are examples of smal

    http://forums.NI.com/NI/board/message?board.ID=330&message.ID=18421&query.ID=288653#M18421

    Concerning

    Jürgen

Maybe you are looking for