reorganization of the data in the table

This has probably been asked and answered before, but I can't seem to find it anywhere.

I'm saving a bunch of data in a file of lvm in the form of a 1 d table. When I open the worksheet the data appears in this format

0 2.525174
1 0.390727
2 4.00143
3 0.020132
0 2.525174
1 0.390727
2 4.00143
3 0.020132
0 2.525174
1 0.390727
2 4.00143
3 0.020132
0 2.525174
1 0.390727
2 4.00143
3

0.020132

0-3 is my four analog channels. I want the data to look like this when I open the file in excel:

0 2.525174 2.525174 2.525174 2.525174
1 0.390727 0.390727 0.390727 0.390727
2 4.00143 4.00143 4.00143 4.00143
3 0.020132 0.020132 0.020132 0.020132

This way I can easily see which data points belong to which channel.

Otherwise, it would be even better:

0 1 2 3
2.525174 0.390727 4.00143 0.020132
2.525174 0.390727 4.00143 0.020132
2.525174 0.390727 4.00143 0.020132
2.525174 0.390727 4.00143 0.020132

I'm pretty new to LV and can't seem to find a way to re - format the data before moving my "write.vi".

Just in case this is helpful somehow, I enclose my vi.

Thanks in advance!

EDIT: accidentally attached the wrong file. This is the one.

Hello.

You can use the Decimate array with 4 outputs function to automatically create a single table for each channel, you can then use build array to merge all channels as an array of unique 2D (which would look like the second picture you posted). Finally, you can convert the table to format as in your third example. I hope that helps!

Best regards.

Tags: NI Software

