Similar code to n=n+1 (n=n+x) with conditional variable to stop

This may be an simple algorithm, but I can't do it.
I need to do a VI with an algorithm so similar to n=n+1 , but I need 2 variables, something like n=n+x, and other conditional variable (numerical control).
I need to enter the values n and x with a control and after the sustraction of these values but I need to print the value and after repit the process until the conditional value, and impress all the values incluiding the the first n value and the conditional value. And stop the process when the value is equal to the conditional value to get a data.
Basically
n=n+x
n=0
x=2
Conditional value (y)
y=10
and impress all the values in a data
n=0 (impress)
n=0+2 -->2 (impress)
n=2+2--->4 (impress)
n=4+2---->6 (impress)
n=6+2---->8 (impress)
n=8+2---->10 (impress)
And get a data like
0
2
4
6
8
10
The real problem is that I need enter with numerical controls all values and get the data with the n's first value and the conditional value.
If someone can help me, I appreciate it very much.
Thanks

ramktamu wrote:
This is what you are looking for.
The stopping problem has already been mentioned.
The "first call?" and "select" can be eliminated by initializing the shift register with "n".
Unless the "x" and "y" are allowed to vary during execution of the loop (would need very fast fingers and would generate irreproducible results!), these terminals belong before the loop. No need to go to the UI to re-read their value with every iteration of the loop.
Typically, the number of iterations can be calculated from the inputs using simple math, so a FOR loop would be much more appropriate and efficient here.
Try to simplify according to these comments and re-post.

