Pass data from one VI to another one

Hi,
I try to control a event structure in a VI with a boolean command from a second VI. I have been advised to "build a connector to pass any data from one VI to another one".
Below an simple example: my goal is MyVItwo gives the result of a 2 numbers addition only when the boolean "MyBooléen" value changes in MyVIone.
How can I realise this?
Thanks
PB
Attachments:
Example.zip ‏10 KB

It is not entirely clear what you are trying to do. I think that what you want is a main vi/subvi setup. The boolean control would be in the main vi and would be monitored by an event structure. When the value of the boolean changes the subvi would be activated. I have attached an example showing how this is done.
In order to use a vi as a subvi you build a connector box. In order to do this you just right click on the vi icon at the top right of the front panel and select show connector. You then wire connections on the connector block to controls on the front panel. You insert the subvi into your main vi by choosing "Select a vi" on the functions pallette and browsing to the subvi.
If you absolutely have to pass the data from one vi to another while running in parallel there are a number of ways to do it. Global variables will certainly work but are generally avoided by experienced LabVIEW programmers due to their potential caveats and the break in data flow. An alternative to global variables is the functional global, also called a LV2 style global. This is basically a non-reentrant subvi with an unitialized shift register which allows for data to be stored. For more information search this forum for LV2 globals.
Another alternative is to obtain a reference to the control and operate on that reference. You could also use queues, notifiers, or occurences. Search the examples which shipped with LabVIEW for examples on using these operators.
If you need any more information feel free to post back here.

