Making the vi faster - read from txt or array or binary reading

I prepared a vi that reads a table from txt file and find the desired values corresponding independent two variables by interpolation-attached. This via reads the txt file for each calculation. I wonder that is this process slow or enough for me. Becasue I add this via to a daq vi and I send measurement values from this via to the interpolation.vi. I acquired samples once in a sec. Or is this more convenient to read the txt once and after writing values to arrays and use these arrays as a constant (Right click array-->Data Operation-->Make current value default) in the vi? Which one is faster? And also, I wonder that instead of reading from txt file, is it a good way to convert my values in txt to binary data and read this binary values by vi? Last thing, how can I learn a vi program run-spend time?
Egemen
Attachments:
interpolation1.vi ‏20 KB
interpolation2.vi ‏29 KB
R600a_bar_P_0,1_sat_refprop_labview.txt ‏20 KB

nathand wrote:
newbieeng wrote:
Last thing, how can I learn a vi program run-spend time?
Reordering your words a bit... Are you asking how to measure how long it takes to run your VI?  You can do this with a sequence structure (one of the few reasonable uses for them): in the first frame put a "Tick Count" or "Get Date/Time in Seconds" function.  In the next frame put your code.  In the last frame, put the same function that you placed in the first frame.  Subtract the time value in the first frame from the value in the last frame; the difference is the time it took to run your VI in milliseconds or seconds (depending on which time function you used).
Another option is the VI Profiler, under Tools -> Performance and Memory.  Open that window, click "Start," run your code, and click "Stop."  It will report how much time it took to run your VI along with other timing information.
Thank you nathand. I am sorry for usage of wrong order. I tried your suggestion and it works great. The first vi takes 4-6 msec. And the second one takes just 0 msec because it does not calculate anything, including just constant values.
Egemen