Similar Messages

  • How do you effectively use if,for, type loops in TestStand. Do you have to use the goto command or is there a way of writing actual c type code (perhaps using the statement step in teststand) with the variables allready declared.

    Thank you
    Arik

    I assume your loop is more than just one step. You should use the 'Loop Options' for a single step.
    For looping on a group of steps, you can place them all in a sub sequence and then set the 'Loop Options' for the 'SequenceCall' step to set up your looping conditions. Pass values to and from the sub-sequence by Parameters.
    You can keep the loop inline with the rest of your sequence by using 'Goto' or using 'Goto destination' in the Post Actions tab of the condition step.
    Using a sub sequence will keep it easier to read and maintain.

  • Trying to load illustrator 6cs onto new mac and the old activation code for my ill cs doesn't work with it

    Trying to load a downloaded version of illustrator 6cs onto new mac and the old activation code for my illustrator cs doesn't work with it.  Do I need a new code or am I missing something?  Same goes for my Photoshop cs.

    you need your serial number.
    if you purchased from or registered with adobe check your account, https://www.adobe.com/account.html

  • I have remote locked my mac using find my iPhone app via my iPad - I am unable to enter the unlock code as the mac keyboard won't pair with the mac - I guess that will teach me for playing...any ideas?

    I have remote locked my mac using find my iPhone app via my iPad - I am unable to enter the unlock code as the mac keyboard won't pair with the mac - I guess that will teach me for playing...any ideas?

    Thought so - ace - find my phone really needs an unlock function. - another £40...

  • Code 91 - Caused Error: (Object variable or With block variable not set)

    Hi,
    We are using FDM 9.3.1. We have enabled batch processing.
    We are having following process being followed
    - Batch Loader script will pull the data from dwh table for each entity, scenario, year and period
    - Batch processing is set to serial and processlevel set to Up-To-Check
    - We had following five files created for Location - EMAFF100
    i. 1_EMAFF100_ACT_May-2011_RR.txt
    ii. 1_EMAFF100_ACT_Jun-2011_RR.txt
    iii. 1_EMAFF100_ACT_Jul-2011_RR.txt
    iv. 1_EMAFF100_ACT_Aug-2011_RR.txt
    v. 1_EMAFF100_ACT_Sep-2011_RR.txt
    Batch loader process completed the processing for May - 2011, Jul - 2011, Aug-2011, Sep-2011.
    But for Jun 2011 it has given the following error in the 'tbatchinformation' table and failed at import stage.
    40751.6239236111 1_EMAFF100_ACT_JUN-2011_RR.TXT 2 2 91-Object variable or With block variable not set
    When we checked the view error log from tool menu we found following
    ** Begin FDM Runtime Error Log Entry [2011-07-27-14:58:29] **
    ERROR:
    Code......................................... 91
    Description.................................. File [1_EMAFF100_ACT_Jun-2011_RR.txt] Caused Error: (Object variable or With block variable not set)
    Procedure.................................... clsBatchLoader.mFileCollectionProcess
    Component.................................... upsWBatchLoaderDM
    Version...................................... 931
    Thread....................................... 5600
    IDENTIFICATION:
    User......................................... ncreighton
    Computer Name................................ HYAPSDEV1
    App Name..................................... EMATTEST
    Client App................................... WebClient
    CONNECTION:
    Provider..................................... ORAOLEDB.ORACLE
    Data Server..................................
    Database Name................................ hydev_serv
    Trusted Connect.............................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location..................................... EMAFF100
    Location ID.................................. 762
    Location Seg................................. 16
    Category..................................... ACT
    Category ID.................................. 13
    Period....................................... Jun - 2011
    Period ID.................................... 30/06/2011
    POV Local.................................... False
    Language..................................... 1033
    User Level................................... 1
    All Partitions............................... False
    Is Auditor................................... False
    We then re submitted data for Jun period and saw batch process got successfully completed and June data got imported successfully and also rest other processes got through.
    Can any one provide exact cause for this error? As we have automated the data load from DWH to FDM And then to HFM. Hence when such error comes it disturbs lot of processing there on. Appreciate your early response.
    Thanks in advance.

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Are you aware of any software similar to ADSL Navigation Tools that can be used with in Mac?

    Are you aware of any software similar to ADSL Navigation Tools that can be used with in Mac?

    The popup message always warns to do a backup first since there is the potential of lost data if the upgrade fails.
    Sadly, your only option at this point is to restore and hope there is a backup stored from a previous sync.
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414
    Unable to Update or Restore
    http://support.apple.com/kb/HT1808

  • I have to type my security code every time I turn on my ipad with ios6.0. I don' have to this with ios5.1. How can I solve this problem?

    I have two problems with IOS 6.0.
    1. I have to type my security code every time I turn on my ipad with ios6.0. I don' have to to his with ios5.1. How can I solve this problem?
    2. I can not send email via Yahoo as usual, Only Safari allow me to it.
    Accordingly, I am writting here to ask for to solve those problems.
    Thanks in advance.

    * Websites remembering you and automatically log you in is stored in a cookie.
    * You need an allow cookie exception (Tools > Options > Privacy > Cookies: Exceptions) to keep that cookie, especially for secure websites and if you let cookies expire when Firefox closes
    * Make sure that you do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    See also http://kb.mozillazine.org/Cookies

  • TS1292 My code is all letters and does not begin with X. Does this mean it is invalid ?

    My code for the iTunes gift card says invalid. The 16 digit code is only letters and does not begin with x. What do I do ?

    Where exactly is it getting stuck? When you turn on highlight execution what is it dong?
    From looking at the top level VI though I bet your problem is that you are using the equals function to stop the loops. Your I32 gets type cast as a dbl, and the chance that they are equal is very slim.
    The reason is that doing an equal compare of doubles is never a good idea. The double may show up in your indicator as 1 but if you increase the digits of precision on that control you would see that is was actually something like 1.0000000000000001. So your math may lead to 1.000000000001 and the conversion of the I32 to dbl may lead to 1, therefore they are not equal and the loops will not finish.
    Take a look at this KB Comparing Floating Points Does Not Seem to be Working Properly.
    and this one: Why Do My Floating Point Numbers Lose Precision?

  • FileSystemWatcher similar code in Java

    Hi All,
    I am trying to write a code which aims to move a file from a specific folder to an another folder. This program starts everyday at 7:30 am and ends at 16:30 . Rather than implementing an hourly check, I wanted to control the folder and whenever a file is copied into that folder it should be moved immediately to the other folder. .Net is supporitng this with FileSystemWatcher (I guess). Is there any possibility to implement a method such like this?
    Thanks for your answers.
    Regards
    Message was edited by:
    legolas066

    http://www2.hawaii.edu/~qzhang/FileSystemWatcher.html

  • Why 2 similar codes - 1 works the other doesnt?

    1st Code:
    INSERT INTO DWCUSTOMERTEST
    (CUSTOMER_KEY,CITY,STATE,POSTAL_CODE,GENDER,REGION,COUNTRY,OCCUPATION)
    SELECT CUSTOMER_KEY.NEXTVAL AS customer_key, CITY, STATE, POSTAL_CODE, GENDER, 'N' AS REGION,
    'Australia' AS COUNTRY, OCCUPATION FROM NAUSCUSTOMER
    WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSCUSTOMER');
    THIS CODE INSERTS THE ROW PERFECTLY INTO DWCUSTOMERTEST
    2nd Code:
    INSERT INTO DWPURCHASESTEST
    (PRODUCT_ID,TIME_KEY,C.CUSTOMER_KEY,SHIP_DATE,COST_PRICE,SELL_PRICE,
    PURCHASE_PRICE,SHIPPING_CHARGE)
    SELECT P.PRODUCT_ID, TIME_KEY, CUSTOMER_KEY, SHIP_DATE, P.COST_PRICE, P.SELL_PRICE, N.PURCHASE_PRICE, N.SHIPPING_CHARGE
    FROM PRODUCT P, TIME, DWCUSTOMERTEST C,NAUSPURCHASES N
    WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES');
    THIS DOES NOT INSERT INTO DWPURCHASESTEST. It gives the following error:
    WHERE rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES')
    ERROR at line 8:
    ORA-00918: column ambiguously defined
    I understand the meaning of the error. But I don't understand what is wrong. Can someone please shine a light?

    I have entered this code in:
    INSERT INTO DWPURCHASESTEST
    (PRODUCT_ID,TIME_KEY,CUSTOMER_KEY,SHIP_DATE,COST_PRICE,SELL_PRICE,
    PURCHASE_PRICE,SHIPPING_CHARGE)
    SELECT N.PRODUCT_ID, N.TIME_KEY , C.CUSTOMER_KEY , N.SHIP_DATE, P.COST_PRICE, P.SELL_PRICE, N.PURCHASE_PRICE, N.SHIPPING_CHARGE
    FROM PRODUCT P ,NAUSPURCHASES N, DWCUSTOMER C
    WHERE C.rowid NOT IN (SELECT row_id FROM ERROR_EVENT WHERE table_name='NAUSPURCHASES')
    BUT i get 0 rows created. I don't understand why. In order for you to understand the situation better:
    DWCUSTOMERTEST(CUSTOMER_KEY, CITY, STATE, POSTAL_CODE, GENDER, REGION,
    COUNTRY, OCCUPATION)
    DWPURCHASESTEST(PRODUCT_ID, TIME_KEY, CUSTOMER_KEY, SHIP_DATE, COST_PRICE,
    SELL_PRICE, PURCHASE_PRICE, SHIPPING_CHARGE)
    THESE are the 2 table schemas
    CUSTOMER_KEY is a surrogate key. Several filters have been made and recorded to the ERROR_EVENT TABLE prior to this attempt at populating DWPURCHASESTEST.
    Does anyone know how to solve my problem? If it aint clear, what other information do you guys need? Thanks so much

  • My bluetooth keyboard (Macnus 3.0) is recognised by my iMac but will  not pair?  I have paired it with my iPad using code 8310 but it still will not pair with my iMac.  Can someone help please?

    My bluetooth keyboard (Macnus brand - bought recently in Thailand)(similar to Mac small keyboard) will pair with my iPad using code 8310,and is recognized by my iMac but will not pair?
    There are very scant instructions with the keyboard and no mention of any code (the code was prompted by my iPad).
    I have followed the instructions but it still will not pair with my iMac!
    Can anyone help please?
    My iMac is 20 inch  Mid 2007 OSX10.9.1 4GB RAM

    Hi All, thank you for you suggestions.  I have been unable to find any website for the maker, but have looked at several Thai/cambodian sites incl <http://www.buycoms.com/Article/8435/index.asp>  which mentions the keyboard being suitable for tablet or windows.  No mention of iMac!  although the box is branded to indicate Mac compatable.
    I'm thinking that maybe it just will not pair with an iMac.
    Ill keep looking for the maker website, which might come on later in the future? maybe?
    thanks again.

  • Acrobat Adobe Pro XI will not run due to error code 213:11 after downloading from creative cloud with no issues.

    I have uninstalled and reinstalled 4 times, have added plugins to firefox and to no avail.  I have contacted support twice, was disconnected once and the second time was told to uninstall and reinstall and my account was closed as fixed.  I have reinstalled with the firewall off. same error code.
    what is the problem??? I am pulling my hair out!  I purchased in mid-Aug to use for school and have not been able to create one useable document yet.
    I need the Acrobat pro, that is all I care about!!
    some one please help!!!
    Sharon

    Hi 5unflower,
    Please run the patch mentioned in the KB: http://helpx.adobe.com/acrobat/kb/error-213-19-licensing-acrobat.html
    Regards,
    Rave

  • ITunes recently decided my debit card's security code in invalid.  But nothing is wrong with the code or my card.  how do I fix this?  Apple support doesn't have a clue what they are doing and will not call me to fix this.

    My bank sent me a new Debit card because of some security issue.  It has the same number as my previous card but new experation and new security code. It worked fine for months then all of a sudden Itunes decided the security code is invalid.  Now I can't even update my phone. 
    For the last week I have been going back and forth over email with apple support to fix it, but they keep telling me the same fix that doesn't work and frankly they are the worst support group I have ever worked with.  I can't even get anyone to answer a phone, its just back and forth by email everyday.

    Debit card? Are you sure?
    USA iTunes Store does not appear to accept debit cards - http://www.apple.com/legal/itunes/us/terms.html  "The iTunes Store, Mac App Store, App Store, and iBookstore services (“Services”) accept these forms of payment: credit cards issued by U.S. banks, payments through your PayPal account, iTunes Cards, iTunes Store Gift Certificates, Content Codes, and Allowance Account balances."

  • Tax code is not picked up while doing ERS with T. Code. MRRL

    Hi Experts,
          I have got one Scheduling Agreement of certain material and based on goods receipt quantity user is performing ERS with T. Code MRRL. but when we are seeing different invoice documents generated by ERS with T. Code MIR4 for the same Scheduling Agreement, we are finding in some invoice document(In Basic data tab) didn't pick Tax Code and some invoice documents have picked Tax code.
    Following things are already maintained.
    1) Scheduling agreement is having tax code maintained.
    2) ERS field is ticked in Scheduling agreement
    3) Vendor is ticked for ERS
    4) GR based IV is ticked in Scheduling agreement
         Can some body suggest why this is happening

    Hi.,
    have u maintained the info record & tax code in info record for that particular material.
    please check it.
    Regards,
    Satpal

  • How do I fix an error code 0x000000c1 when install a printer officeject 6500 with windows 7 64bits?

    I am having a problem try to restall my printer back onto my Laptop Windows 7 system. I continue to get the completed down load and on the last step the error code comes up with 0x000000c1. Can someone help please?

    Sorry that you are having a problem with re-installing the software and drivers for the printer. 
    How are you uninstalling your product? It may still have old software on the computer, and it's getting confused between the re-install. 
    Try the link below to perform a L3 uninstall. Then re-install again. 
    http://h30434.www3.hp.com/t5/Printer-All-in-One-Install-Setup-e-g-Windows-8/Uninstall-Software/m-p/2...
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