Similar Messages

  • Passing data from one frame to another frame

    hello all, i am having a problem with passing data from one frame from another. I have a main frame when you click on connect button it display the second frame(class) that has 2 text fields and 2 buttons. When i click on connect it check if the data is correct. If the data is correct i want that frame to close and pass the data back to main frame. How can i do that.
    thank you

    hello all, i am having a problem with passing data
    from one frame from another. I have a main frame when
    you click on connect button it display the second
    frame(class) that has 2 text fields and 2 buttons.
    When i click on connect it check if the data is
    correct. If the data is correct i want that frame to
    close and pass the data back to main frame. How can
    i do that.
    thank you
    the original problem sounded like an ideal opportunity to use Modal Dialog. if you want one frame to display another to get user input then you need to stop the method in the main frame from executing until you recieve a valid input.
    you can use your own class and keep all of the components that you have in the connect frame but you would have to extend JDialog instead of JFrame.
    there is a way around it!
    if you must use JFrame for both, then you need to have access to the main frame in the connect frame, maybe pass the pointer to the constructor??
    anyway, when the connect frame is done with its duties, you have to use the pointer to call another method in the main frame that will continue the process. otherwise main frame doesn't know when connect frame is done and by that time, the method in main frame that instantiated the connect frame has long since died.
    also, it allows things to happen in the other window that you may not want to happen until the connect frame is done
    typically users of software start clicking around on things and you could have three or four connect frames going at the same time
    it's really best to use a Modal Dialog, it really can look just like a JFrame!!!!!!!!!!!!!!

  • Passing data from one bsp application to another

    Hi,
    I have few queries that most of you would have done in ur projects:
    1. I want to pass data from one bsp application to another:
    eg based upon selected row of table view which populates material no and descriprion to another application which open the entire material master data.
    Now, i have both the pages in diff bsp applications in place but unable to pass the selected material code to the second bsp application.
    Had it been two different pages of same application I was able to achieve it with set parameter()
    2. To stop the application from reprcessing the data:
    eg: Suppose I have a bsp page where user fill details of a customer and on submitinng the details a customer is created in background and the entire page is disabled by my code. Even now if the user press refresh (F5) button then another customer gets created in the background. So basically i want to avoid the reprocess of the onSubmit event
    Few lines of sample code would be very helpful.
    Best Regards,
    Saurabh Tripathi

    Hi,
    When I am writing the following code in appl1/page1:
            export abc from transactionID
            to data buffer lv_page_data.
            CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>SET_SERVER_COOKIE
              EXPORTING
                NAME                  = 'TRANSACTIONID'
                APPLICATION_NAME      = RUNTIME->application_name
                APPLICATION_NAMESPACE = RUNTIME->application_namespace
                USERNAME              = ls_name
                SESSION_ID            = runtime->session_id
                DATA_VALUE            = lv_page_data
                DATA_NAME             = 'lv_page_data'
    and following code in appl2/page2:
      CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>GET_SERVER_COOKIE
        EXPORTING
          NAME                  = 'TRANSACTIONID'
          APPLICATION_NAME      = RUNTIME->application_name
          APPLICATION_NAMESPACE = RUNTIME->application_namespace
          USERNAME              = ls_name
          SESSION_ID            = runtime->session_id
          DATA_NAME             = 'lv_page_data'
        CHANGING
          DATA_VALUE            = lv_page_data
       IF lv_page_data IS NOT INITIAL.
         IMPORT abc to transactionid
           FROM data buffer lv_page_data.
       ENDIF.
    still the code doesn't work. Please explain and guide
    Best Regards,
    Saurabh Tripathi

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • Passing data from one screen to another(web-dynpro) in SRM sourcing cockpit

    HI Experts,
    i am facing problem in passing data from one web-dynpro screen and assigning the data it to another web-dynpro screen.
    my requirement is that when ever user selects a contract in PROPOSE SOURCES OF SUPPLY screen popup and press only assign only button, the data of the contract should be copied to the shopping cart.
    i have already used the BADI BBP_DOC_CHANGE_BADI, but unfortunately it was not working.
    so i tried to use the context, element and other web-dynpro fields to pass the data, i am able to pass the data from the popup to the second screen and able to assign it.
    but when ever i deselect the shoppping cart which has been assigned with the data of the popup and select another shopping cart the data of the above shopping cart is cgetting changed.
    i am unable to figure out the exact reason why this is happeing.i have written code in the ASSIGN ONLY button method to fetch the popup data and in the WDONMODIFYVIEW method of the second screen to assign the popup data to the shopping cart.
    i have tried to bind the elements using the BIND_TABLE, BIND_STRUCTURE, BIND_ELEMENT, BIND_ELEMENTS methods, but nothing is working.
    can anyone suggest me where i am making mistake and try to solve the issue.
    Thanks
    Tanveer

    Dear Poster
    Your thread has had no response since it's creation over
    2 weeks ago, therefore, I recommend that you either:
    - Rephrase the question.
    - Provide additional Information to prompt a response.
    - Close the thread if the answer is already known.
    Thank you for your compliance in this regard.
    Jason Boggans
    SAP SRM SDN Moderator

  • How to pass data from one internal session to another internal session

    hi all sap experts ,
    How to pass data from one internal session to another internal session and from oneExternal session to another external session.
    Except : Import and Export parameters and SPA/GPA parameters.
    Tell me the otherWay to pass data ..
    Plz
    Thanks in advance

    hi,
      abap memory management u will understand about this concept.
    the import /export parameter will help u that passing data between two internal sessions by using abap memory.
      for syntax
    Passing Data Between Programs
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens (see below).
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    Message was edited by:
            sunil kumar
    Message was edited by:
            sunil kumar

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • Passing data from one UIX XML page to another UIX XML page

    What are the various ways of passing data from one UIX XML page to another UIX XML page?
    (a) If no bc4j is used.
    (b) If bc4j is used.
    (c) If my event handler calls:-
    public static EventResult handleMyEventEvent( BajaContext context, Page page, PageEvent event) throws Throwable
    then how can I pass data to the next UIX XML page?
    Thanks,
    Paul.

    What are the various ways of passing data from one UIX XML page to another UIX XML page?
    (a) If no bc4j is used.For forwarded URLs; HttpServletRequest attributes [request], HttpSession attributes [session], ServletContext attributes [application].
    For redirected URLs; HttpServletRequest parameters url, HttpSession attributes [session], ServletContext attributes [application].
    (b) If bc4j is used.For forwarded URLs; BC4J Session properties.
    For redirected URLs; BC4J Session properties IF release mode is NOT stateless.
    (c) If my event handler calls:-
    public static EventResult handleMyEventEvent( BajaContext context, Page page, PageEvent event) throws Throwable
    then how can I pass data to the next UIX XML page?Return a UIEventResult (extends EventResult) from your event handler that has a data provider attached.
    This data provider will be accessible in the next page with the name "ctrl:eventResult", where "ctrl" is the short prefix for the namespace "http://xmlns.oracle.com/uix/controller".
    Regards,
    John Fallows
    Oracle Corporation.

  • How to pass Data from one form to the other

    Hi all
    Can any one suggest me how to pass data from one form to the other form, which i zoomed from the original one?
    I tried to do this by passing parameter in Event Procedure but i am getting error msg when i am opening the zoomed form.
    If any one of u have any idea, give me a reply
    Thank you
    Suhasini

    If you choose the second alternative you should erase these global variables after the second form is opened
    You can erase the global variable using:
    erase('global_var')
    Greetings,
    Sim

  • Passing data from a container to another

    Hi,
    Let's say I have two containers (Container1=application , Container2).  Container1 gets some data from user, perform some database lookup and displays Container2 with the results from database lookup.
    Container1 --(call and display)--> Container2
    Below shows  how I am using a bindable variable in Container1 to pass the data from Container1 to Container2.  Also shows how I display Container2 from Container1.
    <!-- Container1 -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
       [Bindable] public var foo:String = "bar";
       private function loginHandler(event:LoginEvent):void
          mycontainer2 = new Container2();
          mycontainer2.name = "mycontainer2";
          this.addChild(mycontainer2);
    </mx:Application>
    I am accessing the data in Container2 as follow:
    <!-- Container2 -->
    {mx.core.Application.application.foo}
    Q1) Is there a better way to pass data from one container to another and access the data?
    Q2) Is this the only way to call and display Container2 from Container1?
    Q3) How can I move back to Container1 from Container2, i.e. Container2 call and display Container1
           Container2 --(back to)--> Container1

    Best practices call for using custom events to share data between components. Here is my Flex 3 Cookbook post on the topic:
    http://cookbooks.adobe.com/index.cfm?event=showdetails&postId=15466
    To switch easily between containers 1 & 2 use a ViewStack, the gold standard for such interaction, and manipulate the selectedIndex or selectedChild property:
    http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_3.html
    If this post answered your question or helped, please mark it as such.

  • Problem in passing data from 1 screen to another using BBP_DOC_CHANGE_BADI.

    Hi Experts,
    i am new to the SRM, i am facing problem in passing data from one screen to another.
    my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
    we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
    i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
    i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
    as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
    can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
    Thanks
    Tanveer

    Hello,
    What version of SRM are you on?  Have you check for OSS Notes?  I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues.  The BADI works pretty well and it is called almost every time something happens to the shopping cart.
    I have noticed that sometimes that values are not changed til the second calling of the BADI.  I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check'  button to flush things out.
    I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
    Regards, Dean.

  • Passing data from one subreport to another subreport

    Post Author: GISGuy
    CA Forum: Formula
    I have a report which is really a series of subreports with very few actually requiring a direct link to another.  What I am trying to do is compare dates between different subreports and do conditional formatting to highlight where a dependant data source has an older date than the parent data source.
    We use Crystal Reports XI release 2, and the data resides in ArcSDE & Oracle 9.
    Any suggestions would be greatly appreciated.
    Eric Andersen
    Woodlands Information Management Technician
    Canadian Forest Products Ltd.
    Prince George, BC

    Post Author: synapsevampire
    CA Forum: Formula
    When your tagline is about the size of your post, you probably didn't convey much.
    You can pass values from one subreport to the next in the order they are placed in the main report by using shared variables, as in:
    //1st subreportwhileprintingrecords;shared datevar MyDate := {table.date}
    //2nd subreportwhileprintingrecords;shared datevar MyDate;if {table.date} = MyDate thencryellowelsecrwhite
    Covers the theory, for specifics you have to be in your post.
    -k

  • Pass data from one web application to another web application

    Hi,
    Please provide suggestion for following scenario:
    Scenario: Basically the aim is to transfer large amount of data from one application to another and display JSP of second application.
    User enteres data on a JSP of one web application. When he submits that data, another web application opens in new window and data from first application should be passed to this second web application. Another web application will display that data on its own JSP. User can perform whatever he wants on second application screen.
    Possible solutions:
    1) response.sendRedirect(): This makes GET request. But, there is large data to send. So, GET is not effective.
    2) forward(request, response): Can't use as I have to pass data to different application that is in another context.
    3) URLConnection: Here, I can make POST request and set attributes in HTTP request and make connection to another application. I can pass data using output stream. But, I can't display second application JSP to user even if I use input stream to read response. Because control will be ultimately in first application only.
    Is there any othe method to achieve this or any of the above options extendable?
    Please give your inputs.

    Hi,
    According to your post, my understanding is that you want to migrate list data from one web application to another.
    We can migrate list data programmatically, there are some articles for your reference.
    http://blogs.msdn.com/b/tejasr/archive/2007/11/12/code-snippet-copy-list-data-between-sites-programmatically.aspx
    http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/
    http://geekswithblogs.net/AnneBougie/archive/2009/01/23/copy-a-sharepoint-list.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • Need help in passing data from one page to other page in oaf

    Dear All,
    I have a requirement as below.
    I am doing some selection in one page and populating the data in another page table region, next time when i am selecting another row and pressing the button i need to display the previous row as well as new row, how can i achieve this, currently i am able to see only the first row what i selected first.
    Ex: 1 st scenario: after passing the selected data from one page to base page the data looks like below in base page.
    1 test desc
    2nd scenarios: when i am again selcting data and passing to the base page it should be like that
    1 test desc
    2 test desc
    but currently it is showing
    1 test desc only for the 2nd case, can any one please help me on thsi , its little bit urgent
    Thnaks

    How are you passing the values to the base page? Are you using setting the retainAM parameter to true while doing a forward.

