VI Calling A SubVI

Hello all -
Trying to debug this situation...I've got a control VI.  It contains a boolean control. 
When this boolean control goes true, I'd like for the SubVI (Software Change Reqest) to open (Not just "Show" and "Hide" with property nodes).  This is so multiple people can use this application a day, and I don't have to code the software to clear all the fields each time, yadda yadda.
Once open, the boolean control will go back to false, and the control will be done with its part and waiting for another action to make the subVI pop up again.
As for the SubVI, when it has been opened...  This hasn't been tested yet so its bound to have errors in the code, and well it was quickly coded for testing purposes.  Regardless, it will create a txt file, and put in all of the information from the fields listed on the front panel, and save it to a place on our network.  When its done, and the file has been created, it will close itself.
Given the code posted, anyone see the problem in why its not popping up?
LV7.1, LV8.5
Attachments:
Control.vi ‏18 KB
Software Change Request.vi ‏156 KB

Dennis -
Sorry I missed that, the control vi I gave you was something I just put up on here real fast so I didn't have to upload our whole test program just for that boolean.
Just drag the subvi icon into the true statement and it does what I meant it to do posting it on here.  Its just not being visible.  When you press the T/F boolean, it runs the program, you can see the messages to the user popping up, it just doesn't show the front panel - I'll reattach the corrected control VI for others - Sorry was trying to be too fast.
The main program I have us using for our control uses about 15 subVI's to keep everything from eating up cycle times when not in use - but they are just used, under the main program, they aren't actually showing the front panel.  I guess thats where the question comes in.  Does a property node "have" to be used for this or can can it just naturally be visible.
Message Edited by leachdor on 11-27-2006 09:34 AM
LV7.1, LV8.5
Attachments:
Software Change Request.vi ‏154 KB
Control.vi ‏20 KB