Maybe you are looking for

  • G/l account creation error

    Hi Gurus, Within my chart of accounts, I have defined the number range 100000-399999 for b/s items and from 400000 up for i/s items. However, when i try to create i/s accounts, i get the following error: Make an entry in field "P&L Statement Acct Typ

  • Jerky performance in iBooks widget and Animate Deployment Package

    Hi folks, I'm making a interactive children's book using Edge animate as I wanted it to be full of rich interaction, animation etc. My plan is to make the whole book in Edge and then drop that Edge file into either iBooks author or Adobe DPS. When I

  • Deletion of duplicated table entry

    Hi! I am facing with the following error after the system copy of SAP ERP 2005 on Windows migrated from MS SQL to SAP DB. By entering into the db-relevant tcodes (DB13, dbacockpit, etc.) the following error appears: Runtime Errors ITAB_DUPLICATE_KEY

  • Font bug with SMC (Management console)

    I have got a bug with the font in Solaris Management Console, and only with it. With Xorg, the font are corrected displayed, but with Xsun, there are horible. I think there a problem with XSun, or with SMC, but I didn't know Xsun. Thanks.

  • OBIEE and Oracle OLAP Value Based Hierarchies

    Hi there... I have a value based dimension built on Oracle OLAP and want to map it on OBIEE Administration tool. I've been using the above link as reference: http://www.oracle.com/technology/obe/olap_biee/CreateBIEEMetadata.htm There's no option to i