Passing data from a subvi to the top level with continuously running loops

Hi All,
This is a very simple question, for some reason the data available at a subvi indicator is not making it to the top level vi. I think it might be something to do with the while loop I am using but I cant figure it out, any help will be appreciated. I don't think I fully understand how the data gets out of a continuously running loop.
GPSdisplay runs a driver called GPS.vi (im not worried about my event structure just yet which might be wrong, but I am yet to test that bit yet) Probe 1 should have the values from GPSCluster
Loop within GPS.vi. GPSCluster (Probe 2) is being updated correctly
I cant work out why the data is not being passed to GPSCluster in the top vi
Solved!
Go to Solution.

Hi bennymacca,
I think you are on the right track with an FGV. You can do this fairly easily with the GPS vi that you have.
Before I go any further, your GPS while loop will only return the last reading, and because the "Read" boolean output state is FALSE, it will not stop. Do you see it exit at all? From the logic I read, once entering this while loop it won't stop until told to.
There are a 3 options you can try.
1) Use an FGV, as you are looking into. To do this you will need to change the state boolean to TRUE and put shift registers in for the GPSCluster - to parse the information around, holding it each time the vi is called and exited. Outside the while loop you will wire up the Cluster to the indicator that you wish to collect (OR, you could have it inside the case statement where it is read - be careful here, though). 
2) in the main code, above the sequence frame you can place the GPS vi while loop (the "Read" one), having the state boolean wired to a Stop button local variable. This while loop will start depending on how LV feels, so wire an error line to both the While loop and Frame start (indicating that both are to run in a parallel fashion), OR you can put it in a case statement and say 'go' when you want to start reading. With this while loop, you can then output the Read data directly into your Cluster variable as it is generated.
But, with (2) you are moving yourself away from the purpose of the GPS vi, which would be to bring all functionality of the GPS functionality into one sub vi - which is a good idea.
3) put a condition on the "Read" case statement boolean state - only make it TRUE when you wish to stop reading data (do you have a time or condition you can refer to here?). Even doing so, you would/may still need shift registers on your while loop to retain data for each iteration.
I hope all of that helps. Cheers. David.