Similar Messages

  • Main VI Menu event calling a subVI front panel

    Hi all,
    I have a subVI whose front panel is loaded upon calling by a main VI.
    I call the subVI using a User-menu event.
    the subvi-properties are set to allow close window and i am not handling a 'panel close' event.
    The problem is....
    when i run the main VI and click on the menu that loads the subVI front panel, subVI window opens, and if i click on the window-close, the main VI hangs.
    i understand that the control remains with the subVI only and never returned to main VI after i close subVI panel.
    but is it the only way to handle the 'panel close event' or any other way out to solve this?

    Try running the VI with highlight execution turned on, and see if anything unexpected is happening, or you could post your vi and let us take a nosey
    Message Edited by yenknip on 09-12-2008 04:30 PM
    - Cheers, Ed

  • Calling a SubVI without providing a reference to the objects inside the SubVI?

    Hi all,
    Suppose I have a SubVI that plots Y1 vs. X1 and Y2 vs. X2 on the same XYGraph. See the attachment.
    The XYGraph property node is linked to the XYGraph. It sets the line width and point style for each curve on the XYGraph.
    If I call this SubVI 4 times in another code (to make 4 diferent XYGraphs (XYGraph1, XYGraph2, XYGraph3, XYGraph4, each containing two curves for Y1 vs. X1 and Y2 vs. X2)), 
    why would I need to create 4 different references for the 4 different XYGraphs? 
    The question really is this: if the property node is explicitly linked to the XYGraph in the SubVI, why would the property node need to be updated via a reference if the SubVI is called
    multiple times to make multiple XYGraphs? Wouldn't the SubVI take the inputs, plot the curves the XYGraph, update the property nodes and then produce a final XYGraph with
    updated properties?
    Solved!
    Go to Solution.
    Attachments:
    Plot1.vi ‏16 KB

    If this is to be a subVI why do you have a graph on its front panel and manipulating its properties? You need to be manipulating the properties of the graph on the top-level VI's front panel. You see a graph is not a datatype -- it's a display object. All that is passed through terminals to calling VIs is data, and the datatype in this case is an array of clusters containing an array of x-values and an array of y-values.
    If you want to make a subVI that does this operation you have to pass it a reference to the graph you want to manipulate as one of it's input data values.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to call a subvi to run in background?

    i have a timed loop which is gathering data and storing it in an array.  when the array reaches a certain size, i would like to store it to a file while continuing to process new data into the array quickly.  how can i pass the array to a file storage vi from within the loop without preventing the loop from continuing to iterate until the file access is complete?  in other words, i would like to pass the data out of the loop and have the loop continue to run at the same rate while the data is written to a file as a lower priority task.
    thanks.
    Ben.

    Hi Ben,
          ...well, last-things first...
    > if i call a subvi with an invoke node, i can set "wait until done" to false.... but then how do i pass the data?
    Once you have a VI reference, you can us the "set Control Value" method to hand your array to the dynamically-called sub-VI, however...
    What happens if the sub-vi doesn't finish by the time another 2D array is ready? (I know that's not supposed to happen, but what if?)
    I think having a queue to which the entire 2D array is written as a single element would be better, and I doubt that launching a sub-vi and passing an array would be any more efficient than writing to an existing queue.  To be honest, I don't know whether the call to the sub-VI will pass the array by value or by reference.  If by value, then a copy is being created - why not create it in a queue?  If by reference, then you have two sections of code writing to the same buffer at the same time - opening the door for data-over-runs.
    In the old days, code took a big performance-hit by using Globals this way - frequent writes/reads.  Your application seem to fit a "Producer/Consumer" paradigm - which is routinely implemented using queues.
    With that much data, I'd be looking for ways to keep it in binary format for Excel - (LabVIEW uses a conventional binary representation for storing floats) - I'd be surprised if it isn't possible to keep it that way.
    If anyone else has ideas to share, I'm happy to step aside.
    bs05442 wrote:
    here's a little more about my situation, and why i am not using a queue--
    i am running two instances of the same dynamometer control application to allow a user to control a pair of dynos for tracked vehicle testing.  each instance of this vi is gathering status and measurement data off a CAN bus.  i want to log this data as well as (in the future) data from other control VIs running on the same computer.  so i set up a global variable to which each vi writes it's measurement data, and i have a logging application periodically (up to 100Hz) capture the status of the entire global as a new row in a 2D floating point array.  because i am adding a couple dozen elements each time the logger cycles, i did not want the performance hit of dynamically resizing the data structure to which i was storing the data, so i predfine the 2d array and then use an integer to store the index of the next row i want to write to.  the problem comes when i fill up the array (64k lines, the most that excel will process from a csv file)--i would like to store it to a file without inturrupting the logging, but the conversion from float to string plus the file access time takes up too much time to handle inside an iteration of my logging loop.  so i'd like to pass the array to another task which would take care of converting and storing it in the background.
    i'm afraid if i store the data in a queue, the application might slow down once the queue gets too large, and i don't want to bog down the other control vis that are running on the same machine.  if i call a sub vi to write that data, the current loop iteration does not complete until the file write is done and i miss a few periods of data.  if i want to  use a seperate  loop to monitor the array size and perform the file access, i need to make the array available to both loops, which seems to require making it a hidden control on the front panel.... but then i have to access this large data structure via local variables, which will give me a huge memory hit, right?  so i think what i would really like to do is pass the entire contents of the array off all at once to another vi, then let that vi store the data in the background while the fast loop continues to begin filling up its array again.  if i call a subvi with an invoke node, i can set "wait until done" to false.... but then how do i pass the data?
    thanks for any advice...
    Ben.
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Calling a SubVI in MatLab script?

    Can you call a subVI in MatLab script node, or does the SubVI 'node' always have to be used?
    If this can be done, how is it done - can 'load' be used followed by the subVI address on the computer? 
    Any help would be much appreciated!
    Thank you in advance,
    Dani

    Thanks, I don't really understand what 'redundant indexing' is, as I'm unsure how to change the code! I've attached the coefficient table and a picture of the script if you could take a look that'd be great! I've commented out most of the code to see if I can just get one value out first of all. I'm unsure where to go from here - I can't figure out how to attach the VI by itself, sorry!
    Thanks so much,
    Dani
    Attachments:
    low T coeffs.jpg ‏233 KB
    matlabscript.jpg ‏187 KB

  • Call a VI that calls a SubvI, the SubVI calls the VI -- non recursive solution

    I need a example how I can call a VI a second time when i have called some SubVI's.
    The last SubVI can call the first SubVI or the main VI.
    How can I do this?
    My problem is that recursive solutions are not allowed in LabVIEW.
    Suche ein Beispiel, wie man sinnvoll ein VI, welches mehrere SubVI
    aufruft, welche dann am Ende eines Dialogs sämtliche eingegebenen
    Werte zusammengefasst wiederum in einem SubVI dargstellt.
    Falls die Eingaben widerrufen werden sollen, muss der Dialog erneut
    durchlaufen werden.
    Hierzu benötige ich einen Lösungsansatz, da rekursives aufrufen in LabVIEW
    verboten ist.
    Könnte man mit globalen Variablen etwas Sinnvolles gestalten?
    Für Beispiele wäre ich dankbar!

    You can do recursion if you call VIs dynamically. Look here for an example.
    Try to take over the world!

  • Can I catch front panel events of a vi which calls a subvi in the subvi?

    Hello,
    I have a vi with a picture control. This vi calls a subvi. Can I, while
    the subvi is running, catch frontpanel events from the calling vi in
    the subvi?
    Background:  The subvi should do all necessary tasks to draw
    things in the picture control of the calling vi, but depends on things
    like mouse moves and button clicks on the picture control of the
    calling vi.
    I know that I can generate user events in the calling vi which can be
    caught in the subvi. But I developed the subvi as a standalone test
    version, and want to include it now in a larger project, without to
    much changes to the larger project.
    I'm using Labview 8.0.1
    Best
    Armin

    Hi devchander,
    > It will not be possible to catch the Front panel events of main VI from inside a sub VI using an event structure.
    I don't think Armin want's to do this - it seems he's trying not to modify existing code - but if he does, it is possible - and an example is attached!
    ( just run the example as a sub-vi, it will create a string of mouse-direction-codes while the left-button is held down over caller's FP )
    Hope it helps!
    Message Edited by tbd on 08-17-2006 11:45 PM
    Message Edited by tbd on 08-17-2006 11:48 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    MouseTrap.vi ‏138 KB

  • Call a subVI from within vi template

    Hi,
    I had a subVI & wanted to call it multiple times with its front panel open .As I understood I should have a vi template for this purpose.
    Can I make a new VIT & then simply call the subvi i had before?
    Best Regards

    Hi,
    You can make the subvi a VIT but now you would need to use the VI server to open a reference to the VIT which would open a new instance of the VI each time the template is called. You cannot open the VIT as a subvi because then it would not let you open multiple front panels.
    Regards,
    Ankita A.
    National Instruments

  • How do I call the subvi in parallel with main VI. Main vi should not wait for the subvi

    I have a subvi which takes the parameters like port name, transmit rate, message to transmit over serial port and Start/stop flag. This subvi calls VISA write vi in a loop continuously, till the Start/Stop flag is false, to write a message to serial port at a mentioned transmit rate. This subvi will be called from another VI. Actual intension is to transmit different messages to different ports continuously and stop them when required. In this senario, please provide solution for below points:
    1. How do I call the subvi in parallel with main VI. Main vi should not wait for the subvi.
    2. How does main vi can control already running subvi in parallel to it. In the above example I would like to start the subvi from main vi when start\stop flag is true and would like to stop it when the flag is false.
    3. How do I call the subVI with one set of parameters from main vi, when same subVI is running with other set of parameters already from main vi(subvi being called in a case with different set of parameters each time when the case is called). Means, how do I keep track of reentrant subvi (different calls to same vi)from the same main vi.

    Hi Dharani24,
    Try if these are helpful,
    http://digital.ni.com/public.nsf/allkb/DB92C44E7D4D8A1B862577CB007D9C45
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/asynchronous_vi_calls/
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/reentrancy/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Media player doesnt play on calling the subvi

    Hi All,
    I am calling a subvi from my main program, the subvi consists of a progress bar and a Media player, the sub vi will automatically execute when its called and the progress bar will start showing the progress, but the problem I am facing is that the Media player doesn't start . I want Media player to start and show the video when the sub vi is called.Is there a way to do that.Please let me know. attached is screenshot of the subvi.
    Thanks,
    Ankit
    Attachments:
    mediaplayer.JPG ‏39 KB

    Hi,
    I have enabled the reentrant execution but still the problem remain, also i modify my sub vi a bit I want it to continue playing , but still i am getting the same problem. media player show its ready but doent play the video.
    danil33 wrote:
    Hello Ankit,
                      I think the problem is of disabling the re-entrant execution.You must go to File>>VI properties>>Execution then enable reentrant execution.The problem can be solved.
    Thanx.
    Attachments:
    mediaplayer2.JPG ‏61 KB

  • How to call a subvi with event controll?

    Hi:
         I got a control vi written extensively by front panel events. I want to use it as a subvi,  can I  fire  a  event trigger programmably by anyway?
    Thanks

    菊花烧饼 wrote:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=134729&query.id=80280#M134729
     I didn't sure waht you means,maybe the link have some help to you
    Really, it is ireelevant to this post, but very much needed for me, because I was searching for calling a .VIT dynamically.
    Thanks for that.
    BTW, what is your name ? It is showing 4 squares.
    But, I hope this is not your name.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How can I call the SubVI like a child window one or more times in the front panel of my main VI ? See the example atached...

    I would like to create a aplication where I call dynamically the same SubVi many times in the front panel of my main VI ... I saw this kind of programmation in other languages like Delphi, C++ Builder and Visual Basic.
    For explanation: I have 10 channels to read in the list, but I would like to see only 3 channels ... Then I will click in the channels choosed of my list and will open the same SubVI 3 times, where each one will show the individual channel.
    Thanks for attention...
    Cleber
    Attachments:
    Opening SubVi many times.jpg ‏118 KB

    TiTou certainly pointed you down the right path... For a few more details, refer to my post to this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=141811
    You could use the same technique, except instead of opening the clone's front panel, use the VI reference you have to it to poke it into a subpanel. Please note: I have never actually tried building a VI with more than one subpanel on its front panel, but it should work. Also you will not want to close the VI references because you will need them to stop the clones when you shutdown your application.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to call multiple subvi?

    I am creating a menu panel where I can call and control each new sub vi I call. It is only allowing me to call one at a time. How do I go about doing this? I have placed the sub vi and an ok button in an event structure. I am a beginner as you can tell, so any help is appreciated.

    I hope the name isn't confusing you. LabVIEW is the server in this case, and is already set up in most cases. VI Server is just a general name for a set of technologies that allow you to automate LabVIEW VIs and LabVIEW as a whole. If you've ever used property nodes before, then you've already used VI Server and didn't know it.
    The idea here is that VI Server calls can be used to launch VIs. The VIs in question are located in the Application Control palette. You will want Open VI Reference (input a path to the VI), a few property nodes and invoke nodes, and finally Close Reference to release your resources when you're done, just like you would close a file when you're done.
    Here's an example of what I mean. Hope this helps! (This was written in LV 7.1)
    Jarrod S.
    National Instruments
    Attachments:
    Main Launcher.llb ‏65 KB

  • Activity 2-4 Call a SubVI not working as demonstrat​ed

    see description..... the wires show as not connected if I add the subVI temp & vol to diagram. If not wire to SubVI, then connection to divide VI is okay.....this is not as being demonstrated, even though I've used a SubVI created by National Instruments, as stored in the Solutions directory.

    I'm assuming that this is one of the old tutorials from LabVIEW 5. I looked it up and did the activity as described and had no problems with using the Temp & Vol.vi in the solutions folder. If you delete the connection to Temp & Vol.vi, your VI should show a broken arrow because the divide function is missing a connection. If there's no broken wire, then maybe you've wired both inputs of the divide to the constant. Delete the sire from the constant, select Remove Bad Wires from the Edit menu and try again. If all else fails, attach your VI so someone can look at it.

  • Front panel of SubVI locks on 2nd call

    HI!
    I'm calling a SubVI and pass a Boolean Reference to this SubVI. In the SubVI I'm executing a While loop. The stop condition is the value of the boolean control in the VI that calls the SubVI. (Boolean Refnum + Property Node: VALUE connected to while stop condition)
    Mechanical Action of the Boolean in the calling VI is: Switch when pressed.
    For the first time this will be executed it works fine. But the 2nd time the SubVI is called. The Front Panel of the calling VI where the stop button is located will be locked.
    Does anybody have an idea why this happens and how I can solve that problem?
    ANDY

    I tried what you described, using LV 7.1, and I have no problems running the vi over and over again. See the attached examples. Ref1.vi calls Ref2.vi and passes the Boolean reference to it.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Ref.zip ‏21 KB

Maybe you are looking for