Similar Messages

  • I am using duel thunderbolt displays with a MacBook Pro. I only have the option to have sound come from one or the other. Has anyone thought of making the left channel come from both speakers on the left Monitor and the same of the right? If yes, how is t

    I am using duel thunderbolt displays with a MacBook Pro. I only have the option to have sound come from one or the other. Has anyone thought of making the left channel come from both speakers on the left Monitor and the same of the right? If yes, how is that done? The MacBook Pro could even be a center channel if configured in that order.

    See the following thread on the same topic:
    2 Thunderbolt displays   MBP = sound coming from both displays?

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Making the best quality DVD from FCP

    Can anyone suggest how to make the highest quality DVD from an HDV FCP project?

    It's a fun website that I've seen people use recently : http://lmgtfy.com/
    It basically generates a url that you can post onto forums etc, and when you click on it, it takes you to the 'mock' google page, followed by the results. It's a polite but fun way of saying "Don't be so lazy, and do a search!". No offense intended to the OP.
    The Bruce image is one i had uploaded to Tinypic.com ages ago.
    Glad you like it!

  • Making the switch to Mac from pc

    Hey gang, I've had enough of microsoft and windows. It seems like everytime I get and install a windows update, my system gets worse. At this point it's very unstable and always crashing/rebooting. That, and viruses and maintaining all the various programs that go along with windows (ad-aware, spybot, norton anti virus) have forced me over the edge.
    I figure most of my software won't work with the new window's vista, so it's time to move to Apple. I hope some of you can answer some questions for me.
    1. I'm taking online college courses and it says that I can use Firefox for my browser, so I assume all should be well with my mac and the classes? I can't imagine it wouldn't.
    2. I have to uses ms word, powerpoint and excel for school and work, so I will buy it for mac. If I create a document on the mac using ms word, excel or powerpoint, will I be able to access/modify it on a pc using the pc versions of these programs? I have to use a pc at work and the ability for these two systems using the same programs to be compatible is imperative.
    3. Last but not least, I use a program that came with my camera, it's called Adobe Photoshop Elements 2.0 It says its for windows or macintosh, but it's probably 5 years old. Do you think it would work with a new version of mac?
    Thanks in advance, I'm a total knothead when it comes to computers and need all the help I can get.
    Steve

    My wife recently started taking on-line classes. She was a diehard Windows user for years, but she was tired of the maintenance, and wanted a machine just for school. She has run into only a few obstacles. Her institution uses Blackboard. Blackboard works fine with Safari, but does not provide the advanced editing tools that are available in Internet Explorer. The recent Firefox betas provide the advanced editing tools that her PC counterparts see, so the final version (due soon) should work even better.
    With MS Office... She is using Office 2004, and it has worked OK. In the preferences, it is possible to set it so that it saves with the ".doc" extension by default. If you let it save in its normal format, it does not include the extension. If you upload the file for Windows users, they will complain that they can't open it. It is also possible to automatically save in older formats with an extension in Office 2008... Office 2007/2008 save in the DOCX format, which is not even remotely compatible with older versions.
    As a "just in case"... She has a copy of Windows XP in Parallels with Office 2003. She has not had to use this, but it's there, just in case. We maxed out the RAM in her Macbook to 4GB ($100 from Crucial), and it is more than fast enough.
    As a new Mac user, I would check out: NeoOffice, OpenOffice 3 (beta), VirtualBox...
    My photos are my most important files, and I have been taking digital pictures since long before it was popular. My collection goes back to 1996, and I have about 20,000 pictures and short video clips- mostly of the kids. I presently use iPhoto for managing my archives, and for making minor adjustments. I would not use anything else... When I need to make major changes, I use the Gimp. It is not an Apple application, and I became familiar with it in my Linux days. Check it out- It may or may not work for your needs.
    Steve

  • How can i sort out the N lowiest elements from an 1D array faster than using the build in sort function (1D-array) in Labview?

    I need an algorithm that is based on the same sorting-algorithm that Labview uses (or one that is just as fast) but it only needs to sort out the N lowiest elements (and the N-element output array don't need to be sorted).
    /Jonas

    I want all three zeros in the output. You can se the algorithm that I'm looking for as a soft version of Labviews own sort algorithm that only gives you the N (always less then the length of the array) lowiest values as output.If two elements contain the same small value both should be sorted out.
    /Jonas

  • How do i get my mouse wheel to stop making the song Fast forward and rewind?

    the song plays, I start surfing the web and if i use the scroll wheel on my mouse (up or down) it moves the play possition of the song foreward or backward.

    hey Lodinick,
    I'm actually trying to get my mouse to do what you're complaining about. My search led me to your post, LOL.
    I have a programmable logitech and I can't seem to find an option to assign the scroll functionality. I can change what happens when I click the scroll wheel, but not what happens when I scroll it up or down.
    To help you:
    1. If you have a programmable mouse, try digging in the software for that mouse.
    2. If not try looking in Windows mouse settings.
    If I find how to make it work on my mouse I'll try to remember and come tell you how to undo it.
    // Juston

  • Get the 2 highest speed from linkedlist?

    I have a linkedlist with Car object's. Now all these cars have a int speed value for their topspeed. My question goes : How do I get the 2 fastes cars from this linkedlist?

    I made this test class and it worked just fine:
    import java.util.*;
    class ObjektTest
         LinkedList liste = new LinkedList();
         Sorter sorter=new Sorter();
         ObjektTest()
              Person p=new Person("Erol",25);
              liste.add(p);
              Person p2=new Person("Lars",32);
              liste.add(p2);
              Person p3=new Person("Frank",20);
              liste.add(p3);
              for(int i=0;i<liste.size();i++)
                   System.out.println(liste.get(i));
              Collections.sort(liste,sorter);
              for(int i=0;i<liste.size();i++)
                   System.out.println(liste.get(i));
         public static void main(String[] aslan)
              new ObjektTest();
    class Person
         String navn;
         int alder;
         Person(String navn,int alder)
              this.navn=navn;
              this.alder=alder;
         public int getAge()
              return alder;
         public String toString()
              return navn+" "+alder;
    class Sorter implements Comparator//sorter med st�rste alder f�rst
         public int compare(Object o1, Object o2)
              Person p1=(Person)o1;
              Person p2=(Person)o2;
    if (p1.getAge() < p2.getAge())
                   return 1;
         else if (p1.getAge() > p2.getAge())
              return -1;
              else return 0;
    public boolean equals(Object obj)
              return super.equals(obj);
    }

  • Making Multiple Digital Signatures Read-only in Form (Acrobat 9)

    I have created a form which includes two (2) digital signature fields.  What needs to occur with the form is Person1 fills the form and then digitally signs it thereby making the form fields read-only .  Person2 then digitally signs the form which should make Person1's digital signature read-only.
    Here's what I've done:
    1) For the Person1 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields except these> and selected the Person2 digital signature field.
    2) For the Person2 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields> since once Person2 signs the form I do not want Person1 to be able to clear the digital signature and make changes to the form.
    Here's what actually occurs:
    Step 1 above works fine.  Once the signature is applied all the form fields are read-only except for the Person2 digital signature field.
    The problem is that after Person2 digitally signs the form, even though I selected all fields as read-only, Person1 can 'clear' their signature which leaves all the form fields available for editing and leaves Person2's digital signature still on the form.
    I honestly don't care about 'validating' signatures on this form since it's going to be printed but I cannot allow Person2's signature to remain on the form and allow Person1 to edit the form.
    --Mike.

    Hi!
    I have the same problem. Have not been able to figure it out, although tried everything.
    Hope somebody can help
    - MackeMan

  • Hi this is alamzeb , i have purchased OS X mountain lion from apple store and installed it on my macbook with the expect ion of making my macbook faster but it become more slow by installing os x , how can i solve this problem

    Hi this is alamzeb , i have purchased OS X mountain lion from apple store and installed it on my macbook with the expect ion of making my macbook faster but it become more slow by installing os x , how can i solve this problem

    alamzeb wrote:
    Hi this is alamzeb , i have purchased OS X mountain lion from apple store and installed it on my macbook with the expect ion of making my macbook faster but it become more slow by installing os x , how can i solve this problem
    Have a read under the threads on the Right hand side of this page under 'More Like This'
    Pete

  • Read from .txt file and output the content as two arrays

    I am using the contoured move to control the x-y stage. The trajectory datas for x and y axis are generated using my interpolation program and it is stored in a .txt file as two columns. What I want to do is read .txt file and output the content of this file as two arrays. Is there anyone has any ideas? Thanks, the .txt file is attached.
    Attachments:
    R.75.txt ‏172 KB

    Hi Awen,
    This is quite easy to do, you can merely use the "read from spreadsheet file" function to get a 2D array (2 columns and n rows) and then use the index array function to get whatever row/colums you want..
    Hope the attached VI helps you
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    read sprdsheet file.vi ‏27 KB

  • The volume icon sticks on my screen making it hard to read emails, games and such. Also ads feeeze adn I have to continually shut my iphone off and turn it back on to be able to move from advertisement to another screen

    The volume icon stucks on my screen making it hard to read emails, games, etc....also advertisements freeze on my screen so I have to turn the phone off then back on to move to a different screen....any suggestions??

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How to make this faster?? read millions of record from txt file

    Hi there,
    I got an issue. There is a txt file contains 2 million records, I also got another file contains over 10000 numbers. Now, I need to compare this 10000 numbers with that 2 million records if any records contains a number which belongs to 10000 number set, i retrieve this record and keep it. later on, when i finish the comparison i'll write all the result records into a txt file.
    What kind of data structure shall i use to keep the records and numbers? how to make the comparison quicker? Any idea will do!
    Thanks!

    if i were to do it, i will insert bout the records into the db. then do an sql statement on the two tables to get the results. Then get the rs and output it to another text file.
    just my opinion. not sure if this is faster.
    Message was edited by:
    clarenceloh

  • My iphone 4S has problem in making and receiving the calls. While making the call , call fails and netwrok disappears. Like wise no voice is heard for incoming calls. This happened after return from the overseas travel.

    My iphone 4S has problem in making and receiving the calls. While making the call , call fails and netwrok disappears. Like wise no voice is heard for incoming calls. This happened after return from the overseas travel.

    Hello SamSax
    Check out the assist page below for troubleshooting call connectivity.
    Calls and connection issues
    http://www.apple.com/support/iphone/assistant/calls/
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Scenario to read from txt-file and create a sales order

    Hi,
    i have started creating a scenario to read from an txt-file and to create a sales order.
    When i activate my scenario, i get the following message :
        no scenario step (vBIU) associated for this step for the incoming system (SysId)
    When i look into the detailed xml-file i see that all the records are read from the file, but there is no next step to be treated.
    Has somebody any idea how this come ?
    -<Msg MessageLog="true" msglogexcl="false" logmsg="0009" recording="true" BeginTimeStamp="20111202095144" MessageId="11120209514499820828C0A801674F24" xmlns="urn:com.sap.b1i.vplatform:entity">-<Header><msglog b1ifactive="true" always="false" step="Default message log"/>-<Resumption><starter ipo="/vP.0010000138.in_FEAN/com.sap.b1i.vplatform.runtime/INB_FI_EXST_ASYN_NAM/INB_FI_EXST_ASYN_NAM.ipo/proc"/></Resumption><IPO tid="11120205535899820808C0A801678C54" Id="INB_FI_EXST_ASYN_NAM"/><Sender Id="0010000138"/><Inbound file="ORDERS_TEST" ext="csv" path="C:\TEMP\In" pltype="txt" wrap="" deli=";"/></Header>-<Body><Payload Type="File exist" Role="T"/>-<Payload Role="S">-<io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="txt">
    -<row>
    <col>OH</col>
    <col>0000087077</col>
    <col>201110041205</col>
    <col>220</col>
    <col>9</col>
    <col>201110191702</col>
    <col>8710624300012</col>
    <col>8714252008609</col>
    <col>8710624300012</col>
    <col>8714252008609</col>
    <col>8710624300012</col>
    <col>N</col>
    <col>N</col>
    <col>N</col>
    </row>
    -<row>
    <col>OL</col>
    <col>1</col>
    <col>8711715844378</col>
    <col>20</col>
    </row>-<row>
    <col>OL</col>
    <col>2</col>
    <col>8711715844392</col>
    <col>60</col>
    </rowrow>
    <col>OL</col>
    <col>16</col>
    <col>8710251791092</col>
    <col>280</col>
    </row>
    </io>
    </Payload>
    </Body>
    </Msg>
    This is my final atom :
    <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:utils2="com.sap.b1i.bpc_tools.Utilities" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="" utils2:force=""><xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output><xsl:param name="atom"></xsl:param><xsl:param name="sessionid"></xsl:param><xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"></xsl:variable><xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable><xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable><xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"></xsl:variable><xsl:template match="/">
    <Msg xmlns="urn:com.sap.b1i.vplatform:entity">
    <xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
    <xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
    <Body>
    <xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
    <Payload Role="R" id="{$atom}">
    <xsl:call-template name="transform"></xsl:call-template>
    </Payload>
    </Body>
    </Msg>
    </xsl:template><xsl:template name="transform">
    <FinalAtomResult xmlns="">
    <BOM>
    <BO>
    <AdmInfo>
    <Object>17</Object>
    <Version>2</Version>
    </AdmInfo>
         <Documents>
         <row>
         <DocDate>
              <xsl:copy-of select="$msg/io/row[0]/col[2]/text()"></xsl:copy-of>
         </DocDate>
         <DocDueDate>
              <xsl:copy-of select="$msg/io/row[0]/col[5]/text()"></xsl:copy-of>
         </DocDueDate>
         <CardCode>KD10251</CardCode>
         <NumAtCard>
              <xsl:copy-of select="$msg/io/row[0]/col[1]/text()"></xsl:copy-of>
         </NumAtCard>
         <U_PMX_JD_COMP>32</U_PMX_JD_COMP>
         </row>
                          </Documents>
         <Document_Lines>
         <xsl:for-each select="$msg/io/row">
         <row>
         <BarCode>
              <xsl:copy-of select="$msg/io/row[*]/col[2]/text()"></xsl:copy-of>
         </BarCode>
         <Quantity>
              <xsl:copy-of select="$msg/io/row[*]/col[3]/text()"></xsl:copy-of>
         </Quantity>
         </row>
         </xsl:for-each>
         </Document_Lines>

    Mike,
    you were right, you may not specify the extension of a file.
    Another thing i detected is that the loop of my data start with the index 1 instead of 0 !!!
    In this scenario, i have to read all the lines of the file and each time i should do a SQL-query,
    so that i can use the result to build my sales document.
    Do you know if it this is possible or have you any idea how to do this ?
    thx,
    Mario

Maybe you are looking for