Call a vi multiple times to check progress

My basic setup is that I have a caller vi calling a subvi.  However as the caller vi is looping i would like it to call the subvi and not wait for it to finish its execution.  Except i would like it to go to the next loop and then call the previous instance of the subvi to check on the progress.
I have attached some example vi sto show m point, where the caller_vi.vi calls the subvi.vi to bgein exectution.  Basically i would like it to call the subvi to run independantly and while it is running the caller vi can keep calling it to check on the vairables 'x=1' and 'numeric3'.  However if the subvi has finished running then it should begin another execution again when called from the caller vi
Thanks
Ps. I have played around with the reentrant options and Run vi methods to no avail so far
Attachments:
Caller_vi.vi ‏9 KB
subvi.vi ‏6 KB

Yeah the vi's I attached weren't the latest copies. So I have attached them again.
As for what I need:
What I would like is to call and run the subvi.vi from the caller_vi.vi and not wait for it to finish execution but return to the caller_vi.vi (For this I believe the run vi invoke node would be used with a false 'Wait until Done'...something similar to what is inside the case structure at the bottom of the Block Diagram)
While the subvi.vi is running the caller_vi.vi should continue doing loops and therefore when it is doing another loop it should call the subvi.vi again. 
From this new call I need it get the values for 'x+1' and 'Numeric3' only if the subvi.vi has not finished executing Otherwise it should run the subvi.vi again. SO if subvi.vi is finished then run again if subvi.vi is not finished then what is the value of 'x+1' and 'Numeric3'
Obviously I have not called the subvi.vi in the correct manner or else my program would have worked but the previous steps shows what I would like to get
 I hope that makes things clearer
Attachments:
subvi.vi ‏7 KB
Caller_vi.vi ‏9 KB

