While/loop and reset the value i in time loop

Hello!

I have a question about the use of while/loop for.

I read the data of 5 devices.

Starting with the 0 position when I = 0, I read the data at position 0.

And when I click on NextPosition, then I = 1 and stop when I = 5.

But in the meantime, if I want to break the system of position 3 for now. I click on the BREAK.

I chose the position back to 0, it will go to this post.

But if I click on NextPosition, the value is always my 0 and not 1, which is the next position upward.

In addition, whenever I click NextPosition, it will count up to i = 5 and to stop the program.

Is there a way I can address the issue?

Thanks for trying!

I don't know what your needs are, so I guess you want to keep hitting the same device until you press the button of the next device and you want to be able to specify that one then.

In the attached code, I changed your mechanical action of the pause button and renamed position Reset.

I also changed the code suchthat conditionally, we increment the device number (only when the next button is hit).

I have alos moved local so that us do not draft times and put it in the case of the rest the structure so it is written or read but not both.

If this does not meet your needs;

1) look in bulb mode and see where I went wrong

(2) If you are unable to set up a truth table of all combinations buttn and doc what steps should occur for each condition.

Always trying to help,

Ben

Tags: NI Software

Similar Questions

  • update line and reset the value of the column

    I have table (CORS_MTR) with 3 columns...

    SEQ ID of the EPR the ID of the child / / desc
    100221one
    101222two

    new entry as 1 number , that means change the flow of child #

    102223three

    When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...

    SEQ ID of the EPR the ID of the child / / desc
    100222two
    101221one
    102223three
    103224four
    SEQ PRT_ID CHILD_ID DESC_
    100 22 1 one
    101 22 2 two
    102 22 3 three

    declare

    number of p_seq: = 103;

    number of p_prt_id: = 22;

    number of p_child_id: = 1;

    p_desc varchar2 (25): = 'a ';

    Start

    Update cors_mtr

    set seq = case when child_id = p_child_id

    then seq + 1

    other seq - 1

    end

    where prt_id = p_prt_id

    and child_id (p_child_id, p_child_id + 1);

    insert into cors_mtr (seq, prt_id)

    values(p_seq,p_prt_id);

    Update cors_mtr

    Set child_id = (select max (child_id) + 1 of the cors_mtr).

    desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)

    where child_id is null.

    end;

    SEQ PRT_ID CHILD_ID DESC_
    100 22 2 two
    101 22 1 one
    102 22 3 three
    103 22 4 four

    Concerning

    Etbin

  • How to measure and mark the value of real-time data?

    Hello

    I need to measure and trace in time real RMS value of EMG power. I did a VI. But I don't know why it didn't work. Can someone help me please? My VI is set in 2013 and 2011 both version. An example of data is also attached. Thanks in advance.

    Taslim. Reza says:

    I tried RMS PtByPt VI. But it has not been wired because the source was table 1 d of double and double sink.

    Well, ptbypt tools affect only one value at a time, so you must place them in a loop FOR. Here's how.

  • Need help to reset the values and toggle items based on a value

    Experts,
    I have a problem with the set_item_property
    Here's the background. I have a form with a single block, and a canvas. He has 10 points, depending on the value of the first element, the remaining items can be enabled or disabled.

    I wrote a trigger "pre-record", whereas before the outputs in the new record based on the value of the first element of the new record the other elements in the new record are enabled or disabled.

    The problem is any value of the box, if I put it in set_item_property ('blockname.item_name ', set', property_false), sound very good, but in a new record, when I tried to
    activate the same element to help set it set_item_property('blockname.item_name',enabled,'property_true) it does not work.

    In singles, I can do as property_false but not back to property_true.

    And when I used the command set_item_property ('blockname.item_name ', on', ") to reset the value back to its design time value form is to throw an error
    withMessage ' FRM-41046'.»

    Guys I need your help on this. Please let me know how can I this and why the error message when I try to reset the value.

    Property_false value ENABLED also affect the Update_allowed/Navigable FALSE at the same time. You must set these properties to return true explicitly, if that's what you hear ' market do not. Search for 'Propagation of changes to property' in Froms help for more details.

  • Assistance needed for the registration of the application and store the values in a table

    Hello

    Hope that this explanation is not confusing. I explained my application you want in the text below and also attached a skeleton VI + screenshot hoping that he will clarify

    I try to do a VI that does the following:
    1. some code (blue Subvi) runs every 200ms
    2. every 200ms, a random number is generated
    3. the random numbers are stored in a table in intervals of time s 0.8 ("iterations")
    4. at any time, the (blue Subvi) code needs to have access to the random numbers generated in 'the previous iteration.

    To clarify, the iterations are as follows:
    Iteration #1: 0 - 1.8 s
    Iteration #2: 2 - 2. 8 s
    Iteration #3: 3 - 3.8 s

    Iteration #4: 4 - 4.8 s
    ..
    And so on...

    So for each iteration: the blue (Subvi) needs to have access to the random numbers generated in the previous iteration, for example:

    Iteration #1 (0 - 1.8 s): The blue (Subvi) Gets an array that contains only the zero (random numbers are recorded for the first time)
    Iteration #2 (2s - 2 8 s): The code gets an array containing random numbers of iteration #1
    Iteration #3 (3 s - s 3.8): the code gets an array containing random numbers of iteration #2
    Iteration #4 (3 s - s 3.8): the code gets an array containing random numbers of iteration #3
    ..
    And so on...

    At any given time in time;
    -The code gets an array that contains all the random, recorded during the previous iteration numbers
    -Values since before her previous iteration are ignored and not stored anywhere

    Thus, for example, to the #7 iteration:

    -The values during the iteration #6 are made available to the code in the form of a table

    -Values of #1 to #5 iterations have been deleted and not stored anywhere

    It is important that all values since before recording the previous iteration are deleted because they are not necessary because VI actaual will work for a long period of storage of numbers a lot more than I have indicated here

    Screenshot of the skeleton VI:

    I tried to play with the paintings, the structures of the case and the registers at offset, but everytime I try I get something wrong

    The skeleton VI is also attached (Iteration_VI and Code_SubVI)

    Any suggestions?

    Thank you!

    Yes, I agree that you need help.  First of all, you really do need to learn more about LabVIEW - spend a few hours with the tutorials, such as those mentioned on the first page of the Forums.  Oops - links to the tutorials which had been present for years seem to have been moved "elsewhere" with August 2016 LabVIEW community reorganization.  But look for them...

    Here are a few screws that basically implement what I described above (with some minor modifications).  First of all, this is a Top level VI which runs at 5 Hz (200 msec waits).  It starts with an array of 5 elements of 0, then once per second, this is replaced by a table of random numbers generated by the Random 5-table sub - VI 5 elements.  Note that I do not use a loop timed - those who are really designed for LabVIEW RT, but use the simplest functions on the Palette of the timer.

    Can't you see how that works?  The array to initialize on the left begins you with a table of 5 elements of 0.  The Timer inside the loop, it runs at 5 Hz, 'Index' counts 1, 2, 3,... to tell you where you are, and 5 shows you everything that lives on the shift register.

    Now sub - VI Random 5-table is supposed to do the following - if she was called to 5, 10, 15,..., it must return a (new) array of 5 random numbers, otherwise, it must return the array that was passed in.  So if all "works", table 5 shows 0, 0, 0, 0, 0 for the first second, a table at random for the second second (which is not superfluous!), a different for the third random picture second and so on.  I have already said a way to build this, but I chose a slightly different method (equivalent).

    Whenever it is called, a new random element is generated and added at the end of a (growing) random table stored in the shift register.  If size become 5, we send this Random-table-of-5 out through Out table and reset the register shift to an empty array.

    The case by default (when the size is not equal to 5) is shown below - we just return the array of entry to and accumulate new random table in full growth.

    These code fragments extracted from VI.  If you have LabVIEW 2016 (see the "2016" at the top right of the image?  This shows that it is a snippet of code LabVIEW 2016), you can open a blank diagram and drag this image, where magic OR converts it to a VI.  Otherwise, the code yourself and try out it.

    Caution - it is designed to run once.  If you run the program of high level, a second time, you may find that the new Random 5 - table appears to 0.4 ", 1.4", 2.4"(instead of 1", 2 ", 3").  I leave as an exercise for understand you to (a) why he is and (b) fix the code.  If you can't do that, then move an another 3-4 hours with the LabVIEW tutorials (or start playing with this code, edit it in some small way and to understand how it works).

    Bob Schor

  • Reset the value of the selection list

    APEX version: 4.2.2

    I'm fighting to implement a solution to reset the value of an element from the list of selection on a page in my application.

    I currently have about 4 pages in my application with a level of tabs with every page on its own tab.

    I have a report of Emp page that lists employees. The page contains an element of selection list for emp_no who submits the page when the value changes. The query for the list of selection queries the emp for name and emp_no table. It has:
    Display additional values: Yes
    Display Null values: Yes
    Display NULL value: all THE
    Return NULL value:
    (no value for the return NULL value)
    Page, in itself, works the way you want. During the first visit to the page, EVERYTHING is selected and the report shows all the EMOS. If I select a specific employee, the page refreshes with just this employee.

    On the Main page is another employee list report. The report has a link between the employee id column and the Emp report page. The link sets the value of Emp.emp_no to the value of Main.emp_no. It works very well so if I take emp hand 123, 123 shows Emp.emp_no and the report shows that retail for emp 123.

    The problem is when a specific employee has been selected previously from the homepage or the Emp page and I click on a tab to another page, say the status tab / page and then click on the tab of the page of the Emp. The current behavior of the page, is that it continues to show some used was previously selected regardless of how it has been set, either Emp or to the homepage page. I want to reset select Emp.emp_no ALL (or null) if I navigate to the page of the Emp to any other page except hand or Emp itself.

    I searched through the forums and tried to use processes at the level of the page and after region to reset the value of Emp.emp_no, but nothing has worked. I believe there is a 'simple' way to do it that doesn't require coding on each page to set Emp.emp_no on a null value before calling it.

    I would like ideas on solving this seemingly simple task that has managed to escape.

    Thanks in advance.

    cagora

    Use a query in your link for filtering the selection list. Create a compuation on the definition page of the selection to NULL list if the request is NULL > PL/SQL Expression >: APPLICATION IS NULL. In this way, you can check the list of selection gets nulled while accessing the page normally.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    https://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    If you allowed anyone remote access to your computer (and you're talking about a computer since you mentioned iOS which is the OS for iDevices; computers run on Mac OS X), while no one knows what they were able to install. Assume the worst and:

    Notify your credit card company / bank of potential fraud

    Change your bank accounts and report your fly/fraud credit card

    Change all of your passwords

    And, finally, erase your entire hard drive and reinstall the OS from scratch using recovery or your original installation disks.

  • How to reset the value of selectOneChoice when it is af:table

    12.1.3 Jdev

    I need to reset the selectOneChoice of the first empty value when you click a Refresh"" button.  The selectOneChoice is located in one of the columns of af: table.  I tried to reset by getting the selectOneChoice component and set the value to «»   Please see the snipplet of code for more details. However if the selectOneChoice is not within the af: table, then using the same way to reset works!

    in jspx

    "< af:commandToolbarButton id ="ctb15"icon="/images/refresh_qualifier.png "shortDesc ="Refresh"action =" #{viewScope.backing_requestOverview.onRefresh} "partialSubmit ="false"> < / af:commandToolbarButton >"

    < af:table value = "#{bindings." ItasTaskAssigneesListVO1.collectionModel}.

    var = "row".

    lines = ' #{bindings. " ItasTaskAssigneesListVO1.rangeSize}.

    emptyText = "#{bindings." ItasTaskAssigneesListVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    fetchSize = "#{bindings." ItasTaskAssigneesListVO1.rangeSize}.

    rowBandingInterval = '1' id = 't4 '.

    styleClass = "AFStretchWidth."

    columnStretching = "column: c1.

    rowSelection = 'single '.

    selectionListener = "#{bindings." ItasTaskAssigneesListVO1.collectionModel.makeCurrent}.

    selectedRowKeys = ' #{bindings. " ItasTaskAssigneesListVO1.collectionModel.selectedRow} ">"

    < af:column id = "c6" headerText = "Action".

    rendering = "#{bindings." EventLevelTypeCode.inputValue! ' = ' 10 G ' & amp; & amp;! viewScope.backing_requestOverview.isReadOnly} ">"

    < af:selectOneChoice id = "soc2".

    autoSubmit = 'true '.

    valueChangeListener = "#{viewScope.backing_requestOverview.onChangeMyPendingAction} '"

    Disabled = "#{!}" line. TaskActionEnabled} ">"

    < f: selectItems value = "#{backing_requestOverview.actionsMap [row." StatusUid]} ".

    ID = "si3" / >

    < / af:selectOneChoice >

    < / af:column >

    < / af:table >

    < af:selectOneChoice id = "soc222" >

    < af:selectItem label = "Complete"

    value = "COMPLETE"

    ID = "si4" / >

    < af:selectItem label = "Assign".

    value = "ASSIGN".

    ID = "si555" / >

    < / af:selectOneChoice >

    Java bean:

    public String onRefresh() {}

    RichSelectOneChoice actionDropdown = (RichSelectOneChoice) JSFUtils.findComponentInRoot ("soc2");

    actionDropdown.setValue("");

    RichSelectOneChoice actionDropdown2 = (RichSelectOneChoice) JSFUtils.findComponentInRoot ("soc222");

    actionDropdown.setValue("");

    If (actionDropdown! = null) {}

    AdfFacesContext.getCurrentInstance () .addPartialTarget (actionDropdown);

    }

    If (actionDropdown2! = null) {}

    AdfFacesContext.getCurrentInstance () .addPartialTarget (actionDropdown2);

    }

    }

    Please notify.

    Thank you

    -Mina

    The root of the problem remains the same. As long as you don't set a value for each of SPC property that you use, you cannot reset them without running into trouble.

    An soc within a table must be stored too, you must provide the form of attribute value each of them. If you only use a soc, to distinguish the action to take, it belongs in the table.

    Timo

  • How to reset the value of a list of entry of null values

    Hello

    Jdev 12.1.3.0

    How to reset the value of a list of entry of null values

    Thank you

    AR

    Place this code in your ViewRowImpl (base) class and use it when you need to reset _all attributes applied by LOV

    @Cvele: in fact, this will happen "by design" when you set the attribute which has attached lov to null, so there is no need of additional code.

    See also this blog: binary: prevent the execution of query unwanted in British Colombia ADF when used in Non - UI applications

    My previous answer is more related to this approach:

    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bindings.findIteratorBinding("IteratorName");
    Row r = iterator.getCurrentRow();
    r.setAttribute("SomeAttrib", null);
    

    Dario

  • reset the value of entering text on certain conditon

    Hello

    I'm new to ADF.this is my first post. I entered text.i want to clear or reset the value of certain conditions. How to do this?

    Bind the inputText in managed bean and try the resetValue() method by setting if and other condition

  • Reset the value of the item page to null

    Hello
    On one of the pages of my site, my I list of some articles and each value of the element is a link, and if I click on the name of the element, a pop up appears which shows me the history of the issue. This pop-up history item, I have two elements of date picker where I provide the start and end date between which I want to see the story from this point. I add two calculations (before header) to set the values of the selectors of dates for the minimum and maximum dates for the mark of history goes back to this article in the database and on the first time, a complete history of the item turns in pop. Now I can choose my own minimum and maximum dating bicker date element and press a button, now the pop up refreshes and shows me the story between the dates, I have chosen.
    Now I close the pop-up windows and click on something else, but here when pop up is charged, I see the old values of date (that I selected for the previous article) in the date picker and ideally my calculations must have worked and dates selectors should see the minimum and maximum dates for this item.

    Can someone help me solve the problem so that if ever a new pop-up is open to a new element, the element in date picker must have updated them to the values that should be linked to the new item I clicked on that moment rather than date of previous section values.

    Thanks in advance

    Salman

    Hello Salman,

    I think I understand now what you are aming at.
    You say you have a calculation for the popup that defines the values where they are used for the first time. What conditions you have on these points? I guess they are submitted every time that you run the update, so the State of the item is updated with these values. If you don't reset it, these values will persist and be taken to the next item, which is what you currently see.
    You can place a process in your calling page that resets the page desired elements to be null before your calculation evaluates their condition, so the calculation allows you to retrieve the values of database. Another option would be to send a trigger element (for example a hidden item PX_TRIGGER get value 1 on submit) to the target page, which is part of the condition of your calculation (PX_TRIGGER = 1) and reset the trigger in your calculation (: PX_TRIGGER = 0).
    Please correct me if I am wrong.

    -Udo

  • Reset the value of a group of Radio

    Hello

    I have several groups of radio... If I click on one, I want to reset the value of the other null... How to do...

    Thank you

    Hello

    The value radio attributes of HTML form elements

    onchange="$s('Px_YOUR_ITEM','')"
    

    Where Px_YOUR_ITEM is another name of radio group like you reset

    Example here
    http://Apex.Oracle.com/pls/OTN/f?p=27625:1

    Select first something ename radio and then select Yes / No radio must be able to deliver

    BR, Jari

  • My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    My 4th generation Apple TV installed an update and asked my password which he refused to accept time and time again. How to go beyond this screen and reset the unit?

    If she needs your Apple ID password and you have enabled 2-factor authentication, you might have to temporarily disable the connection to complete.

    Also, you need an internet connection to perform this step here.

    If your problem is not of the above, please describe more completely. Furthermore, to give specific messages on the screen.

  • How do I click on a cell in a table control and display the value in a string?

    What I want to do is click on a cell in a table control and have the value of the cell in an indicator of the chain. Cell that ever I click on, I wish that the value to be displayed in the indicator.

    Thank you!

    Use the property "Change Position".

  • How to acquire and store the values of DAQmx analog voltage (I do not want the graphic, but strings and values in a chart)?

    Hello

    How acquire and store the values of voltage DAQmx?

    I tried several code example, but they can't get the chart. I don't want to chart. I want to measure exactly the analog voltage values and record these values - as an excel chart, that contains the selected channels and voltage values.

    What the example code that I can use?

    My hardware is NI PCI-6251.

    Thank you very much.


Maybe you are looking for