where I'm going wrong?

Hello guys! I am trying to create a base of vi program that generates a random number between 1-6 at the outbreak, two criteria I tried to implement are:
1. no zero
2. the previous value must not be identical to the current one

I tried to resolve it using a loop back power but the result is still not satisfactory, where I am doing wrong? Thanks in advance

            

The block diagram:

kstrauch wrote:

After reading the reviews of altenbach, I wrote a small example how to do that. I would like advice or comments altenbach or someone else has on my code, because I'm still pretty new to LabVIEW. I think that this meets the criteria that the OP said.

The main problem is that it is not scalable. For example if you later need to modify it to 10 items, you almost start coding from scratch. Also the algorithm itself does not fit because that you start over with each test. For example, if you need to generate an array of size 1000 with these requirements (not consecutive elements with the same value), you must generate an almost infinite number of paintings before we meet the Criterium. This could take forever.

All you need to do is generate a new element until it is different from the previous and repeat until you have three. This is one of the possibilities.

Tags: NI Software

Similar Questions

  • I try to install the drive on a Mac. When I press on install, I see an installation message failed. Where I'm going wrong?

    I can't install the player on my Mac. When I press on install, I see an installation message failed. Can wher I go wrong?

    Hi flynavy,.

    Restart your Mac, try again to download & install Reader using this link Adobe - Adobe Acrobat Reader DC Distribution.

    Kind regards
    Nicos

  • Where I'm going wrong with the object Type

    Hello world
    I am trying to insert data into a table using a type of object
    Here is my code
    Please help me where I'm wrong...
    Thank you

    Code for the object. Type
    create or replace type emp_rec_type as object 
    ( empno number
     ,name varchar2(20)
     ,salary number(7,2)
     ,job varchar2(10)
     ,hiredate date
     ,commno number(7,2)
     ,deptno number(4));
     
    Now I want to insert data into the table like this
    begin
      insert into emp5 values(emp_rec_type(5,'jack',1000,'salesman','12-apr-2000',300.00,20));
    end;
    I don't want to create a variable of the object... Initialization type I want to create just to insert the value using the default constructor.

    Concerning
    Prost

    You can create the table of the object:

    create table emp5 of emp_rec_type;
    

    Kind regards
    Sayan M.

  • HP Envy 5530: HP ENVY 5530 "cannot find the printer"... impossible to see where I am going wrong!

    Hello

    We just put a HP Envy 5530, set up was fine, I tried installing but get the message "cannot find printer" over and over again.

    I tried to download printing HP and Scan doctor but also, it does not find the printer.

    I ran two reports of diagnoses on the printer, everything looks ok, I have an IP address with an IP address that suggest that it has connected wirelessely, the network report said no problems were discovered.

    I tried disabling my firewall, all made once again, still nothing.

    I put the IP address in the address bar, but it does not open!

    I don't seem to have a printer/USB cable witht the printer so I can't tey wireless - I one of them, it was a new purchase?

    I don't really have an idea what to do next, it seems I have a printer connected to the network, your laptop to talk to the network but nothing to talk with each other. I also tried to find the printer with my IPad, but he also could not find a printer.

    Any ideas, im really frustrated

    Thanks in advance

    Hello

    They are on the same Beach, they should be. Now please reset it and try again

    1 reset the printer

    b press settings (wrench),

    (b) press tools then use the arrorw down to access page 2/3,

    (c) touch Restore Factory Defaults - wait a few minutes

    2 reinstall the printer

    (a) you can use the CD, but it will download the file and may take ages to download. Please download the software and the following drivers

    http://ftp.HP.com/pub/softlib/software12/COL47810/MP-115828-6/EN5530_198.exe

    (b) turn on the printer,

    (c) right click on the downloaded file and select run as administrator.

    d select Wireless and then follow the instructions on the screen.

    Kind regards.

  • The Service WCF and Blackberry Widget does not. See where I am going wrong?

    I'm creating a widget of BB with Visual Studio 2008 and I created a WCF Service hosted in Windows Azure.

    This is one of the methods in the WCF Service:

     public string ClockIn(string emailAddress)
            {
                try
                {
                    using (var dc = new TEI_DataContext(_MyDc))
                    {
                        SecurityLogin sl = dc.SecurityLogins.SingleOrDefault(s => s.EmailAddress == emailAddress);
                        var tc = new TimeClock { ClockIn = DateTime.Now, UserName = sl.UserName };
                        dc.TimeClocks.InsertOnSubmit(tc);
                        dc.SubmitChanges();
                        return "You're Clocked In!";
                    }
                }
                catch (Exception ex)
                {
                    return ex.Message;
                }
    
            }
    

    I tested it with a Console Application like this, and it works GREAT!

    var client = new TEIServiceReference.Service1Client();
    string result = client.ClockIn("[email protected]");
    Console.WriteLine(result);
    Console.Read();
    

    Here is the address of public WCF Service: http://a1e17152bcf647aaa300ccb5a8a2a2c5.cloudapp.net/Service1.svc

    Here is my HTML code for the widget:

    
    
    
    
    TEI Time Clock
    
    
    
    
    
    

    And here's my JavaScript code:

    var xmlHttp = new XMLHttpRequest();
    
    function ClockIn()
    {
    var url = "http://a1e17152bcf647aaa300ccb5a8a2a2c5.cloudapp.net/Service1.svc/ClockIn/[email protected]";
    xmlHttp.open('GET', url, true);
    xmlHttp.onreadystatechange = callbackFunctionClockIn;
    xmlHttp.send(null);
    }
    
    function callbackFunctionClockIn()
    {
    
    if (xmlHttp.readyState == 4)
    {
    var result = xmlHttp.responseText;
    //result = result.getElementsByTagName("string")0].childNodes[0].nodeValue;
    alert(result);
    }
    }
    

    When I run the widget, an EMPTY popup appears and it NOT me clock. Can you see what I'm missing?

    Thanks a lot for your help and your time!

    Brenda

    The? did not help either. Bad luck!

    I just hired a Blackberry app developer, and he thought of it in Java.

    Thanks for trying to help out well!

  • Something going wrong on a server that contains information about your user account and the mailbox can not be found.

    Cannot open the e-mail.  I can connect on the MSN home page and when I right-click the outlook icon it shows the e-mail Inbox, but cannot access e-mail.  I just get this error

    "Something going wrong on a server that contains information about your user account and the mailbox is not found."

    This error is on the MS and they are aware and working on a fix.  Have you tried connecting mail.live.com directly using your e-mail address and the password?

    For later use, you would get more (and larger) response if you posted this in the Outlook.com (e-mail) section, where are the experts.

  • I really don't see what goes wrong?

    Hello

    been working on this site and really really can't know what ive done wrong. to consult http://treesbeastsandhairythings.com/test there seems to be a large gap inbetween pictures and I just do not understand why or how his arrival? Ive done the image at the bottom half of the table a background because I put the text and other images ontop.

    If anyone can see where im going wrong, it would be much apreciated!

    Thank you very much

    Ed

    I'm afraid of the way in which the page is put together will cause you more problems on the track.

    The gap is due to which, it seems, combination of things: a dog wandering

    attribute just before to start your nav images, then a line break
    down to the next line.  However, as soon as you remove the offending attributes, your page breaks.

    What you should do (because you use a tabular presentation), 4 separate tables is implemented.

    First table will be your header image (with a single cell table)

    A table with the exact number of cells to organize each of your nav buttons

    Follows that with a table (a cell if you have only one content area and no sidebar) to organize your content

    and a final table to hold your footer information.

    The way in which the provision is now, as soon as you start adding text in this central area guests will collapse even further.

    You have not gone too far in the development of this page, so I would really start before start all other pages, to ensure that it works properly before going any further.

    Hope this helps :-)

    --

    Nadia

    Adobe® Expert community: Dreamweaver

    --------------------------------------------------

    Unique templates CSS | Tutorials | SEO articles

    http://www.DreamweaverResources.com

    --------------------------------------------------

    Book: Ultimate CSS reference

    http://www.SitePoint.com/launch/005dfd4/3/133

    ---------------------------------------------------

    http://Twitter.com/nadiap

  • My Bookmark button has disappeared and I can't find where he was going.

    I recently had to reset Firefox because of some malware and when I started it back up my bookmarks toolbar button is missing and I don't know where he was going. I'll upload a screenshot showing what I mean. On the left is what it looks like now and on the right is what it looks like.

    http://i.imgur.com/AvicYTK.PNG

    You use the default theme?

    • Firefox/tools > Modules > appearance

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    Open the Customize and set the toolbar to display items.

    • Firefox '3-bar' menu button > customize
    • If the missing elements are in the palette to customize then drag them back into the window to customize the toolbar
    • If you don't see an article on a toolbar and in the palette to customize, then click on the "Restore default settings" button to restore the default toolbar configuration

    See also:

  • When I right click on a page and select 'Copy' where the copy goes on my computer?

    I'm just trying to copy the page but I don't know where he's going. I guess that's what the copy function?

    See also http://en.wikipedia.org/wiki/Clipboard_%28computing%29

  • When I download (save a file) where is she going? Why can't directly where I want to go? IE allows me to choose where I save each file to

    When I download (save a file) where is she going? Why can't directly where I want to go? IE allows me to choose where I save each file to

    You set downloads to always go to a folder or to ask you every time.

    • Options > general > downloads section

      • ' Save files to: "and choose a folder (always stops in this case) {This is the default setting for Firefox, you can change the folder or move in" always ask me... "} {"below}
      • "Always ask me where to save files.
    • See-> window Options - general Board

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • Satellite A30 - 614L: Sound goes wrong and stops completely

    After some time using laptop computer, his first goes wrong on and outside and after awhile stops completely. When it really starts to go wrong is quite unpredictable.

    Sometimes after 10 min, but also sometimes after hours. I have tried to re - install the driver the most recent, but which did not help. When the noise was gone, the only cure is a reboot.

    Who knows how to solve this problem?

    Hello

    I put t know why it happens but I read several post in this forum and it seems that this problem has disappeared after completely new recovery with the delivered Toshiba Recovery CD.
    You should also check it.

  • Download of data and no idea where he's going.

    So I have a version of OS X running 10.11.2 2012 MacBook Air. He is constantly downloading data and I have no idea where he's going. An OS X update came in yesterday I think. This only happens when I connect to the wifi at home. Not just any other connection. Applications that downloading something that aren't fast running in the background. Please help me solve this problem

    You can monitor your wifi connection as below shows article.

    Use Wireless Diagnostics helps you troubleshoot Wi - Fi on your Mac - Apple Support

  • Portable drive device goes wrong

    Alerts this disk device goes wrong on my laptop of HP 2000 and said that I have to back up my files or I won't lose them. Indicates the name of the drive is Hitachi HTS543232A7A384 SATA peripheral Disk Volume: C:. D:\  I contacted HP support and they said, it must be replaced.  I don't know much about computers, so I have a lot of questions.  Is this drive the 'hard' for my PC?  About how much how much it costs to get it repaired? It would be cheaper to get a new PC? (paid $300 for this PC) What would make the disc go bad after only a year and a half? It was the result of a virus? It hurt more than if I continue to use my PC t that I tried to use my Norton 360 to backup my files, but I don't know what I'm doing. Norton Save things like photos and emails or it records only the things that make the PC work?

    Very good questions. Yes, it is commonly called the 'hard drive '. An exact replacement for your player is $ 43 on amazon.com:

    http://www.Amazon.com/Travelstar-Z5K320-HTS543232A7A384-internal-drive/DP/B00555EG7S

    For a few dollars more, you can get a larger capacity drive which is faster and improve performance. Let us know if you are interested by this.

    This shows how to replace the drive.

    http://www.YouTube.com/watch?v=Yxs3DgRExaU

    Norton 360 tutorial:

    http://www.YouTube.com/watch?v=QHVDg1dgksY

    You choose what you want to backup. You did a restore DVD when the laptop is new? If this isn't the case, maybe you can always use HP Recovery in the program menu. This will be the easiest way for you to get the software on the new drive.

    Hard drives are very delicate and mysterious and can go bad for no apparent reason, but it is an urban legend that a virus can make a record hard to spoil. That's why we need to save, save, save. Never trust of important data on a single hard drive.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • When I have someone tag on a picture where the picture goes?

    I'm scanning the old photos of my family history family. Can I add a caption without problem, but if I add any child tag the photo disappears from my Windows Live photo Library and Windows photo library. Where are they going?

    You have installed McAfee? Ugh!

    The Windows 7 library files are not displayed
    http://service.McAfee.com/faqdocument.aspx?ID=TS101228

  • Where am I going to access the the system restore on my Vista "help and support." It has been easy on XP!

    Support under XP system quite simply, I went to 'Help and support' clicked on it, and a new screen open and followed the easy prison. Where am I going to access the the system restore on my Vista "help and support."  I just want to go back to a previous restore point.  Thank you!!

    Hello

    Start - All Programs - Accessories - System Tools then system restore should be visible.

    Also, a lot of PC brand have a restore option of the system via F8 at startup, and then click "fix." Useful if you cannot start Windows successfully.

    Also you can click on start and then just type rstrui.exe and press ENTER.

    Please mark this as useful or response if applicable.

    Tricky

Maybe you are looking for