Similar Messages

  • Calling stored procedure multiple times in the JDBC receiver

    Hi,
    I am calling the stored procedure(SP) to update a DB table in the JDBC receiver.
    SP has 10 input parameters, and SP can receive one value for each parameter at a time.
    In my case, i will have multiple rows to insert using SP.i.e multiple values for each parameter.
    Its working correctly for a single value for each parameter, but when i have multiple values i want to call the SP multiples times.
    Is this possible and how?
    Thanks,
    Varghese.

    Varghese,
    I think you can have multiple statements in the JDBC Adapter's XML, as in http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm.
    Here the StatementName1 node can be inserted into your JDBC XML as often as you want.
    Kind regards,
    Koen

  • Problem Calling a WebService multiple times

    Hi Guys,
    I am a relatively new user of DS 12.2 doing a proof-of-concept to call an in-house WebService for a batch of customer records - lets say 1000.
    The WS has an input schema where it's parameters are within a nested table such that it can be called for many customers in a single call if desired. WS input schema (made-up example)=
    -WS
    --$REQUEST_SCHEMA **added by DS on import
    ---CustVerification
    src_nr
    src_state
    I have successfully been able to create a Data-Flow that builds the input-schema such that 1 WS call is made with a nested input of all 1000 customers. This works and the output from the single call is correct (many records relating to the many inputs etc). Input schema =
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    Now the problem - I am wanting to do this flow so that it calls the WS once PER customer i.e. 1 entry in many of the nested CustVerification structures.
    I have, again, been able to produce the correct XML schema (at least it looks correct) which repeats the Input Schema for each customer record. HOWEVER, when hooking this up to the function call of the WS as before, I either get only 1 single call like before with the last entry in the file run through it..... or, after playing with the query's input schema to add an extra root level and changing FROM clauses to map to the function call schema I then get a huge ACCESS_VIOLATION dump which mentions "LoadDFXML::put_string()+2427 byte(s)" and other such XML-related but non-helpful messages.
    New input schema is:
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    So.... am I missing something simple in how I call a WS multiple times as opposed to once with multiple inputs? Could this be a setting/property somewhere? IS this linked with how I do a QueryTransform in a certain way to get the function called the right number of times? Anything else??
    Thanks for any advice/help.
    Flip.

    Thanks for the responses guys.... I actually got past the error with a change to the NRDM structure (as mentioned in the first reply, I think a small problem here really changes things).
    So - what I had to do to get this working properly was to add a new 'dummy' level into the structure - this kept it clean to denote that the 1 large bulk of messages were going to be sent through the WS many times. So - structure looks like this:
    Input_Query:
    - <ROOT>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    </ROOT>
    Then, in the Output schema for the function call, I had to create a dummy extra schema level also - say 'WS_Call', and put the function call within this structure. The FROM mapping has to be set so that both the input_query level AND the input_query.root level are mapped to the WS_Call schema.
    And then it works!
    Summary -- its a bugger.... but playing with the structure levels (and adding your own at times) and FROM clauses can work!
    Cheers,
    Flip.

  • Calling same form multiple times

    Hi, i need to call a single form with different table names as parameters depending on conditions.
    for eg here is the approach
    if flag1_is_set
      call form1 multiple times with table1, table2....... as parameters
    "and i can avoid this
    "  form 1 using table 1
    "  form 1 using table 2
    "  form 1 using table 3
    "  form 1 using table 4
    "  form 1 using table 5
    elseif
      flag2_is_set
        form 1 using table 2
    elseif
      flag3_is_set
       form 1 using table 3.
    but i cannot call forms like this. can someone suggest
    an equivalent implementation on how to do this.
    if i dont implement in the above mentioned approach i have to code the same thing with minor changes multiple times
    thanks.
    your help would be appreciated.
    kranthi.

    You might try passing a field symbol (itab) in the tables.
    And assign the filed symbol with your itab as per the condition.
    Check if the program below gives you any idea.
    REPORT  Z_RAM_DYN_TAB_IN_FORM.
    PARAMETERS : P_TAB1 TYPE C.
    DATA: lt_users2 type standard table of usr02.
    DATA: lt_users1 type standard table of usr01.
    FIELD-SYMBOLS: <fs_itab> type standard table.
    SELECT * into table lt_users1 FROM usr01.
    SELECT * into table lt_users2 FROM usr02.
    IF P_TAB1 eq 'X'.
       ASSIGN lt_users1 to <fs_itab>.
    ELSE.
       ASSIGN lt_users2 to <fs_itab>.
    ENDIF.
    PERFORM test_form TABLES <fs_itab>.
    FORM test_form TABLES x_itab .
    FIELD-SYMBOLS: <fs_wa> type any.
    FIELD-SYMBOLS: <fs_field> type any.
      LOOP AT x_itab ASSIGNING <fs_wa>.
        DO 5 times.     "Write first 5 fields of itabs.
          ASSIGN COMPONENT sy-index OF STRUCTURE <fs_wa> to <fs_field>.
          WRITE :  <fs_field>.
        ENDDO.
        WRITE :/.
      ENDLOOP.
    Thanks,
    Ram
    Message was edited by: Ram Manohar Tiwari

  • Calling a servlets multiple times from a servlet

    Hi All,
    Advanced Thanks,
    I have a servlet which calls another servlet to display some records. Second servlet will access some data from XML files and forwards to a JSP file. What i want is I need to call the second servlet multiple times from the the first servlet. I used RequestDispatcher to call the servlet but I can call only one time after a an exceptions is occurred like cannot forward after response is committed.
    I need this scenario in the saem way because each time second servlet is called I am forwarding response to user each time records are accessed based on the request value.
    request.getRequestDispatcher("sample").forward(request, response);          
    Any one please give me a suggestion?
    Thanks in advance

    What are those servlets supposed to do? Sounds like that they are doing too much, e.g. acting like business classes or utility classes or so. Refactor your code.

  • Rendered Property calling managed bean Multiple Times

    Hi
    We have a problem within a command button in a jspx, which includes a rendered tag which references a managed bean method via EL.
    e.g.
    rendered="#{PERUserInfo.trainee}"
    When I debug the jspx, the PERUserInfo.trainee method is called 4 times instead of once.
    We have noticed similar findings when using managed bean methods via the rendered property. i.e. calls getters multiple times.
    Any idea why this is happening?
    We are using JDeveloper v10.1.3, JHS v10.1.3 SU1.
    All comments appreciated.
    Cheers
    Denis

    Denis,
    There can be many reasons why your bean method is called multiple times; but I would consider this perfectly normal in any JSF application considering all the lifecycles and (possible) Partial Page Rendering that happens.
    The question is, by the way, more appropriate on the JDeveloper forum since it is not directly related to JHeadstart itself.
    Hope this helps,
    Evert-Jan de Bruin

  • Calling a vi multiple times makes the timer "crash"

    I use a subvi for writing data from a profibusnetwork. In this vi I can set a timer for the "update" to write away the data. I use a global variable to remember the last time the writing was done. The problem I encounter here is that when I use this subvi multiple times only the data I want updated fastest will be written away.. My question is: Is it possible to use just this one vi multiple times instead of renaming it for every datasource I want to write away?
    Thx in advance,

    Use a while loop with an uninitialised shift register instead of a global,
    and build it into a function marked "re-entrant". This way different data
    exists in each different copy of it in the code.
    henk007 wrote in message
    news:[email protected]..
    > I use a subvi for writing data from a profibusnetwork. In this vi I
    > can set a timer for the "update" to write away the data. I use a
    > global variable to remember the last time the writing was done. The
    > problem I encounter here is that when I use this subvi multiple times
    > only the data I want updated fastest will be written away.. My
    > question is: Is it possible to use just this one vi multiple times
    > instead of renaming it for every datasource I want to write away?

  • How to call BADI Triggering Multiple Times

    Hi ,
        I got one requirement of Duplicate check for that i implemeted one BADI  in that i called Duplicat check function Module also so when i entered first, last and email id it is giving the message as Data is saved. when i entered the same data is entered it gives the message as Account is Duplicate and it wont save at that time when i modified the data then it wants to save that means it wants to call the duplicate check badi once again but thing is it wont save again it is giving the message as duplicate so for each change the badi wants to trigger agin and again but it wont so how can i do this one pls tell me which badi is suitable
    Regards
    Ravi

    I think you can do it by using the same BADI. you can just create a static data to keep the first, last and email id. If the first, last and email id are the same skip the duplication check.
    for examples:
      Method badi.........
        STATICS static_name TYPE name VALUE 10.
        IF static_name is initial.
          static_name = im_name.
          perform duplicate_check.....
        ELSE.
          if static_name ne im_name.
            perform duplicate_check.....
          endif.
        ENDIF.
      Endmethod
    Cheers,
    Chaiphon

  • Calling a webservice multiple times..

    Hi All,
    We have a requirment in which we are mapping a node "XXX" of an IDOC structure with a web service. Multiple occurences of a node "XXX" in IDOC are possible (1..9999). The web service is nothing but an array. At present there is a limit of 20 records per web service call. The records can belong to one or more "XXX" nodes. It is recommended to fill the array as far as possible. My mapping is working fine if there are upto 20 occurences of "XXX", but if there are more than 20 occurences of "XXX", the webservice should be called again to accommodate the remaining data. This is where I am getting problem.
                        Can anybody have an idea how can we implement this?

    Hi,
    >> As changing the SAP standard IDOC structures is not recommended.
    It is not required to change the IDoc structure, only modification needs to be done in the program that generates the outbound IDoc to create an IDoc with only 20 records i.e split the record and create a new IDoc for every 20 records.
    Thanks,
    SaNv...

  • SubmitForm calls the url multiple times

    when I execute the following
    function SendServer(){
    this.submitForm({
    cURL:"http://localhost:50676/aWeb/ProcessPDF.ashx",
    bPDF: true});
    from a form it performs several submits.
    I'd like to have a
    app.alert( "sent form....
    SendServer();
    app.alert("data sent to ....
    but the allerts show before the form is ever sent and also execute multiple times

    That's odd, and the oJavascript parameter wouldn't make any different here, even if you were submitting as FDF, which is the only time it's relevant.
    As a test, set the cURL parameter to use a mailto type URL, something like:
    mailto:[email protected]
    Does it attempt to submit twice now?

  • Upgraded to Mavericks and now I can't compress files, move files, preview files or open files outside of their native application. Ran disk utilities multiple times and checked file and folder permissions. Any ideas?

    For example, I'm trying ot move a group of jpgs from one folder ot another and it throws an 8058 error every time. PSD's won't open fromt he finder, it throws an application not found error even though I can open the same files from within the application.

    Yep, same here. Cannot drag and drop copy with Mavericks. A copy paste throws a 8058 error.

  • Why do I have to log multiple times when checking available downloads from iTunes?

    It's been going on for some time now.
    I'm finally getting around to asking.
    Every SINGLE time I download an app update, or purchase something, iTunes makes me log in with my password 2, 3, sometimes 4 times in a row.
    All the while, what I purchased/updated is downloading to my Mac.
    I am not entering my password incorrectly.
    I am already logged in to the iTunes store.
    What can I do to make it stop?
    It's annoying!
    Thanks.

    Make sure you are signed into the iTunes Store with the correct username and password, see this for more info -> iOS: Changing the signed-in iTunes Store Apple ID account

  • Custom tag library called multiple times

    Hi ppl ,
    I have a custom tag library which i use to populate some menu components. When i do call my custom tag library though , it is called multiple times, use case is as follows.
    I have menu tabs and menu bars which thanks to Mr.Brenden is working splendidly as so:-
    <af:menuTabs>
    <af:forEach var="menuTab" items="#{bindings.menu.vwUserMenuTabRenderer.rangeSet}">
    <af:commandMenuItem text="#{menuTab.MenuLabel}"
    shortDesc="#{menuTab.MenuHint}"
    rendered="true"
    immediate="true"
    selected="#{sessionScope.selectedMenuId == menuTab.MenuId }"
    onclick="fnSetSelectedValue('#{menuTab.MenuId}')" >
    </af:commandMenuItem>
    </af:forEach>
    </af:menuTabs>
    <af:menuBar>
    <af:forEach var="menuBar" items="#{bindings.menu.vwUserMenuBarRenderer.rangeSet}">
    <af:commandMenuItem onclick="return clickreturnvalue()"
    onmouseover="dropdownmenu(this, event,#{menuBar.MenuId}, '150px')"
    onmouseout="delayhidemenu()"
    text="#{menuBar.MenuLabel}"
    action="#{menuBar.MenuUri}"
    rendered="#{menuBar.ParentId == sessionScope.selectedMenuId}"
    immediate="true" />
    </af:forEach>
    </af:menuBar>
    </afc:cache>
    now all of this code is within a subview , and just directly below the subview tag , i have the call to my custom tag library:-
    <myCustomTagLib:menuCascade />
    only issue now is that assuming i have in all 7 menu bar components, the doStartTag is called 7 times. the relevant code within my custom tag class is as follows :-
    public int doStartTag() throws JspException {
    return (EVAL_BODY_INCLUDE);
    public int doEndTag() throws JspException {
    try {
    declareVariables();
    return EVAL_PAGE;
    }catch (Exception ioe) {
    throw new JspException(ioe.getMessage());
    and within my declareVariables method i do an out of the jscript ( out.print(jscript.toString()); ) which is a simple string generated based on certain conditions...
    now it seems to be working fine on the front end , but when i view the source of the page, i notice that the declaration is called multiple times, and this happens because the doStartTag method is called multiple times, i haven't even nested the call to the custom tag within the menu components , any clue as to whats going wrong ?
    Cheers
    K

    Hi,
    if you add the following print statement
    System.out.println("rendering "+FacesContext.getCurrentInstance().getViewRoot().getViewId());
    Then the output in my case is
    07/04/24 08:14:04 rendering /BrowsePage.jsp
    07/04/24 08:14:05 rendering /otn_logo_small.gif
    The image comes from the file system, which means it is rendered by the JSF lifecycle. If you reference the image with a URL then the lifecycle doesn't render the image but only refrences it.
    To avoid your prepare render code to be executed multiple times, just check for jsp and jspx file extensions, which will guarantee that your code only executes for JSF pages, not for loaded files.
    The reason why this happens is because the JSF filter is set to /faces , which means all files that are loaded through that path
    Frank

  • PrepareRender() called multiple times if I have HTML/Images on a JSF page

    I have extended ADFPhaseListener and also FacesPageLifecycle. I am overriding the prepareRender() method in the CustomFacesPageLifecycle.
    When I insert an image on to the page in the branding facet or add any html using verbatim tag, the prepareRender() method is called two times. I am not sure why?
    If I remove the images/html, the method is only executed once.
    If I have image/html in the page, another strange thing is that the first time all the custom lines of code gets executed in prepareRender() method. But the second time only first few lines of code in the prepareRender() method. This seems to me a very wierd behaviour.
    Any inputs from ADF product dev team?
    Thanks
    - Amit Kochar

    Hi,
    if you add the following print statement
    System.out.println("rendering "+FacesContext.getCurrentInstance().getViewRoot().getViewId());
    Then the output in my case is
    07/04/24 08:14:04 rendering /BrowsePage.jsp
    07/04/24 08:14:05 rendering /otn_logo_small.gif
    The image comes from the file system, which means it is rendered by the JSF lifecycle. If you reference the image with a URL then the lifecycle doesn't render the image but only refrences it.
    To avoid your prepare render code to be executed multiple times, just check for jsp and jspx file extensions, which will guarantee that your code only executes for JSF pages, not for loaded files.
    The reason why this happens is because the JSF filter is set to /faces , which means all files that are loaded through that path
    Frank

  • Init method is called multiple times

    Hi,
    init method in my servlet is called more than 1 time.
    I think it is supposed to be called only 1 time,when the application is loaded.
    anything to do with web.xml ???
    or else what r the situations that init method is called more than 1 time
    thanks

    Hi,
    actually I figured out the problem.
    I am using logger staements for debugging.
    I am also using singlethread model for servlet.
    I came to know that it creates multiple instances of servlet...
    which inturn calls init method multiple times.
    i took out that singlethread model,now it is working perfect.
    Thanks

Maybe you are looking for

  • How many photos can I share from my iphone 4S

    I am not able to use my laptop at work or install iCloud onto my work computer, so I want to email myself the photos on my iphone, though there is no function to show how much space is remaining for sharing depending on which platform I would like. N

  • Missing Functionality - Records retrieved by this Query)

    Hi The 'Records retrieved by this Query' function which was available in previous versions is now not available in 2007. Upon executing the query, the number of records do appear on the left but it can be awkward as the column doesn't size correctly

  • Need to disable Bluetooth

    I have a customer who needs to disable Bluetooth on his new Macbook Pro for work in a security zone. We have renamed the IOBluetoothFamily.kext and IOBlutetoothHIDDriver.kext files (System/Library/Extensions) but the device can still be turned on in

  • Clustering a JMS Topic

    I'm trying to create a distributed JMS topic using the wlconfig ant task (MBean). I can create a topic on a single server fine, but I can't figure out how to create a distributed topic that I could access on any server in the cluster. This is what I

  • CAPWAP-3-CAPWAP_PAYLOAD_TOO_LARGE

    Any ideas what this means? Nov  2 15:53:42 c1-145-ap 42: AP:000d.28f2.31ea: *Nov  2 22:53:40.582: %CAPWAP-3-CAPWAP_PAYLOAD_TOO_LARGE: Attempt to send capwap packet with payload exceeding max size. Payload Size: 2057, Maximum Allowed Payload: 1700Nov