I like to keep a true-false program run

Hello!

I'm new to labview, and I began to practice. I would like to create a small program that generates a random number from 0 to 100, and the user can enter a number of his choice, then the program says if it is equal or not. I'm almost done with it, my problem is that I run the program, it generates a number, indicates if the number in numerical order is equal to the random number, and it stops. So if I change the number in the control, nothing happens, but if choose to run the program continuously, it generates numbers of every moment.
So my question is, how do I keep the program running, without changing the random number, so that the user has time to enter its own number?
Thanks in advance!

I joined my program.

You need to place the code in a while loop. Add a stop button so that the user can tell the program when to stop.  Also put a wait function (ms) in the loop with 100 to 200 ms delay if the loop does not turn millions of times per second while you wait for the user to enter a number.

When you get more advanced with LabVIEW, you want to learn how to use the structure of the event for programs like this.

Lynn

Tags: NI Software

Similar Questions

  • Keep AM true/false

    Hello

    I would like to ask

    When should you together keep AM to be TRUE and if you have it set to FALSE?

    Thank you

    Hello

    False AM means the State transactionn will be lost and AM true means that the status of the transaction will be not lost.
    for example VO is larent to AM, then query VO records will not be lost when AM is set to true.

    Thank you
    Kumar

  • Scalar true/false conversion

    I would like to convert a transient scalar to a true/false variable.  To clarify, I would take a scalar time-variables and pass the value of the zeroeth little to a true/false variable, which can then be transmitted to a device of digital line out.  The camera has solid state relay and its DAQmx driver requires a contribution from true/false and does NOT have a scalar or digital signal.  It seems to me that it is a very simple c language's intrinsic function call.

    I looked at the functions SE steps-analyze-analog-formula but they always output a different scalar.  Stage outputs triggering a true/false momentarily and do not lock.  Limit test has an output of true or false, but it is for all the samples in the whole of the scalar and not any a scalar value.

    Any suggestions?  or better yet, can someone send a simple vi LV that performs this conversion of simple data?  Is there some utility vi hidden on the somewhere installation disc that can do this?

    Thank you

    I have acquired some clarification and solved my problem through integrated service of SE.  I can do exactly what I need through the 'Alarms' utility that treats momentary boolean True/False step of relaxing in a DIO locked signal on my PXI-6528 board.  Furthermore, I will explore using the result of 'software trigger' the utility of the alarm to work around the limits of the "reserved resource."  Thanks to all that at least looked at my problem.

  • How to use a signal of true/false dynamics with a business structure?

    Hey everybody-

    Is it possible to enter a case structure dynamic data of true/false?  We try to generate a waveform and want our structure case to run when the wave exceeds a certain threshold value and freeze execution when it drops below the threshold (If false).  However, we want the case structure to run continuous - i.e. If the structure of the deal for the 'real' case running while the waveform is above the threshold, we next want to deal for 'false' structure to run when the wave goes below the threshold, and so on until we stop our program.

    Any suggestions would be much appreciated!

    Rachel

    Remove the loop around your DAQ Assistant vi express (I hate express screws).  There is already a big loop around all of the code in the lower part.  As has been pointed out by Ravens Fan, don't assign continuous acquisition.  Set a finite number of acquisitions.  Then the rest of the code can run and the loop can travel again.

    Get rid of the stop sign at the top.  When the code is finished, Labview will stop on its own.

    You have two stop buttons.  Only one is necessary.  Look at my example posted a few messages back.  A STOP with local variables.

    Shrink your block diagram.  It takes more than one monitor space.  It is difficult to read when you have to scroll all over the place.

  • I disabled MS Security Essentials that I use another antivirus - but I like to keep the firewall. How can I determine if it is effective?

    * Original title: Microsoft Firewall

    I read that Windows has a built-in firewall. I disabled MS Security Essentials that I use another antivirus - but I like to keep the firewall. How can I determine if it is effective? If this is not the case, how can I activate it?

    (Moved to programs)

    You cannot run the Windows Firewall and any other 3rd party firewall at the same time. By default, most if not all AV software (competent) devs teams to automatically disable the Windows Firewall when their own is installed to avoid unnecessary conflicts that would occur if both have been enabled at the same time.

    If you want to have the Windows Firewall, you will need to uninstall your antivirus (if it comes with a firewall) 3rd party. If this isn't the case, then you can keep the Windows Firewall is turned on, because it's good.

  • How to get the lov value(true/false) that is running by pressing the F3 function key

    Hello

    I mapped key F3 function for list of values (lov), pressing F3 on the element of text (with associated lov) poster lov, but here the lov is implicitly run, so I am unable to get the value of lov(true/false), how to get the true or false value from the lov.

    I use Oracle forms 11 GR 2.

    What exactly do you mean by "the true or false value of the lov? Want to know if the user chose something from the lov. If so, you can create a KEY-LISTVAL-trigger on your textitem with something like

    IF SHOW_LOV('THE_NAME_OF_THE_LOV') THEN
      -- do something here
    END IF;
    
  • Question about alignments multiple choice or true/false response

    When I insert a questionnaire to multiple choice or true/false question, the second answer (answer B for each type of question, is misaligned with his radio button):

    QuizQuestion2.png

    QuizQuestion.png

    During these questions master blade looks like this:

    QuizQuestion3.png

    I can't understand how to align the answer with its radio button.  Any ideas?

    I use CP 7.0.1.237 on Windows 7.

    Thank you.  I'll go ahead and mark this thread as a response.   I like the feature of automatic resizing of legends, but it messes up the alignment of the answer.

  • I need assistance with radio - quiz true/false buttons

    I have a short quiz at the end of a lesson. The choices are radio buttons. Some are multiple choice, some are true/false, and they appear randomly. I have a visible set choiceNone = flase button and selected = true, so that the other options are not selected. It works very well for the choice quaestions multiple, but on the second and third true/false, it shows the previous selection. Someone else built this quiz for me, as I am a novice. When I copy in its own file it works fine, but not in this one and not as an mc. HELP!

    I can't open your file because it is a CS4 file, but I guess that the problem is similar to another file that someone posted here some time.  If your issues radio buttons are sitting in the adjacent keyframes, each then inherits some properties from the keyframe before.  One way around this problem is to have empty key frames between keyframes of radio button... But if you need to keep the image by image sequence, then you can try alternating layers so that you can find yourself with spaces between everything keeping the image by image...

  • Execution of Code with the participation of true/false

    OK, so I have to be over thinking on how to do it. I'm trying to run some of my code when I get a value of True. If set to False I don't want it to do anything. Ive tried using a true/false case structure, but the obligation to hang the false case something is screwing me. Also tried a while loop, but it simply snaps and never reads the false after his already on.

    Murielle says:

    Very well and I'll check out the tutorials. I just got stupid all this code because I wanted to take the last element of the array and write them on the worksheet without adding other values, BUT at the same time allow him to add to the file because I'll repeat this code on.

    You don't have a table until make you a right there on a single element. There is no 'another value '. There is an element in the table, which is the first and the last element and exactly the same as the value that you used to build the table. Once you do the tutorials, you'll laugh about your code. It is absolutely useless.

  • LabVIEW 11.0 crashes when you use Match true/false String

    The world is - that sound familiar at all?

    It took a while to find out that LabVIEW block VI (red arrow) is called each time.

    It's weird that the VI is called once and everything works fine.

    In any case, the solution is simply not using this VI, nevertheless this bug should be fixed.

    In my view, LabVIEW 11.0 accidents much more often than older versions...

    I broke it down a bit to the least number of required functions. CAR #360838.

    Workaround as already said: a structure around the last string of true/false game parallel to the length of the string. It could be to disable the diagram, case, image of unique sequence.

    hope this helps,

    Norbert

  • true/false match regardless of case

    I want to use the true/false match string node, and I want it to work regardless of case.  For example, in the case of true, I want that it is 'TRUE', 'true', 'True', etc..  I don't want to use the service several times and use a RC.  What is the best way?

    Uppercase (or reduce)

  • Scan chain with TRUE FALSE and the comma as separator

    Produced cabling 'REAL FAKE' entry as '%s %s' format as false to scan string constants

    the two binary values you want, corresponding to the input string.

    Whereas "TRUE, FALSE" as entry and "%s, %s" format leads to an error.

    I lost a lot of time to understand that the error has its origin in the incompatible separator and not in the way I use this function.

    Wouldn't be possible (ask nicely) to place a note in the online help for this function, you need to use only spaces or tabs as separators
    with chains binary when you use this function?

    It was not clear to me why I should not use the comma as a separator.

    Now, my solution is to replace all the commas with spaces before you wire the input string to scan from a string.

    Is there another workaround solution or someone can provide a deeper understanding of why comma does not work?

    My guess is that he was mistaken for a decimal separator and implies not being part of a binary value.

    Use ' % [^,], %s ' as your specifier.  ' % [^,] "will result in a string up to the next comma.

  • Need to change a true/false to an O or 1 output.

    Need to change a true/false to an O or 1 output. I have a grahical switch that gives me a true/false output. I need an output of 0 or 1.

    Thank you
    Ed

    Take a look inside the Boolean palette on the block diagram.

  • Computer XP will only keep a window active/program

    Hope I can explain it properly. My computer will only keep an active window/program. No matter if I use Word or a web browser after a minute or less my computer is switch off everything I use, the task bar will light blue and me can not enter or sroll until I click on the window with a mouse. Help, please! It's so frustrating (happened 7 times while I typed this)

    Hi SherriPilgrim,
     
    -Remember to make changes to your computer after that this problem started to happen?
     
    Increase the duration of stay in the foreground. Follow the steps to do the same thing.
     
    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    a. Click Start. Click Run, type regedit.exe and press ENTER.

    b. navigate to the following location: HKEY_CURRENT_USER\Control Panel\Desktop

    c. double-click the key "ForegroundLockTimeout. Replace the decimal notation.

    d. the default must be 200000 millisecond in decimal or 200 seconds. Click OK.

    e. restart your computer and check if the problem persists.

    For more information, see:

    ForegroundLockTimeout

  • How to specify "device = true/false" what URL's path and querystring

    e.g. http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxxI have been read many examples on the addition of "device = true/false" or "interface = wifi" based in the current connection service. But all these examples assume that doesn't URL {t have path or from a query string:}

    for example http://myserver.com;device=true

    I need access to a server where the resources are way and I set up via QueryString

    for example http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxx

    I've been adds "device = true" at the end of the URL and at the end of the hostname

    for example http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxx;device=true

    for example http://myserver.com;device=true/path/my.php?id=xxxxxx&name=xxxxxxx

    and none of these works. Is it possible to specify when the URL path and use querystring

    I'm working with JDE Plugin 4.5, Ecliipse 3.4 for Curve 8310 and 9000 "BOLD"

    Thank you

    f

    You always add the connection at the end of the full URL string, regardless of what contains the URL.

    The connection string is stripped by the treatment of Blackberry so that your host be confused by it.  The connectin string is used by the BlackBerry to determine what BlackBerry connection path will be used for the connection.

    BTW, this is '; '. deviceside = true/false", not"peripheral", which could explain part of your problem.

    I think this article explains all the possible connection strings:

    What - in different ways to establish an HTTP connection or socket

    Article number: DB-00396

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

    For more information, I recommend the section required reading of this thread:

    http://supportforums.BlackBerry.com/T5/Java-development/connecting-your-BlackBerry-http-and-socket-c...

Maybe you are looking for