Maybe you are looking for

  • Automatic PR for non-stock BOM component for Subcontract PO

    Dear Guru, Can you any master please advice me on below question? We have a subcontract PO with the BOM component of non-stock, can i know if there is possible for those non-stock BOM component to generate a Purchase Requisition automatically, any ex

  • Updated my Macbook Air to Yosemite and now IMessage won't open pictures

    I updated my Macbook Air to Yosemite a few days ago and since then IMessage has been acting up. It won't let open pictures now. A picture comes through titled "IMG_2882" but when I click on it, it comes up with a description of the image - the type o

  • Open programatically Crystal Report Viewer XI to display rpt file

    Thank you in Advance!!!    I got the following VBA code. 1) What library do I need to include to access Crystal Report Viewer XI? 2) How do I declare CRViewer11 to open Crystal Report Viewer XI and a created report?     Please look at ***???     Dim

  • Tournament Bracket component in flex

    I'm trying to write a application for a volleyball tournament i'm going to be having that basically creates a tournament bracket based of a array of teams i have.  If somone could just point me in the right direction to start i would appreciate it. T

  • Help me - Windows-8.1 - "Attempted Execute of Noexecute Memory (83387865.sys)"

    Yesterday night i tried to install Kaspersky Virus removal tool to scan my system to check my system for suspected behaviour As soon as i tried to install/scan my system crashed into Blue screen error page stating "Attempted_Execute_Of_Noexecute_memo