Similar Questions

  • Reorganization of the table

    All,

    I found a few tables are very fragmented in our database of production and continues to re - organize. I intend to use 'change the method of displacement of the table '.

    Database version: 11.2.0.3

    Name of the table: Test Tablespaces: users, tools - they already have enough space for the move.

    During the race, this database of impact will this order?  This will allow DML and DDL operations?  Please let me know what has be to consider other things.

    SQL> alter table test move tablespace tools;
    
    
    Table altered.
    
    
    SQL>  select status from dba_objects where object_name='TEST_INDX';
    
    
    STATUS
    -------
    VALID
    
    
    SQL>  alter table test move tablespace users;
    
    
    Table altered.
    
    
    SQL> select status from dba_objects where object_name='TEST_INDX';
    
    
    STATUS
    -------
    VALID
    

    Thank you

    Why do you feel compelled to do something?

    If you regularly remove 'huge', and then nothing else to do.

    If "SHRINK you" the size of the table, you force only Oracle to expand yet; before the next deletion.

    What you propose would be similar to replace the gas tank on your car you consume gasoline in order to eliminate all the space as 'wasted' in there.

    The problem arises when you want to fill. You develop the tank; just to keep more gasoline.

  • Move the table in same tablespace is not reorganize the data

    Hello.

    I am facing a problem that I have not used to have.  First of all, a description of our envorinnement:

    We have a few large tables partitioned and performance optimization, our ETLs use bluk, add notes, parallelism and so on.  This create several holes of unused space in tablespaces/data files as well a kind of leak of space on our drives.

    A complete correction would re-create the tablespaces move everything is of opposes another.  It would be impratical, because there are about 15 who are top of 100 GB; the time and effort to recreate everything is not affordable for the Business.

    Instead, we have a single proc that comes to calculate the actual amount of used space (converted to blocks) and makes a move of all objects above this block_id.  Just after this operation, there is a dynamic shrink based on the new HWM (given that the objects have been moved) on the data file freeing disk space.  As we have a datafile by tablespace and a tablespace by schema, we would like to keep this body, if we make a single movement for objects, like 'ALTER TABLE' | owner: '. ' || nom_segment | "MOVE; "(the complete query works with all types of data such as partitions of table objects, the index partitions and the subpartions).  This will move the object in the same space for the first freespace on the tables and free up space at the end of the file to shrink.  In theory.

    This unique proc used to work properly.  In a 650 GB GB 530 tablespace in use moving about 20 that Go (the amount of data beyond the HWM 530 GB) is simpler than to create a new file/TBS and the displacement of 20 GB is faster than Go 530.

    But suddenly things changed when some TBS refused to be narrowed.  What I found out: the command move doesn't fail, it works very well and Oracle really moves the object.  But for reasons that I don't know, he's not moving it at the beginning of the file, it keeps the object at the end.  So the da calculates the new HWM, but because some objects that were in the tail of the queue, the shrink is done with a very high HWM, if no real space is reclaimed.

    So, the main question: How does the ALTER TABLE FOO MOVE really works?  I thought that it would be always to move the object to the beginning of the file thus reorganize, but I analyzed the last objects that gave me this problem (block_id before and after the move, compared to block_ids empty and everything) and actually, I see that they were moved at the end of the file, although there is enough space to accommodate initially.

    Okay, I think I found the problem.  Before that I just pulled the script as posted, but then I had the good idea to improve its performance with parallelism, so I added:

    ALTER SESSION FORCE PARALLEL QUERY 16 PARALLELS;

    ALTER SESSION FORCE PARALLEL DDL PARALLEL 16;

    ALTER SESSION FORCE PARALLEL DML PARALLEL 16;

    Returning to prallel not running, that I could reuse the freespace on the beginning of the file, and then narrow it down.

    Obviously, each writing data in parallel mode reuse freespace, I just forgot that a TABLE ALTER MOVE is also a data write operation.  I fell a bit ridiculous, caught in the same trap that I was trying hard.

    Thank you all for the comments and advice.

  • Reorganization of the JSON data

    Hi all

    I need help, reorganizing the data I receive from a JSON Unflatten.
    I have a JSON string of a call to API (JSON unflatten) that contains a name (String), a digital and a channel (also a string).
    The JSON Unflatten automatically directs the data it receives in order, the data is provided.  The data is information on the channels.  The problem arises when not all channels are provided.  If out of 12 channels, the JSON receives information on only 4 channels, he ordered the 1 to 4 in the table.  However, 1 may not correspond to channel 1 and can actually be channel 5 and 3 might not correspond to channel 3 so on and so forth.  I want to reorganize the JSON based on reading channel (a channel named canal).  So, if in the table that Channel 4 is actually 12 (based on the channel of the channel, i.e., channel-12), I would link data from Channel 4 to profile 12 in a new table, so that the order of the channels still dependent on chain channel and not according to the order of unflatten of JSON.

    Please help as I am running out of ideas on how to solve this problem.

    Thank you.

    That's what is lying to you?

    PS: Try to avoid the multiple index table - it is preferable to use arrays and loops

  • Questions about the reorganization of the rows in the table by drag-and - drop feature

    I am referring to the demo: 106. Drag-and-drop the reorganization of the rows of the table in aCorner of Code DF to implement my case.

    I am facing some problems:

    1. the view object (bound to the table) is read only and it is created directly by very complex SQL queries, without entity objects. When it is run the code: dragRow.removeAndRetain () in the method: DnDAction processDrop (DropEvent dropEvent), it throws the error so that a guest view object is read-only. I want to know if there is another way to delete the moved collection line?

     public DnDAction processDrop(DropEvent dropEvent) {
    ...       
           CollectionModel collectionModel = (CollectionModel) table.getValue();        
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding departmentsIterator = treeBinding.getDCIteratorBinding();               
            RowSetIterator rsi = departmentsIterator.getRowSetIterator(); 
    
            int indexOfDropRow= rsi.getRangeIndexOf(dropRow);
           //get access to the oracle.jbo.Row instance represneting this table row
           Row dragRow = (ViewRowImpl)table.getRowData(draggedRowKey);
           //remove dragged row from collection so it can be added back
           dragRow.removeAndRetain();
           rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
          ...
    }
    

    2. When you click on a button, I need to save the command results in the database using the command update # of each rank. Here it is the handler method for the event of the action (in MB) button.

    I want to use RowSetIterator table for encode it from all ranks and update the value # order of each rank.   I call a data control method to run sql update. is it ok? any suggestion?

        public void processSaveOrder(ActionEvent actionEvent) {
            CollectionModel collectionModel = (CollectionModel) mytable.getValue();        
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding iterator = treeBinding.getDCIteratorBinding();               
            RowSetIterator rsi = iterator.getRowSetIterator();
            Row row =rsi.first();
            System.out.println(0+"="+ row);
            int i = 1;
            while(rsi.hasNext()){
                row = rsi.next();
                System.out.println(i+"="+ row.getKey());
                i++;
            }
    
        }
    

    A workaround solution was found:

    In ADF 12 c, it can be solved by changing Updatable "Always" in the details tab of each attributes to read-only view object without entity object.

  • Problem using applescript to put data into the table of numbers with column heads

    I have extracted the data from certain Web pages and want to place the data items in a table of numbers.  I wrote the applescript to extract pairs of data into two lists, but encountered a problem when you try to put the data items in a table of numbers.

    I hope I've isolated the problem eventually reduce version of the data table and writing.

    Calendar_Month

    Alvarez

    Laundry

    Linen

    Products

    March-2014

    April 2014

    May-2014

    Totals:

    0.00

    0.00

    0.00

    0.00

    Define theLabels to {"Alvarez", "Flax", "Laundry", "Products"}

    the nominative value {11, 22, 33, 44}

    Tell application "Numbers."

    say table 1 on sheet 1 of 1

    rowIndex Set of 3

    q Set of 2

    say the line rowIndex

    colHead theLabels point q value

    the columnIndex value address column colHead

    tell the cell (columnIndex)

    value defined in point q of the nominative case

    tell the end

    tell the end

    tell the end

    tell the end

    I arbitrarily chose to line 3 of the table to demonstrate the problem.

    Each data item is associated, due to its position in the list, with a label that determines the column of the data table, where it should be placed.

    The illustrated script pitches the 2nd data element in the list in the column headed "Lin".  This seems to work ok.  But if q is set to 1 the script fails with

    get address of column "Alvarez" in line 3 of table 1 to sheet 1 of the document 1

    -> error number - 1728 column "Alvarez" in line 3 of table 1 of sheet 1 of document 1

    It fails also with q the value 3 or 4.

    I probably did something really stupid, but I can't understand this behavior.  Advice please?

    Under: Numbers v.3.6.1 Script Editor 2.7 2.4 OS X 10.5.5 Applescript

    Two questions.

    (1) the order of the text in theLabels = {"Alvarez", "Flax", "Laundry", "Products"} and differ from the order of the text in the header row. Is this correct?

    (2) you are putting the value 22 (point 2 of nominative) in cell D3, where column heading of D = "Flax", which is article 2 of the theLabels?

    Respect,

    H

  • Read xls file and display the data in the table.

    Hello

    Try to read the data from an xls or csv file and fill the same data in the table. If I need to use the table to store the data from the file and display, hoping that someone could help.

    Thank you

    Hari

    Hi hari,.

    One thing that is very important when you use the Excel activeX interface (in case you need it) is good termination of worksheet/workbook/lettering handles.

    You need these handles to specify what cell in which file you are trying to access.

    If you are unable to throw each handle you have, then you will be left with ghost Excel process in your task manager, devours your system's memory.

    Thus, when debugging of your application, open the Task Manager and the watch as Excel treats created/destroyed and make sure that you end up with zero Excel process running when your application is closed.

    Also consider the case of fault for your program. Check that your exit routes did not omit any termination of handle.

  • Place the data of multiple channels in the tables

    At this moment I have a sample program with a value of 8 data channels of my USB-6009 spitting in a graph of a waveform, which looks and works very well. Ideally, I would like to take this data and manipulate it to produce two calculations before it comes out on the graph. After I would handle that I want to display on a line chart (cloud?) as two lines of updated permanently. I think if I can get my 8 channels in 8 separate tables, the rest should be put in place.

    Thank you

    Hi Iwild,

    How you import your data?  You place data in a table in a first time?

    You use NEITHER-DAQmx?  If so, please see this document that goes over how to use NOR-DAQmx with text-based environments.

    Best regards,

  • How do I get the data in a table column of material using the tcp/ip interface

    Hello everyone, I want to get my material data using tcp /ip interface.and and then display them in a column of the table control? can any body tell how to do that .that me clear I never before communicate with hardware so please help me in detail.

    Thank you

    Hi Charlotte,.

    ask that 'someone' for more specific information.

    You must know the exact format of the channels you receive in order to analyze!

  • Whenever I call a VI I get old data with new data in the table

    I selected 'clear indicators when it is called' in my properties VI, execution. Yet, whenever I call the VI, the table of data is growing. My main VI implements my USE, and then call the sub - VI, which sets up an instrument measurements, then reads the results and transmits data. I then change the UUT to the next State and repeat the same task sub - VI to get again the same measures. The main VI changes the mode of WEAR it three times, so call the sub - VI three times. The last call of the Subvi back all three sets of data together, which is OK. My problem is, when the main VI ends and I run another USE, I get the new set of data as well as the complete list of data from the previous run. I found a similar problem answered here on the forum who suggested I should 'clear indicators when it is called', and so I did. It still has not fixed my problem. Any idea?

    Try this, for example:

  • concatenate the data in 2 tables in a third table as well as in CONCATENATE strings

    Hello. as the title says, I wish to only concatenate the data in 2 tables in a similar third table that concatenate strings don't. All tables should be 1 d. For example, suppose that there is 1 table with the following: 1. 2; 3; 4 and table 2 with:; b; c; d. I would like a table 3 either 1 a, 2 b, 3 c, 4 d. Now this could be done easily with above mentioned concatenate strings, then table construction. but table 1 and 2 have something like 150 items. Rather painful. Any ideas?

    Hold arrays of two strings in a loop for example, concatentate the strings inside the loop and run the result réécrirait array3.

    Autoindexing manages table manipulations.

    MIke...

  • Leak memory in a simple loop to save data in the table?

    Hello world

    I'm trying to set up a simple code to read a certain amount of data in a table at a fixed sampling rate and put these data in a local variable.  I'll put this on one OR cRIO-9073 using the scanning engine and the data comes from one NOR 9208 with a speed of approximately 250 Hz scanning, even if it is not really important at the moment.

    I made this little test VI which I suspect contains a memory leak, but I'm not able to identify it.  The reason for my suspicion is that when I run the vi on a VMWare virtual machine (LabVIEW 2010 on Windows XP) it claims soon that it is short-term memory.  Of course, the problem is perhaps elsewhere, but I hope that someone more experienced with LabVIEW programming will be able to find all the bugs very easily because it is really a piece very simpel to code. :-)

    I have included a copy of the VI with a screenshot to illustrate.

    Regards, Martin

    PS my code looks a bit awkward, so if anyone has a better solution, I'd be very happy to learn about it!

    Hello Martin,

    I would try a different approach to your problem. Currently you reshape your table each iteration of the loop. This means that the allocator memory of LV must find a new piece of contiguous memory each iteration of the loop. You're probably fragment your memory and so short of contiguous blocks of memory, leading to the release of messages from memory.

    For these types of tasks, I recommend having an array of fixed size that you initialize outside the loop and then use the Replace table subset in the loop for updating the values. This avoids the problem of allocating memory you use in.

    Alternatively, since I assume that you use the local variable to pass data to another loop, you can use a FIFO RT to manage data. A RT FIFO resembles a queue of LV, but it is designed so that you can keep determinism in your application. Set up an acquisition loop that exports data from the 9208 every 4ms in a RT FIFO. Then set up your processing loop to run at a slower pace - say every 200ms. The processing loop reads all the elements of the FIFO until it is empty every 200ms or a number of samples. The RT FIFO is fixed size, if you need to make it large enough to contain at least 200/4 = 50 samples. For more security, you should do several times bigger, maybe 200 samples. You can try different sizes of the FIFO and also to the different periods of your processing loop to your application's specifications.

    Using this method you do not have to create a counter to track items, since the reading of FIFO function can tell you how many items is in the FIFO and also when it is empty.

    I recommend you the example of Communication of FIFO of RT which comes with LabVIEW to get an idea of how to use these functions.

    Gerardo

  • How can insert different types of data in the table?

    Hello
    How can I insert different types of data in the table, (e.g., numeric and string) in the same index of a table.

    example:
    index0 car 10 green

    car red 11 index1
    Index2 car Blue 12

    where green car red and blue car as string and 10, 11 and 12 in the numeric form.
    then I extracted 10, 11 and 12 a digital table

    and, the green car, red car, blue car in a string array

    Help!

    Use 'Analysis of the chain' as in the picture as an attachment.  This will extract the number and color that you can add tables later.

  • How to check the amount of memory used during execution of the program to save data in the table?

    Hi any idea how to read or check use all memory space by accumulating the table with the data?

    My program works like this: -.

    (1) values are acquired and displayed on the table

    (2) the values are acquireduring the next event and appear in the next row in the table.

    (3) and this continues...

    Please notify

    Thanks in advance

    Hi astroboy,.

    You can use 'Flatten channel' to get the size of your data.

    Mike

  • Visible data in a 2D table but not in the Table connected control

    In the attached drawing, you will see that I take control of Table in table form, change the items to help replace a subset of table and then return the resulting table in the Table control.

    I can see my data in "Table of output" and a probe on this thread, but my Table control is empty.  The Table control is 10 columns of 50 lines.

    Can someone tell me why there is no data for the Table control?

    Please do not ask I post the VI because it is big, ugly and not mine to post.

    I can't believe.

    I couldn't see the data because it was out-of-frame.  My Control Panel flashed down a 30 line window and my data was in the first line only.

Maybe you are looking for