Creating Exclusive Numbers

I come again defeated to the NI Discussion board!
Let's say I want to use LabVIEW to do 10 different calculations. These calculations are running together at the same time in their own little loops. The catch is the calculations must be performed with ONLY the numbers 1-8 and at any given time a number cannot be used in more than one calculation. If it can't exclusively grab one of the 8 numbers, it waits for the number to finish in another calculation.
How would I achieve this? I've tried using semaphores, thinking I could use some kind of shared variable and use the error in and outs to control access to each of the 8 numbers. I can get it work by using 8 different semaphores, but the problem is in my application there are 40 numbers that can only be used 1 at a time and not 8 so using 40 semaphores just seems overkill.
Thanks guys! And have a great weekend folks!
-- Jason
Message Edited by jmpugh on 03-10-2007 01:33 PM

Done in the LabVIEW 1.2 days.
We created an exclusive random number generator. It took a range of numbers, such as your 1-40, and randomized the order of the numbers, using each number just one time.
I am not sure how you would use this for your lockout but it may give you some ideas.
This is a LV5.1 version which can be opened in any newer version. (Well, the Forum made me add a .vi extension, so I won't guarantee it will work with all the old versions).
Lynn
Attachments:
EXCLUSIVE RANDOM.vi ‏26 KB
New Random Integer.vi ‏42 KB

Similar Messages

  • Tried to open a file I created in Numbers a while ago which I modified on 11/4/13 and got a message that I needed a newer version of Numbers.  When I went to the Mac App Store it shows that the new version is already installed.  Any suggestions?

    Tried to open a file I created in Numbers a while ago, which I modified on 11/4/13, and got a message that I needed a newer version of Numbers.  When I went to the Mac App Store it shows that the new version is already installed and there doesn't seem to be a way to reinstall it.  When I checked "About Numbers" on my MacBook it shows "Numbers '09 version 2.3".  Any suggestions as to how I can get the new version installed?

    Are you launching Pages from an icon in your Dock? Installing the update does not change the Dock icons & it does not remove the older versions. Go to your Applications folder & launch the new Pages from there.

  • Can't open .xls files created by Numbers

    All of a sudden, using Numbers '09 I can no longer open certain .xls files that I created in the first place by saving .numbers files as Excel files (using the "Save copy as Excel Document" checkbox in the Save As... dialog box). Some will open, but the vast majority attempt to open, and then I get an "Import Error - An unknown error occurred." message. Backed up copies of the same files produce the same result. New .numbers files I save as Excel documents can't open either.
    Background: Earlier tonight while saving a .numbers file as an Excel Document, the blue "progress" bar got about halfway and then just hung there. Having not rebooted the computer for a couple of weeks, and lots of apps open, I proceeded to shut down other processes and eventually the blue progress bar finished and an Excel file was saved. However, after rebooting the computer, the above inability to open Excel files started to occur. Something in the "save as" process must have corrupted?
    I quit Numbers, deleted the com.apple.iwork.numbers.plist file from Library/preferences, emptied trash, and restarted Numbers -- but that didn't solve the problem.
    What would you all suggest now at this point? Would reinstalling Numbers solve this? (hmmn, where is that disc?) I'm personally fine with the .numbers format, but my clients are not, hence the need to save as Excel documents. Any help would be appreciated!

    ack, this whole thing is frustrating. I can create new .numbers documents, save them as Excel documents, and those resulting .xls documents will open fine. HOWEVER, if I grab an old .xls document from a time machine backup (over a month ago), I cannot open it. Nor can I open an newly saved .xls document saved from the same original .numbers file.
    It would seem that the only thing I can do now is take those old .numbers files and copy/paste the content into a brand new .numbers file. After saving as, the resulting .xls files open fine (with the usual "import warnings", but I'm used to those )

  • Address Book -- Importing CSV File created by Numbers

    I'm trying to import a csv file generated from MS outlook into address book. When I attempt to import the csv file that Outlook created, Address Book is able to recognize the file. However, I need to modify the file before importing. To do that, I opened in Numbers, deleted some columns and renamed some columns. Then, I exported from Numbers as a .CSV file. However, when I try to import the .CSV file created by numbers, I get the error that I have modified with Numbers, I get the error "Text file import failure".
    Does anybody know why address book can't import a CSV file created by Numbers?

    Many people have run into this problem, including myself. I had worked many hours on a spreadsheet in Numbers, exported to CSV, and received the error message when trying to import into Address Book. The answers to this dilemma are out there, but tidbits of the whole answer are spread around discussion boards. So I hope to consolidate those answers here.
    The main problem for me -- and it's reasonable to assume that others receive the "Text File import error" for the same reason -- is that 1) I had commas in my spreadsheet, and 2) I had hidden RETURNs in the spreadsheet. Once I got rid of those two things, I had no problem importing into Address Book.
    Deleting Commas>
    The problem with commas in your spreadsheet is that the CSV format uses commas to distinguish when a new cell is formed. So having other commas will inevitably confuse Address Book during the attempted import. I didn't have too many commas in my spreadsheet, so I was able to quickly remove them. Yet, if you have dozens or hundreds of cells with commas in them, you'll need an easier solution. I imagine opening Number's Inspector>Cell Inspector>Format will have the solution of removing commas from, say, currency amounts or something else. Yet, how many commas arise in contact information? Perhaps the easiest way is to use the same method of removing those hidden RETURNs. Read on...
    Deleting Hidden RETURNs>
    You can't see them, and I couldn't find a "show invisibles" option in Numbers. So you need to search and find them. Yet, how do you search for something hidden? Do the Command-F thing to bring up the search field. The search bar should automatically be ready to search what you type. Hitting the Return key will do nothing for you, but hitting Shift-Option-Return will (you'll likely need to hit Return again to actually perform the search). Numbers will point out how many times these hidden returns are in your spreadsheet, which cells contain them, and give you the option to automatically replace them with something else (a space is a safe option). You can do the same search and replace with commas too.
    Save your spreadsheet, export it as CSV, and -- as long as the only errors stemmed from commas and hidden RETURNs -- you shouldn't have a problem having Address Book import it. Good luck!
    PS- After importing my spreadsheet, I noticed that some of my Smart Groups in Address Book were not showing some people who should have automatically been in there. The problem was that the Smart Group search had straight apostrophes in it, but the imported contact had curved apostrophes. The computer saw these as two unrelated characters. After some copying and pasting, the problem was solved.

  • Error while creating document numbering series via SDK add on

    Dear Experts,
    We receive the following error while creating the document numbering series through the SDK add on
    [Microsoft][SQL Server Native Client 10.0][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
    From the above error message I can suspect the following possibilities
    1. The limit for the document numbering must be less or equal to 2100.
    2. There is a problem in the coding in SDK where it does not allow more than 2100 lines in the database.
    We tried to create manually for the same fiscal year and period indicator disconnecting the add on, the same error occured.
    Then we created a seried for a single document with the period indicator for the next fiscal year, it allowed.
    After creating the document numbering for the next fiscal year, we were able to create the numbering for the previous year also.
    Kindly help us on how to solve the same.
    With regards,
    Yeshwanth Prakash

    Hi
    You have, as far as i can determine without seeing the template,defined no Part Appraiser Column (PAPP) in your template. But you have defined a function on the template to automaticly default the part appraisers.
    On the Appraisal document persons (appraiser / appraisee) are getting defaulted as part-appraisers although no part appraisal column excist,and therefor 00 Part Appraisers are allowed. This gives the error. Remove the Part Appraisers default functionality from the template and this problem will be solved.
    FYI: The reason why this doesn't give a business check error is that the functions to default participants are BAdI's and we have no means of determining wether or not a BAdI implentation will create an inconsistency on the appraisal document.
    Also, the reason that it occurs as a S message and not as E or W is because of programming restrictions in combination with messages. All errors on the Appraisal Document will come as 'S' messages.

  • Program to create random numbers in plsql

    How do we Write a program to create random numbers.
    Thanks

    No need to - we have DBMS_RANDOM :)

  • Problem when create auto numbering in BP master using Formatted Search

    Hi all,
    I have a problem in creating auto numbering in BP for Customer type using Formatted search
    My query is like this
    declare @tempNo as char(20)
    set @tempNo=(select  Isnull(max(REPLACE(OCRD.CardCode , LEFT(OCRD.CardCode,10),'')),0)  + 1
    from OCRD where (CardType ='C') and LEFT(OCRD.CardCode,3) = 'CU.' )
    set @tempNo='CU.'left(convert(varchar,GETDATE(),112),6)'.'+@tempNo
    select cast(@tempNo as char(20))
    It should be creating the new number for example
    CU.201101.1
    CU.201102.2
    CU.201103.3
    CU.201103.4
    The format will be like this CU.YYYYMM.autonumbering
    So if the current year is still the same it will always increase the number and it will reset the number become 1 if the current year is change.
    But when i execute the number , the number doesn't increase, still generate the last number CU.201103.4
    I have use this query in generate item number, it runs well but different format.
    Is there some thing wrong with my query?
    Thanks in advance
    Regards
    Jia shun

    Hi Jia shun,
    You have posted an identical threads. There is no such need. Please close this one and response to the one with answer already.
    Thanks,
    Gordon

  • I have the Numbers-applications on both Mac mini and Macbook Air. My problem is that they don't sync so when I create a Numbers-file on the MacBook  while travelling, it will not be on my Mac mini when I get home :(((

    I have the Numbers-applications on both Mac mini and Macbook Air. My problem is that they don't sync so when I create a Numbers-file on the MacBook  while travelling, it will not be on my Mac mini when I get home :(((

    Hey iWeb plubishing problems,
    I would first check to make sure that you meet the system requirements for OS X to support Documents in the Cloud. For that your Mac’s needs to be running at least OS X Lion 10.7.5 or later to make sure that everything syncs. Take a look at the article below for more information. 
    iCloud: Troubleshooting Documents in the Cloud
    http://support.apple.com/en-us/HT203517
    Take care,
    -Norm G. 

  • Create Serial Numbers

    Hi Experts,
    I am using a bapi, BAPI_GOODSMVT_CREATE to create new serial numbers in the system. Following are the inputs that i am passing to the bapi.
    wa_header-PSTNG_DATE = sy-datum.
    wa_code-GM_CODE = '05'.
    wa_item_create-material = matnr (The concerned material number).
    wa_item_create-PLANT = plant
    wa_item_create-MOVE_TYPE = '501'.
    wa_item__create-ENTRY_QNT = '1'.
    wa_item_create-ENTRY_UOM_ISO = 'EA'.
    append wa_item_create to gt_item_create.
    wa_serialnum-MATDOC_ITM = '0001'.
    wa_serialnum-SERIALNO = 'ABCD-00044' (The required serial number to be created)
    append wa_serialnum to gt_serialnum.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header               = wa_header
        goodsmvt_code                 = gm_code
      TESTRUN                       = ' '
      GOODSMVT_REF_EWM              =
    IMPORTING
      GOODSMVT_HEADRET              =
      MATERIALDOCUMENT              =
      MATDOCUMENTYEAR               =
      tables
        goodsmvt_item                 = gt_item_create
       GOODSMVT_SERIALNUMBER          = gt_serialnum
        return                        = gt_return
      GOODSMVT_SERV_PART_DATA       =
      EXTENSIONIN                   =
    After executing this FM, I get a screen which unfortunately i cant paste it here. This screen is same as the screen that appears in MIGO while creating serial numbers. To give you idea about the screen, it has following fields - Division, Device category, Serial Number,
                                        manufacturer, Model number, Construct year,
                                        Cert Year, Cert No.  and many more.
    As this screen appears, I tried to enter the relevant fields but the control does not move to next screen.Every time info message is displayed as "Function code cannot be selected.
    Can anyone please help? Or can anyone suggest a FM to create serial numbers in the system through
    program?

    hI,
    Here is the simple way can you try this,,
    Execute the transaction SNRO and define the number ranges,, call this in your program using f.m. get_number_next and pass the object if as '1' and object name as what you have used while creating number ranges. it will gives u the serial number.....
    Thanks and Regards,
    Thirukumaran. R

  • Create sequential numbering for chapters in Pages

    Can anyone tell me how to create sequential numbering for my 'scenes' or 'chapters' when writing scripts in Pages.
    I need to have them set up, so if for example, I have...
    Scene 01
    Scene 02
    Scene 03
    and down through scenes to say...
    Scene 52
    But I write another new scene in between scene 02 and 03... I need all the other scne numbers to change automatically below the new scene, instead of me having to manually go through and change every single scene number...
    How do I do this?

    Thanks... this is a reasonable compromise, which I have already done.
    The problem with script writing is that the Scenes are generally headed like this...
    Scene 22: Int - Dinning room - Night
    Then they might have a subtitle, which is a short descriptive of the scene, such as...
    Scene 22: Int - Dinning room - Night
    (Xmas Turkey dilemma)
    So, it could work as you suggest, but it is by far a perfect formula, I am dumbfounded as to why 'Pages' doesn't have this simple function, when just about every other word processing program does. Final Draft is an industry standard for script writing, but I actually prefer Pages, I have a lot more creative control with formatting, except for this one vital function... darn!
    Thanks for you suggestion Peter,
    Cheers

  • HT5534 When creating a Numbers document (Iworks), the data is does not input in black

    When creating a Numbers document (Iworks), the data is does not show in black.  Cannot read the data entered.  Please help.

    SP,
    Problems like you describe have been reported by users who update one part of their system but not others. If you upgrade your OS, you must Update your applications. That is the most common cause, but of course there could be others.
    Please check your profile data. I doubt that you are really using OS X 10.0
    Please tell us your exact OS version and Numbers version.
    Jerry

  • Logic to create multiple numbered copies of a page?

    I have compiled a report that I need to create unique numbered instances of a page based on a number of units for different vendors, and I'm trying to automate the process. I use a parameter field to tell the report to determine the number of units that necessitate an additional copy of the report. For instance, if I enter a parameter of 10 and there are 50 units, I need to get 5 copies of the report; if there are 175 units, I need 18, and so on.
    I'm trying to use a do while loop where I increment the page count lower each time a page is printed, but I can't figure out exactly how to pull it off..... Here's what I've got:
    Dim c
    c = {@total_reports}
    Do While c > 0
        if c = 1 then Exit Do
        c = c - 1
    Loop
    formula = c
    Total reports is the total number of pages I need for an individual report. There may be hundreds of individual reports for which I need to go through this duplication process.....
    Of course, the formula as written only counts down to 1 and prints "1" into a single instance of a report, but that is where I'm hung up - how can I get it to start with number 18 and count down to number 1, and to then move on to the next unique report?
    A million thanks in advance for any help!

    This returns a 1 for all instances in the test report I'm using.
    I didn't use the Roundup methodology because I need each instance of the report to return the value of units associated with the individual page/instance.
    For example, if there are 238 units of a product, and the parameter entry denotes a split of 25, then I need it to create 9 reports, each noting that it covers 25 units (9*25=225) and one report noting that it covers 13 units (238-225=13). The mathematical end of things is pretty tidy, but I'm having trouble figuring out how to get it to print the "25" nine times and "13" once..... I need it to print to the page prior to going into the loop each time:
    Dim c
    c = {@total_reports}
    Do While c > 0
        if c = 1 then Exit Do
        c = c - 1
    ----- PRINT VALUE TO PAGE LOGIC HERE -----
    Loop
    formula = c
    I rarely have to use the basic scripting, so I'm just not sure how to get it to do what I want....

  • I am trying to create a numbered list

    I am trying to creat a numbered list that looks like this:
    1-1-1
    1-1-2
    1-1-3
    and so on
    So that at the end of each sentence when I press 'return' the list goes from 1-1-1 to 1-1-2 and then 1-1-3 etc.
    Any information as to how to do that would be greatly appreciated.
    Thanks

    What you describe seems like a tiered number list.
    On the format bar, at the right where you would normaly select a list type, click on "Show More". On the Inspector pane that will apear select "Tiered Numbers".

  • I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    It is hard to exactly understand what you have  done or not by you one sentence description. My thought is have you read in the Pages User Guide? Here is what it says about updating a chart in Pages:
    Updating a Chart Copied from a Numbers Document
    If you’ve created a chart in Numbers, you can copy it and paste it into your Pages document. After it’s been pasted into Pages, the chart remains linked to the data tables it references in Numbers. To change the chart data, open the original Numbers document and edit the data there, save the Numbers document, and then refresh the chart data in Pages.To update a chart after you’ve updated its linked Numbers table:
       Select the chart on the page and click the Refresh button that appears.
    Note: You must save the Numbers document before copying and pasting your chart into your Pages document and after editing the Numbers data tables that the chart references.
    I hope it has helped you.

  • How to create inconsistent numbered list style?

    Can I create paragagraph style with inconsistent numbered list in InDesign CS4? I created a style with numbered list but when I apply it to the second list on another page of my document list numbering continues from last number of previous list (in consecutive order). What's up? I want to get the same effect as in Microsoft Word.

    Yesterday I created new discussion on topic of numbered list style.
    Then I found out about Restart numbering not working for numbered lists created w/ paragraph style one and began to experiment.
    I would like numbered lists to begin with #1 by means of style as on this page.
    I did it using Numbered List on the Control Panel. It does what I want.
    vzdljfh
    zsdlfkhc
    zsdfljg
    FSLjg
    sdkfugiaufos oieytroi stup pdi7 oeutp  9ue9tueopiti
    estiyoas9tuoe[au[topw[9 p uwepta[owru
    ueytaoiuetp9yeapotuyhopa
    lzsdrhfaio
    aseuyrfoi
    liayf
    hliughoudg
    I’ve created numbered list style (body text) that has no number at LEVEL 1 and use that to restart the numbering (see 2 JPG)
    Secondly, I’ve also created the Numbered List style as Dominic Hurley advises:
    This is result (see 3 JPG):
    And this is the final result of my work (see 4 JPG):
    1, 2 -7, 8, 9, 10, 11, 12 -18
    It is still all Greek to me.
    Please help me to understand this. What am I doing wrong????

Maybe you are looking for