Is there a way to add a column in a measurement file?

Hello,
Suppose I take several measurements from 3 channels (at the same time) and they all get saved in a text (.LVM) file using the "Write to Measurement File" method.
For ex (note that I left the second column empty (with zero's) on purpose):
X_Value    Untitled    Untitled 1    Untitled 2    Untitled 3    Comment
0.000000    0.000000    1.000000    2.000000    4.000000
1.000000    0.000000    1.100000    0.200000    0.500000
2.000000    0.000000    1.250000    2.100000    1.300000
. (etc)...
...and later (in another VI) you retrieve this information, do some calculations  and want to save this new data in the same file.
For ex:
X_Value    Untitled    Untitled 1    Untitled 2    Untitled 3    Comment
0.000000    1.245000    1.000000    2.000000    4.000000
1.000000    0.304000    1.100000    0.200000    0.500000
2.000000    3.340000    1.250000    2.100000    1.300000
...so that now the second column has the calculated data
Is that possible?
(and how?)
Thanks!

Since you already have zeroes in the file, the space and reserved and it is possible to do what you want to do (it would also be possible without the zeroes, but more work).  It will be very slow.  Before you start, you may want to read the LVM specification.  The general idea is the following:
Find the start of your data.  You can do this by searching for the "***End_of_Header**" tags.  Depending on your file, there will be one or two before your data starts.  After the End_of_Header, the next line is your column headers, the next your data.  Position the file pointer at the beginning of the first line so you can start to process the file a line at a time.
Read in one line.
Find the position of the first tab in the string and add one.
Move your file pointer this many bytes forward in the file.
Write your new value (be careful to use the correct number of digits)
Move your file pointer to the head of the next line (you can calculate this each time, but it will be a fixed number based on how many columns you have left).
Repeat 2 - 6 until you hit the end of the file.
If you need help with any of the steps, let us know.  The string and file I/O palettes should have all the functionality you need.
Message Edited by DFGray on 02-22-2008 07:17 AM
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • Is there a way to add a QR code to a file in photoshop?

    Is there a way to add a QR code made from a website generator (i.e. qrstuff.com)? When I tried to add it to the file, it said "Could not place the document because the current document has an input-only color profile."
    Is there a way to get around this or work with it in some way?

    There is not.
    Even with the high res art from the iTune Store, I believe the file size increase is less than 2%, at least for my library.

  • Is there a way to add a column after a filled DataTable from SQL with the same rows?

    My problem is that not to add rows like filled by SQLDataAdapter at the same row in DataGridView. How to make that? I showed below the details with my code also a screen shot, which shows the rows differences from the origin one.
    I don't want to add an expression as column behave in my sql script to get what I need with query result. I don't want to obtain that way.
    using (SqlConnection c = new SqlConnection(ConnStrMSSQL))
    c.Open();
    // 2
    // Create new DataAdapter
    using (SqlDataAdapter a = new SqlDataAdapter("SELECT SIPNO, SERINO, TARIH FROM SNOHAREKETLER WHERE Cast(TARIH as DATE) BETWEEN '2015/03/20' AND '2015/03/20' AND (TEZNO = 'T23' OR TEZNO = 'T31') AND CIKTI is null", c))
    // 3
    // Use DataAdapter to fill DataTable
    DataTable t = new DataTable();
    a.Fill(t);
    t.Columns.Add("MyColumn", typeof(string));
    DataRow workRow;
    int iGetCount = t.Rows.Count;
    for (int i = 0; i <= iGetCount - 1; i++)
    workRow = t.NewRow();
    workRow["MyColumn"] = i;
    t.Rows.Add(workRow);
    dataGridView1.DataSource = t;

    The extra column isn't applied to only certain rows.  The columns of a table identify what data each row will contain.  Hence adding a column to the table automatically adds them to the rows.  What you're seeing is that all the initial rows
    aren't being assigned a value so they retain their default value of null.  Later you enumerate the rows of the existing table and call AddRow which adds new rows.  This isn't adding columns, but rows.
    To generate values for the existing rows you should ideally simply pass the data back from the database.  DT computed columns can be difficult to set up as it is limited to what it can do.  If you want to use a computed column on the Datatable
    itself then define the column as a computed column and every row will calculate its own value.
    DataTable data = GetData();
    //Add elapsed time column
    var col = new DataColumn("ElapsedTime", typeof(TimeSpan), "expr");
    data.Columns.Add(col);
    dataGridView1.DataSource = data;
    The issue you will run into however is that calculating a diff on DateTime doesn't work in a computed column as the expression doesn't support the necessary functions.  You can google for how people solved this if you are interested in alternatives. 
    Most people just tend to add the column and then hook into the various change events to update the value as needed.

  • Is there any way to add the column in the verifier table?

    Hi folks,
    I am new to WFR.I am using AP solution project.While sending my invoice to WFR,I can see that one column is not picked by the verifier table.Can I use Supervise Learning to add the column there?Will this configuration be supported by Oracle then?

    Hi Ajay,
    I understood that we cannot add FY for header details.
    Cleint requirement was to add special periods (client is happy with this), so I have done added periods and also I need make the
    file description changes in Planning layout because integrated excel is active.
    My doubt is how to Transport this layout and profile changes, I could see "transport from" in planning layout menu.
    Is there any additional things I have to do for transporting layout changes.
    Regards
    Shanu

  • I create a birthday calendar in iCal and then click on it in iphoto at the begining of the calendar project each year.  Some how the birthday did not populate the photo calendar.  Is there a way to add the birthday iCal calendar into the calendar project?

    I created a birthday calendar to use in iphoto for calendar.  When a new calendar project is started each year, I click on it in.  Some how the birthday did not populate the photo calendar this year.  The photo calendar is almost complete.  Is there a way to add the birthday iCal calendar into the calendar project? I would prefer not to start over.

    Hi,
    If you first select the calendar on the left, so that its background is highlighted blue/grey, when you make a new events they should be added to that calendar.
    Best wishes
    John M

  • Is there a way to add two windows in the same window?

    is there a way to add two windows in the same window?

    what do you mean by your first use of the word "window"? do you mean a visible frame? a section of the gui that the user doesnt see?
    or perhaps you mean you want to add multiple tabs to a single window, so that switching between tabs shows different windows?

  • Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?

    Is there a way to add to the existing values in a container when a LabVIEW prototype (cluster) changes?
    I have a cluster with 90 values..  ninety!  yes that many.
    Change one bloody value and the prototype changes in the TestStand step...  Reload the prototype and guess what happens??!!??
    All the bloody values get reset to defaults!  AAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHH!
    If it was in one place, I could survive the ordeal.  But I have to change bloody prototypes in many places!!!!
    more AAAAAAAAAAARRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!
    I can't even copy the bloody values!!!!!!!  AAAAAAAAAAAARRRRRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!
    Are there any tricks that I am not aware of, or have forgotten over the years, or...  ...   something??!!??!???!!
    If there are none, I will have to post an improvement to TestStand..  I should mention I am using an older version (4.1).

    Hmmmmmmmmmmmmmmmm,
    I am not not very famous with LV and its cluster types.
    So no idea if this works (it works for DataTypes updates very well and a LV cluster is Data Type so.... maybe)
    Make a copy of the step that has to be modified to an new sequencefile. 
    Make modifications the in the copy.
    Now you should have the same DataType Name but other contents in the container. Save it.
    Normally there should be a message box that tells you that version has been incremented. - Accept it.
    Set in StationOptions-File "Allow Automatic ...." to Never.
    Open original sequencefile. Now the there must be a type conflict. Accept/Apply to all  "Use Current Loaded.."
    You have updated the type.....
    Hope this worked,
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • Is there a way to add/delete words from the predictive text ?

    Is there a way to add/delete words from the predictive text options that my iPhone is giving me? I'm using an iPhone 6 Plus with iOS 8.
    There are specific words that are popping up in the area right above the keyboard where it displays 3 word suggestions to choose from. This area seems to suggest words that I have typed before, I'd like to remove these words. Default seems to select the word in the center and when I'm typing fast on occasion it will recommend and select words that I don't need to use.
    Any help would be appreciated.

    999753 wrote:
    I know in 10g delete is added but in 9i i can only work with UPSERT( update, insert)
    is there a way to add delete into 9i MERGE? or somehow encapsulate it?
    Thank youI would suggest upgrading to a supported version of the database. 9i has been unsupported for many many years now.
    And to answer your question... to the best of my knowledge, there is no workaround. It works as it works.

  • Is there a way to add a single jar to an existing shared library (war)?

    Hello,
    Is there a way to add a single jar to an existing and already deployed shared library (war) in weblogic directly?
    Basically, instead of building and deploying the war each time a new jar should be added to the list of jars present in the war and deploy it in weblogic, is it possible to make the process more automatic and efficient by just adding the new jar to the existing deployed war (no matter if the consumers must be reloaded)?

    Extract the WAR file and rearchive with theJAR file included.

  • Is there a way to add roman numerals to the footer? (eg. page i of n)

    Is there a way to add roman numerals to the footer? (eg. page i of n)

    Hi Emily ,
    You may face challenges doing this task in Acrobat .
    If you have created the PDF from word ,I would recommend doing the page numbering in Word, not Acrobat, since you have more flexibility with that program.
    Or the second option is ,if you know how to play around with java script.Here is the code for the same.
    Yeah, it's possible. Create a unique text field on each page with this code as the custom calculation code:
    event.value = romanize(event.target.page+1);
    Then place this function at the doc-level (I didn't write that one):
    function romanize(num) {
        if (!+num)
            return false;
        var digits = String(+num).split(""),
            key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM",
                   "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC",
                   "","I","II","III","IV","V","VI","VII","VIII","IX"],
            roman = "",
            i = 3;
        while (i--)
            roman = (key[+digits.pop() + (i * 10)] || "") + roman;
        return Array(+digits.join("") + 1).join("M") + roman;
    Regards
    Sukrit Dhingra

  • Is there any way to set default column widths in the Finder's Column view

    When my Finder windows open in column view, all the columns are always VERY wide. I have to then spend time resizing them to a managable width. Is there any way to set default column widths in the Finder's Column view?
    <Re-Titled By Host>

    No, because you can't set a columns view default.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Is there any way to add a digital copy movie to an iPhone without syncing with my iTunes library? I use iCloud to sync, not iTunes. So when I go to sync movies, it deletes the other ones I already have loaded on the iPhone. Thanks.

    Is there any way to add a digital copy movie to an iPhone without syncing with my iTunes library? I use iCloud to sync, not iTunes. So when I go to sync movies, it deletes the other ones I already have loaded on the iPhone. Thanks.

    or is there a way to upload the digital copy to store in my iCloud account?

  • Importing a lot of video clips from a Sony camera to FCE; during the Log and Transfer process, is there a way to add multiple clips to the browser instead of one at a time?

    Importing a lot of video clips from a Sony camera to FCE; during the Log and Transfer process, is there a way to add multiple clips to the browser instead of one at a time?

    Select one and click cmd-A which selects them all.
    Then click the import button if it hasn't started already.

  • Is there any way to add PO no and  corresponding line item of PO in VL32N?

    Hello,
    The scenario is, we have created the IBD and deleted one of the line item and saved it.
    We went to VL32N and added the missing line item to IBD but PO number and corresponding item number of PO field of newly added line items are grayed out. We are not able to add PO number in VL32N screen.
    Is there any way to add PO number and corresponding line item of PO in VL32N screen of IBD? Our client does not want to create new IBD for same PO. He wants to add the line item in same IBD.
    Thanks,
    Milind
    Edited by: Csaba Szommer on Aug 27, 2011 4:52 PM

    Hello,
    This thread is pending since long time. No body has answered my question. Can any body suggest me?
    Thanks
    Milind

Maybe you are looking for