Similar Messages

  • Stream data from a subvi to the main vi - path refnum

    hello everyone
    sorry my english
    http://forums.ni.com/t5/LabVIEW/stream-data-from-a-subvi-to-the-main-vi/m-p/2205150/highlight/true#M...
    - refnum boolean worked
    - refnum graph worked
    - refnum numeric worked
    how to create a  path refnum? stream data from a subvi to the main vi
    where do I start?
    thank
    Solved!
    Go to Solution.

    Bom Dia Saille,
    Eu acredito que o que você tenha hoje seja isso aqui (Desenho bem simplificado):
    Hoje o que você tem é o Aplicativo do Medidor + USB Driver controlando o seu medidor. Basicamente, sua aplciação está dividida em três camadas:
    Aplicação - Onde estão as funcionalidades principais do programa (interface com o usuário, apresentação de dados, geração de arquivos, etc.)
    VISA - Uma arquitetura de Software para controle de instrumentos. Basicamente, ele se comunica com o Driver USB para poder enviar e receber pacotes de dados através do barramento USB.
    Device Driver - Intruções de SW de baixo nível para controlar um periférico através de um barramento.
    No desenho, eu aponto duas camadas onde você pode tentar atuar para automatizar suas medições:
    Aplicação - Você pode usar o VI Server para controlar o Aplicativo do Medidor (Se este aplicativo tiver sido desenvolvido em LabVIEW, o que eu suponho ser verdade). No entanto é necessário saber se o desenvolvedor do produto permitiu isso (Veja Using VI Server to Pass Data Between a VI and a LabVIEW Executable). Outra alternativa é conversar com o fabricante para ver se ele desenvolveu alguma API (Application Programming Interface) para que você consiga controlar o instrumento diretamente.
    VISA - O LabVIEW Fornece uma API chamada NI-VISA para poder enviar e receber informações através de diversos barramentos (Veja Serial Instrument Control Tutorial)
    É possível acessar o Driver diretamente também, mas eu não recomendo. O resultado não compensa o esfroço!
    Espero ter esclarecido suas dúvidas e espero que você tenha sucesso na sua aplicação!!
    Atenciosamente.
    Felipe Flores
    Engenharia de Aplicações
    National Instruments Brasil

  • 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

  • Add a list from a subsite to the top level site SharePoint 2013

    Hello,  I am trying to display a calendar from sub site to the top level home page and cannot seem to make it happen.  I have opened the calendar in SPD and saved that as a webpart file to my desktop and then uploaded into the app gallery and web
    part list and when I go to add it to the top level home page I get the following error:  'List does not exist' 'The page you selected contains a list that does not exist.  It may have been deleted by another user."  Any idea? 
    I am running 0365 w/SharePoint 2013.
    Thank you!
     

    Hi,
    Please perform the steps below:
    Access calendar list in subsite, in the Customize List tab, click Edit List. It will open SharePoint Designer.
    In Views tab, click Calendar, it will open list view in Advanced mode, and you will see code.
    Delete the part between <ZoneTemplate> and </ZoneTemplate>
    click INSERT in the toolbar > DataView > click calendar list > List View Tools bar appears in green color.
    Click WEB PART, save web part to site gallery (ensure you have site-level admin permission)
    Access root-site, insert web part to page, the web part is in Miscellaneous category.
    For clearly:
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Is it possible to pass data from a subVI before that subVI has finished executing?

    Basically this is my problem:
    1.  I have a subVI which contains a loop that reads data from a device for a specified amount of time.
    2.  I would like to graph this data in real time on the front panel of the main VI.
    So is there a way to pass data from inside the loop of my subVI to the graph of my main VI before the subVI has finished executing, and if so how do I do this?
    Thank you.

    How about using a global variable or a Queue?

  • Access data from a SubVi to the MainVi while the SubVi is still Running

    I want to pass some Boolean/String from a subvi to the main vi while the subvi is still running. 
    I understand that it could be done using queue/ notifier. I do not want to use global variables. I looked at different examples but failed to figure out how to do it.
    I was trying to make an example by looking at an example from Labview about notifier. 
    Can anyone please help me with this code and guide me to the correct way.
    Thanks.
    Attachments:
    mainVi.vi ‏9 KB
    SubVi.vi ‏11 KB

    Hi babu726,
    I have included a revised MainVi.vi and SubVi.vi for you. I had to modify the SubVi to get it to be called by the MainVi. I also included a disabled diagram structure with the code just copied and pasted in, since your code does not seem modular. Hopefully this helps!
    Regards,
    Michelle G
    Applications Engineering
    National Instruments
    Attachments:
    SubVi.vi ‏11 KB
    mainVi.vi ‏16 KB

  • Passing Data From One Component To The Node Of An Other Component

    Hi Experts,
        I have a component A (parent) in which i am usuing an other component B (child) . From the parent component i am able to pass data to the child component by using one of the child's interface node but when i try to use one of the parents interface nodes to pass data from the child to the parent component i am unable to pass data as required .
        Please tell me where i am going wrong.
    Thanks In Advance,
    Chaitanya.

    In Component B, check the property of the Interface node Input Element( Ext.) tick it.
    Now, bind the node like the one we do in ALV
    Abhi

  • Stream data from a subvi to the main vi

    Hi
    I’m wondering if someone can help me. I’m trying to stream data from a sub vi to the main vi without opening and closing the sub vi continuously. The data also needs to be extracted from a while loop within the sub vi.  background info: The sub vi controls a photomultipler tube, which once it is on it is best kept on. The PMT signal is generated in while loop of the sub vi. Attached are some basic vis showing what I’m trying to do.
    Thanks
    Attachments:
    Main page.vi ‏11 KB
    test2.vi ‏13 KB

    If you are streaming measurements continously I would consider using a circular buffer instead of the queued producer/consumer approach.
    Check out this implementataion of such a buffer, use only this if your DAQ device does not have an internal circular buffer.
    https://decibel.ni.com/content/docs/DOC-20403
    Alternatively if you are using a DAQmx device, consider using the device buffer for sharing DAQ data between loops.
    Br,
    /Roger

  • Using JSPs and passing data from 1 page to the next

    I have an application which has a number of JSPs.
    JSP1 has some fields and buttons.
    One of these buttons is called 'Print'. On pressing this control
    is passed to the next JSP2. In this JSP the data is displayed
    from the database. It is displayed via some TABLE tags, thus giving
    multiple records displayed. There is also a check box against each record and having checked this box - the user can then then press another button which takes the user to another JSP - JSP3 - which gives the user a list of options for printing. They then can do 1 of 2 things - print a report or print some labels.
    I have got this to work where there is only 1 record displayed in JSP2.
    But where more than one record is displayed in JSP2 - JSP3 does NOT
    know how to handle this and says the variable is undefined.
    The code I am using to reference the JSP2 variable is
    var batchNumber = top.opener.document.printTranscript.batchNumber2.value;
    Any help or ideas would really be appreciated.
    Thanx
    Chris

    Hi
    If you are using JavaScript, try putting data in a Hidden field and perform request.getParameter in the next page, Place data in a Delimited fashion when placing into the hidden field, on the next page split these values and place where you want them to be.
    This is a proven method...
    Thanks
    Swaraj

  • How do I disable http at the AP level with 5508 running 7.4.100.0

                       I have a 5508 with 7.4.100.0, with 76 3602I AP's connected. Each AP responds to an HTTP request, asking for username and password at the AP. How do you disable this, and not disable https:// at the WLC?
    This is the IP of the AP, not the controller. I only want to allow SSH to the AP's, for diagnostic support when neccesary.
    I have other 5508's running 7.0.98.0, 7.0.240.0, and 7.3.116.0, and they do not do this.

    This issue is:
    CSCuf66202    HTTP port 80 open on Access Points when controller is 7.4.100.0
    To be fixed in the 7.4 MR1 release, due out this summer.
    In general, lightweight APs are not supposed to have TCP port 80 open, unless they are operating in OEAP mode.
    As far as manually configuring "no ip http server" on the AP - this does not survive a reboot.  TAC has asked for a general purpose way to configure lightweight APs:
    CSCsy17873    support general purpose method of configuring APs
    This has not been committed ... if people in the field think this would be useful, please communicate that to your friendly neighborhood Cisco sales team.
    Cheers,
    Aaron

  • I need to pass data from an Access database to Teststand by using the built in Data step types(open data

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1i need to pass data from an Access database to Teststand by using the built in Data step types(open database /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1
    When I tried the same thing on another cmputer the same thing
    happend
    appreiciate u"r help

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1Hello Kitty -
    Certainly it is unusual that you can still see the tables available in your MS Access database but cannot see the columns? I am assuming you are configuring an Open Statement step and are trying to use the ring-control to select columns from your table?
    Can you tell me more about the changes you made to your file when you 'changed' it with MS Access? What version of Access are you using? What happens if you try and manually type in an 'Open Statement Dialog's SQL string such as...
    "SELECT UUT_RESULT.TEST_SOCKET_INDEX, UUT_RESULT.UUT_STATUS, UUT_RESULT.START_DATE_TIME FROM UUT_RESULT"
    Is it able to find the columns even if it can't display them? I am worried that maybe you are using a version of MS Access that is too new for the version of TestSt
    and you are running. Has anything else changed aside from the file you are editing?
    Regards,
    -Elaine R.
    National Instruments
    http://www.ni.com/ask

  • 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

  • Pass transaction data from an InfoProvider to the BPC within BW

    Hi Gurus,
    I need to pass transaction data from an InfoProvider to the BPC Real-Time InfoCube, but I need to do from BW, and not from the BPC Excel interface.
    The reason is that I want to make the whole process in one step, and at the beginning of the process the end-user has to introduce some parameters in the BW, as we are launching the process chain from a transaction.
    Therefor I copied the process chain /CPMB/LOAD_INFOPROVIDER and tried to introduce the different parameters that are normally delivered by the prompt in the excel interface.
    Can anybody help? Does anybody know what parameters for each process type have to be introduced, in what form and if all the process types are needed?
    Making it with a normal BW transformation is also not an option, as we don't want to change from plan mode and stop people from planning.
    It is very important for my end user to do everything in one step, without having to enter the BPC Excel interface.
    Thanks in advance.
    Cheers,
    Àlex

    Hi Frank,
    I have checked and we have many processes in SM50 available for the job to use. Sometimes there are no other jobs running in the BW System except for the 2 jobs but still the 2nd job waits for the first to finish.
    I did another check on transaction code SM58 in BW System. Here it shows all the transactional RFC queues that is being generated by the 2 jobs. I saw that only TRFC queues are able to execute at one time. I am not sure if this is the problem but is it possible to set the number of queues that can be executed at one time to more than 2? If yes, where can I find such a setting?
    This is quite urgent as this problem causes all my jobs to end very late.
    Thanks.
    Shunhui.

  • How to pass data from a C++ program to LV to plot the data real time?

    Hello,
    I am writing a C++ program in which I need to plot the data in real
    time. I would like to pass data from my C++ program to LabView in order
    to perfrom the plotting. I was wondering if this is possible. If so,
    how can it be done? .
    Thank You

    There are several C++ examples and application notes here.

  • I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vecto​r signal analyzer ) to measure such as RF frequency or power on the instrument​? Thanks

    I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vector signal analyzer ) to measure such as RF frequency or power on the instrument?
    I just want to set something on the front panel that will execute the Serial parameters first and then pass these settings to vector signal analyzer
    Thanks
    Phong

    You transfer data with wires.
    Frankly, I'm a little confused by your question. I can't think of any reason why you would want to pass serial parameters (i.e. baud rate, parity) to a GPIB instrument. Please explain with further detail and attach the code.

Maybe you are looking for