<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: reply to BEN ABOUT THE RESISTIVITY PROGRAM in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60224#M37372</link>
    <description>"utp" &lt;X&gt; schrieb im Newsbeitrag&lt;BR /&gt;news:506500000008000000A35C0000-1031838699000@exchange.ni.com...&lt;BR /&gt;&amp;gt; Ben,&lt;BR /&gt;&amp;gt; Following is the code of  the Resistivity measurement program that i&lt;BR /&gt;&amp;gt; had posted a question about.&lt;BR /&gt;&amp;gt;  Look at the loop in the following position in the program::&lt;BR /&gt;&amp;gt;          Outermost TRUE frame&lt;BR /&gt;&amp;gt;             Frame 2&lt;BR /&gt;&amp;gt;                 Frame 2&lt;BR /&gt;&amp;gt; Look at the loop taking input from the Q control on the front&lt;BR /&gt;&amp;gt; panel.Also the input is taken from another array , F .The program&lt;BR /&gt;&amp;gt; first calculates Qa and then searches array Q for the closest value&lt;BR /&gt;&amp;gt; and then remembers the index at which the closest value was found and&lt;BR /&gt;&amp;gt; from the same position in another array (f)gets a value Fa .Fb is&lt;BR /&gt;&amp;gt; calculated similarly.&lt;BR /&gt;&amp;gt; This takes foreveR(BUT IS NOT WRONG-JUST TAKES &lt;BR /&gt;TOO LONG , MY BOSS SAYS&lt;BR /&gt;&amp;gt; EARLIER IT DIDNT TAKE SO LONG)&lt;BR /&gt;&amp;gt; SO KINDLY HELP&lt;BR /&gt;&amp;gt; REGARDS&lt;BR /&gt;&amp;gt; UTPAL&lt;BR /&gt;&lt;BR /&gt;Utpal,&lt;BR /&gt;&lt;BR /&gt;concerning the code you mention, Ben's answer is correct, it is a sort of&lt;BR /&gt;interpolation which is done in your code. &lt;BR /&gt;&lt;/X&gt;</description>
    <pubDate>Sat, 21 Sep 2002 07:05:58 GMT</pubDate>
    <dc:creator>allaba</dc:creator>
    <dc:date>2002-09-21T07:05:58Z</dc:date>
    <item>
      <title>reply to BEN ABOUT THE RESISTIVITY PROGRAM</title>
      <link>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60222#M37370</link>
      <description>Ben, &lt;BR /&gt;Following is the code of  the Resistivity measurement program that i had posted a question about.&lt;BR /&gt; Look at the loop in the following position in the program::&lt;BR /&gt;         Outermost TRUE frame &lt;BR /&gt;            Frame 2 &lt;BR /&gt;                Frame 2&lt;BR /&gt;Look at the loop taking input from the Q control on the front panel.Also the input is taken from another array , F .The program first calculates Qa and then searches array Q for the closest value and then remembers the index at which the closest value was found and from the same position in another array (f)gets a value Fa .Fb is calculated similarly.&lt;BR /&gt;This takes foreveR(BUT IS NOT WRONG-JUST TAKES TOO LONG , MY BOSS SAYS EARLIER IT DIDNT TAKE SO LONG)&lt;BR /&gt;SO KINDLY HELP&lt;BR /&gt;REGARDS&lt;BR /&gt;UT&lt;BR /&gt;PAL &lt;BR /&gt;</description>
      <pubDate>Fri, 20 Sep 2002 16:20:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60222#M37370</guid>
      <dc:creator>utp</dc:creator>
      <dc:date>2002-09-20T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: reply to BEN ABOUT THE RESISTIVITY PROGRAM</title>
      <link>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60223#M37371</link>
      <description>If you are sure the case you mentioned is where all the time is being spent, you may want to experiment with using&lt;BR /&gt;&lt;BR /&gt;"Threshold 1d array" and/or "interpolate 1d array". These VI are faster than doing expilicitly.&lt;BR /&gt;&lt;BR /&gt;What has changed since when it didn't take so long?&lt;BR /&gt;&lt;BR /&gt;Are you using more memory thatn before?&lt;BR /&gt;&lt;BR /&gt;Are you GPIB devices on different cables or farther away?&lt;BR /&gt;&lt;BR /&gt;Do you have any idea how big the arrays in questions are?&lt;BR /&gt;&lt;BR /&gt;Ben &lt;BR /&gt;</description>
      <pubDate>Fri, 20 Sep 2002 18:16:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60223#M37371</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2002-09-20T18:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: reply to BEN ABOUT THE RESISTIVITY PROGRAM</title>
      <link>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60224#M37372</link>
      <description>"utp" &lt;X&gt; schrieb im Newsbeitrag&lt;BR /&gt;news:506500000008000000A35C0000-1031838699000@exchange.ni.com...&lt;BR /&gt;&amp;gt; Ben,&lt;BR /&gt;&amp;gt; Following is the code of  the Resistivity measurement program that i&lt;BR /&gt;&amp;gt; had posted a question about.&lt;BR /&gt;&amp;gt;  Look at the loop in the following position in the program::&lt;BR /&gt;&amp;gt;          Outermost TRUE frame&lt;BR /&gt;&amp;gt;             Frame 2&lt;BR /&gt;&amp;gt;                 Frame 2&lt;BR /&gt;&amp;gt; Look at the loop taking input from the Q control on the front&lt;BR /&gt;&amp;gt; panel.Also the input is taken from another array , F .The program&lt;BR /&gt;&amp;gt; first calculates Qa and then searches array Q for the closest value&lt;BR /&gt;&amp;gt; and then remembers the index at which the closest value was found and&lt;BR /&gt;&amp;gt; from the same position in another array (f)gets a value Fa .Fb is&lt;BR /&gt;&amp;gt; calculated similarly.&lt;BR /&gt;&amp;gt; This takes foreveR(BUT IS NOT WRONG-JUST TAKES &lt;BR /&gt;TOO LONG , MY BOSS SAYS&lt;BR /&gt;&amp;gt; EARLIER IT DIDNT TAKE SO LONG)&lt;BR /&gt;&amp;gt; SO KINDLY HELP&lt;BR /&gt;&amp;gt; REGARDS&lt;BR /&gt;&amp;gt; UTPAL&lt;BR /&gt;&lt;BR /&gt;Utpal,&lt;BR /&gt;&lt;BR /&gt;concerning the code you mention, Ben's answer is correct, it is a sort of&lt;BR /&gt;interpolation which is done in your code. &lt;BR /&gt;&lt;/X&gt;</description>
      <pubDate>Sat, 21 Sep 2002 07:05:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60224#M37372</guid>
      <dc:creator>allaba</dc:creator>
      <dc:date>2002-09-21T07:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: reply to BEN ABOUT THE RESISTIVITY PROGRAM</title>
      <link>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60225#M37373</link>
      <description>"utp" &lt;X&gt; schrieb im Newsbeitrag&lt;BR /&gt;news:506500000008000000A35C0000-1031838699000@exchange.ni.com...&lt;BR /&gt;&amp;gt; Ben,&lt;BR /&gt;&amp;gt; Following is the code of  the Resistivity measurement program that i&lt;BR /&gt;&amp;gt; had posted a question about.&lt;BR /&gt;&amp;gt;  Look at the loop in the following position in the program::&lt;BR /&gt;&amp;gt;          Outermost TRUE frame&lt;BR /&gt;&amp;gt;             Frame 2&lt;BR /&gt;&amp;gt;                 Frame 2&lt;BR /&gt;&amp;gt; Look at the loop taking input from the Q control on the front&lt;BR /&gt;&amp;gt; panel.Also the input is taken from another array , F .The program&lt;BR /&gt;&amp;gt; first calculates Qa and then searches array Q for the closest value&lt;BR /&gt;&amp;gt; and then remembers the index at which the closest value was found and&lt;BR /&gt;&amp;gt; from the same position in another array (f)gets a value Fa .Fb is&lt;BR /&gt;&amp;gt; calculated similarly.&lt;BR /&gt;&amp;gt; This takes foreveR(BUT IS NOT WRONG-JUST TAKES TOO LONG , MY BOSS SAYS&lt;BR /&gt;&amp;gt; EARLIER IT DIDNT TAKE SO LONG)&lt;BR /&gt;&amp;gt; SO KINDLY HELP&lt;BR /&gt;&amp;gt; REGARDS&lt;BR /&gt;&amp;gt; UTPAL&lt;BR /&gt;&lt;BR /&gt;Utpal,&lt;BR /&gt;&lt;BR /&gt;concerning the code you mention, Ben's answer is correct, it is a sort of&lt;BR /&gt;interpolation which is done in your code.&lt;BR /&gt;The calculation is done in an extremely inefficient manner in the code. I&lt;BR /&gt;compared it with an optimised code and found that the speed differed by a&lt;BR /&gt;factor of 10. The absolute numbers were 12 ?sec for the optimised code and&lt;BR /&gt;117 ?sec for the code in your program. But this was under Labview 6.1 on a&lt;BR /&gt;2.3 GHz pentium, and you talked about LV 4 (on a probably much slower&lt;BR /&gt;machine).&lt;BR /&gt;HOWEVER, the calculation speed depends on the value of the input number Qa,&lt;BR /&gt;since a long array (roughly 6000 elements) has to be searched through. For&lt;BR /&gt;Qa values close to 1 (which you probably have for a "well behaved" van der&lt;BR /&gt;Pauw sample) the code in your program takes twice as long as the numbers&lt;BR /&gt;above indicate (whereas for a Qa of, say, bigger than 5000 the speed is much&lt;BR /&gt;faster).&lt;BR /&gt;&lt;BR /&gt;Now suppose your PC is a factor of 10 slower and suppose further that LV 4&lt;BR /&gt;is another factor of 10 slower than LV 6.1 (it is doing lots of 'array&lt;BR /&gt;subset' operations in your code) and considering further that the algorithm&lt;BR /&gt;is performed 4 times in your program, we might expect a speed of 2 x 10 x 10&lt;BR /&gt;x 4 =  800 slower than the numbers above, i.e. 800 x 117 ?sec which is appr,&lt;BR /&gt;0.1 sec.&lt;BR /&gt;&lt;BR /&gt;Therefor I believe that the awfully long times you report are not due to&lt;BR /&gt;this (admittedly very inefficient piece of) math code.&lt;BR /&gt;&lt;BR /&gt;I attach 2 png pictures, showing&lt;BR /&gt;a) the optimised code&lt;BR /&gt;b) how to convert the two big array constants in your code into a form&lt;BR /&gt;suitable for the optimised code&lt;BR /&gt;&lt;BR /&gt;You should run b) only once of course and then store array [(Q,f)] in your&lt;BR /&gt;program.&lt;BR /&gt;&lt;BR /&gt;If you have access to Labview 6.0 or 6.1, I could also send you the code&lt;BR /&gt;directly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Franz&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[Attachment Calculate interpolated f(Q)d.png, see below]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[Attachment Make Q,f arrayd.png, see below]&lt;BR /&gt;&lt;/X&gt;</description>
      <pubDate>Sat, 21 Sep 2002 07:05:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/reply-to-BEN-ABOUT-THE-RESISTIVITY-PROGRAM/m-p/60225#M37373</guid>
      <dc:creator>allaba</dc:creator>
      <dc:date>2002-09-21T07:05:59Z</dc:date>
    </item>
  </channel>
</rss>

