<?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: guess number in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699745#M1040407</link>
    <description>&lt;P&gt;Thank you again. No I did not. Sorry!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2017 17:38:19 GMT</pubDate>
    <dc:creator>anny321dum</dc:creator>
    <dc:date>2017-10-06T17:38:19Z</dc:date>
    <item>
      <title>guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699703#M1040385</link>
      <description>&lt;P&gt;I have developed a vi where user will guess the number and if the guess is correct it will report as win and if wrong the user will try again using state machine architecture. But the problem is for any number I guess, it report success. I am trying hard to understand why that is happening. Also I want user to give only 5 chances how can I do that. Can anyone please help me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance for your help&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:09:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699703#M1040385</guid>
      <dc:creator>anny321dum</dc:creator>
      <dc:date>2017-10-06T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699718#M1040395</link>
      <description>&lt;P&gt;Try using "highlight execution" to see what's happening to the random and guess numbers in the "enter guess" and "give a hint" cases.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:39:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699718#M1040395</guid>
      <dc:creator>arteitle</dc:creator>
      <dc:date>2017-10-06T16:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699720#M1040396</link>
      <description>&lt;P&gt;Another hint. Look what the tunnel output is if unwired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/28d2273410879c6aa8d28d86144201221e2f8f94/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32313533323769413833393546303231394134423537422f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:41:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699720#M1040396</guid>
      <dc:creator>jamiva</dc:creator>
      <dc:date>2017-10-06T16:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699721#M1040397</link>
      <description>&lt;P&gt;In "check guess", you are resetting both oranges wires to zero, meaning they will be equal (and equal zero) from then on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(You also need to do something about your &lt;A href="https://forums.ni.com/t5/BreakPoint/LabTOONS-The-secret-life-of-LabVIEW-objects/m-p/724366#M5642" target="_blank"&gt;greedy loops&lt;/A&gt;. A simple program like that does not need to use 100% of a CPU core, spinning the loops as fast as the computer allows.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:47:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699721#M1040397</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2017-10-06T16:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699740#M1040404</link>
      <description>&lt;P&gt;Thank you very much for your reply. I still can't figure out what to put there at orange wires.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:31:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699740#M1040404</guid>
      <dc:creator>anny321dum</dc:creator>
      <dc:date>2017-10-06T17:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699741#M1040405</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/584177"&gt;@anny321dum&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you very much for your reply. I still can't figure out what to put there at orange wires&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Whatever the current value was coming from the right side. Just wire across!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(did you understand my note about timing?)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:32:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699741#M1040405</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2017-10-06T17:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699745#M1040407</link>
      <description>&lt;P&gt;Thank you again. No I did not. Sorry!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:38:19 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699745#M1040407</guid>
      <dc:creator>anny321dum</dc:creator>
      <dc:date>2017-10-06T17:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699772#M1040415</link>
      <description>&lt;P&gt;A while loop will execute over and over as fast as your computer's processor is able, consuming much computing power and slowing everything else down. In cases like this where the loop is just waiting for input, it's a good idea to add a brief pause in the loop (say, 100 ms) to relieve the CPU of that needless work.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 18:14:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699772#M1040415</guid>
      <dc:creator>arteitle</dc:creator>
      <dc:date>2017-10-06T18:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699844#M1040439</link>
      <description>&lt;P&gt;Yes, your inner and outer loops are spinning as fast as the computer allows Millions of times per second. If you would place a 50ms wait in the loop, it would spin millions of times less without a perceptible difference seen by the user. Your PC will run cooler, you battery will last longer, and all your other running process don't have to fight for breadcrumbs of CPU time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also have a look at your architecture. You don't need the loop inside "enter uess" (sic) at all, you can use the state enum to either go back to the "enter uess" or forward to "Check guess", depending on the boolean state. No inner loop needed at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that the text&amp;nbsp;"enter number between ..." needs to appear when the program starts. Right now it won't unless the confirm button is pressed, at which time it gets overwritten a nanosecond later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also need to ensure that&amp;nbsp;other messages don't get overwritten by&amp;nbsp;new messages before the user has a chance to read them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your sequencing seems wrong too. for example the in the "give a hint" case, you need to go back to "enter uess", not to "check guess". Right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your numbers needs to be an integer once rounded, else it is very unlikely to ever guess right, because there are a near infinite number of DBLs between 1 and 10.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 21:45:19 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699844#M1040439</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2017-10-06T21:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699864#M1040446</link>
      <description>&lt;P&gt;Here's a quick draft to give you some ideas. If you want to limit the number of guesses, this can be done by keeping count in another shift register and switch states accordingly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(There are probably bugs, so check for correct operation)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 21:48:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3699864#M1040446</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2017-10-06T21:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3700007#M1040510</link>
      <description>&lt;P&gt;Thank you, I understand what was causing trouble.&lt;/P&gt;
&lt;P&gt;I am trying to give 4 attempts, but it is taking more than 5 attempts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 14:28:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3700007#M1040510</guid>
      <dc:creator>anny321dum</dc:creator>
      <dc:date>2017-10-08T14:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: guess number</title>
      <link>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3700013#M1040515</link>
      <description>&lt;P&gt;Well, an image cannot tell us what's wrong. We cannot run it, we cannot see what's in the other cases, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Your comparison is &amp;gt;5, so that IS "more than 5 attempts". Right?&lt;/LI&gt;
&lt;LI&gt;Where does the count increment? Where does it initialize? Did you probe the value during run?&lt;/LI&gt;
&lt;LI&gt;A 1000ms wait seems excessive. Why did you pick it?&lt;/LI&gt;
&lt;LI&gt;Does the rest of the functionality work as expected?&lt;/LI&gt;
&lt;LI&gt;Code is easier to debug if you keep the wiring clean. No need for all these wire bends and overlaps.&lt;/LI&gt;
&lt;LI&gt;Why don't you display the number of guesses in the text indicator?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 08 Oct 2017 16:21:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/guess-number/m-p/3700013#M1040515</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2017-10-08T16:21:03Z</dc:date>
    </item>
  </channel>
</rss>

