Problem in subvi

Hi,
 hi to all.. sorry for new creating new dicussion forum for this question...
i want to know the answer as soon as possible...
i'm doing a project .... while doing normal program(without any subvi's) i was completed my project..... but suddenly my head told me to create very module to be in subvi... so i my program into three module Subvi (Learning the signal and saving in file, Comparing with the real time signal with save data, report generation) but now i was struck in the first module Subvi itself....
Pls can u help me to finish this....
hi,
    Here i attached my module Main program vi with subvi....  In the main program vi u have to the numeric value in which the for loop wil run... then u have to the signal from the enum controller with corresponds to the signal your are selected the output show in the Main program vi... pls help me....  I'm waiting for your reply...
note:  i have attached just the example(method) of my project...
Regards,
N. Srinivasan
Attachments:
Main_prg.vi ‏9 KB
SUBVI.vi ‏95 KB

Hi,
this is related to this thread and this one too...
 (duplicate post, solution already given)
Message Edited by GerdW on 10-16-2009 11:06 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Problemas con subVI

    Hello............
     Espero me puedan colaborar tengo una pregunta.............
    Estoy obteniendo dos señales mediante una My DAQ estas señales son graficadas en un indicador y ademas se realizan algunas operaciones matematicas con estas señales , todo este programa esta como un SubVI, esta SubVi funciona correctamente pero cuando le llamo al Vi principal  este VI se vulve muy lento......cual seria la mejor opcion para solucionar este problema? este es mi SUBVI 
    Attachments:
    graph22 (SubVI).vi ‏219 KB

    sí, lo puedo.
    Por lo que entendí quieres hacer un VI que tenga la siguiente secuéncia:
    Adquisición de un fijo número de datos -------> Cálculos -------> Presentación de los datos en un gráfico XY
    Bueno, para esto usted podria utilizar el patrón de proyecto de máquinas de estados contiendo cuatro estados:
    -ocioso
    -adquisición
    -cálculos
    -presentación de los datos
    En el estado "ocioso" usted podría dos botones para basicamente dos funcionalidades:
    -Iniciar la aquisición>>cálculos>> presentación.
    -Parar el VI
    Solamente haciendo esto usted tiene ya una programación mas limpia y de fácil comprensión.
    Utilice este tutorial como ayuda para hacer una máquina de estados. Cuando la tener hecha, enviame para que yo te ayude con lo resto.
    ¡Saludos desde Brasil!
    Felipe Flores
    Engenharia de Aplicações
    National Instruments Brasil

  • Problems calling SubVI

    Hi,
    I am currently writing a program in which I need a "pop up" SubVI.
    The SubVI opens when the user presses a button and closes again when it is finished. I am doing this with an event structure.
    Tha main program consists of several while loops.
    When I start the program for the first time, everything will run fine. If I now stop the main program with the LabView stop button and the restart the program, everything is still running fine.
    If I however stop the program by terminating all the while loops in the main program and then restart and Call the SubVI, the main program will behave as if everything works fine, however the SubVI Frontpanel (or the entire SubVI, I don't know) won't open.
    I really have no Idea what I did wrong there. Apparently the way I close the program does make a difference. As I undestand it, however it shouldn't, should it?
    Or does it matter, that the "Pop Up" Sub-VI is called in an extra SubVI that doesn't pop up?
    I have tried to reproduces this scenario in a simple example that I've attached. However, even though it is in all means similar to the real program, here, the error doesn't occur.
    Maybe anyone of you had the same problem before or has an idea what happens there?
    Thanks for your help!
    In the attachments, "test" is the main Program!
    Solved!
    Go to Solution.
    Attachments:
    SubVI.vi ‏7 KB
    CallSubVI.vi ‏6 KB
    Test.vi ‏13 KB

    You may have misunderstood my earlier comments. The reason your code does not exit is that you are simply reading the value of the stop button in the loop with the event structure. That loop cannot complete until everything in it has completed. That means it is a MUST to check the stop condition after an event has been processed. Doing it outside of the event structure like your code does will mean that the while loop is sitting there waiting for the event structure to complete. This will never happen once you stop you application using the button as currently written. If you hit the stop button and then follow that with pressing the Call subVI button your application will actually stop. In addition, your event structure will not process the Stop button until the subVI (your pop-up) has actually exited. The event containing that call will not complete until the subVI completes.
    I have posted a simple modification to your code that includes some of the suggestions I made earlier.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Test-modified.vi ‏17 KB

  • Hi I have subvi in subpanel does not update after opening

    Hi I have a problem with subvi updating inside the subpanel, after opening.
    I need  your advice, I am using  LabView 7.1.
    I am asking  for your opinion before I can post my code  because it is very large and made of many files outside the folder.
    Here's the description of my problem.
    - In the main vi, it has an event structure to open 3 references of the files, based on the ring control, Not only that, it also has events for many controls.
    - In each subvi, it also has an event structure ofr it's own controls to work inside
    - After opening the subvi in the subpanel, the controls like strings, are not updated, till the main vi is minimised and maximised again. Then the controls are updated. Weird... But then other controls are unresponsive and in the end I aborted it.
    Funny thing is that, when I stripped most of the parts, leaving the essential ones I wanted to focus and debug.
    It seems working and no problem.
    How am I going to troubleshoot? I don't have any faintest idea as to how to find the cause of trouble?
    Clement

    astroboy wrote:
    Funny thing is that, when I stripped most of the parts, leaving the essential ones I wanted to focus and debug.
    It seems working and no problem.
    The only think i can think of, strip the parts one by one ... when it works, probably you will have find the prolem (the last stripped).

  • Dataflow problem, queuing in subvi dequeuing in main vi

    ive stuck on a very simple data flow problem here, I'd like to pass data being enqueue in the subvi and dequeue in the main vi consumer loop. Ive attached the vi, since im already stuck on this problem, i was hoping i could learn a few things, specially implementing action engine in this situation  
    thanks.
    Solved!
    Go to Solution.
    Attachments:
    Counter Main.vi ‏16 KB
    counter subvi.vi ‏11 KB

    Your subVI doesn't make any sense since your loop will always exit after the first iteration and you always initialize your counter to 0 every time you execute it. That is one issue.
    Your code also suffers from multiple places that are dequeueing data from the queue. You will get undeterministic behavior since you don't know which dequeue will get the data first. Generally for a producer/consumer architecture using queues one or more loops loops should be enqueueing data to the queue. One and only one loop should be dequeueing data. These loops shuold run in parallel to each other. In your code you will only run your subVI whenever you press the start button and as stated you will always post a value of 1 to the queue. What you would need to do is have your subVI run independently once it is started. Use the "Start Asychronous CAll" to start your subVI when the Start button is presed and then let it simply run. Have it post the counter to the queue. Your lower loop in the main VI should dequeue the values and display them. You do not need the Wait in that lower loop since that is the purpose of the dequeue. That loop will be idle if there is no data present and will only run when data is in the queue.
    In the upper loop of your main VI remove the dequeue and enqueue. You don't need them since the subVI is all that is needed to post the data to the queue.
    Try this:
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Problem with activation subVI

    Hello everybody!!!
    Who tells me, why the subVi doesn't start pushing  ok botton??
    Thanks a lot!!!!
    Solved!
    Go to Solution.
    Attachments:
    problem.jpg ‏187 KB

    Because the VI isn't running.
    What are you trying to do here?  Is that VI a main VI?  If so, then the OK button makes no sense at all.  I would also highly recommend hitting the diagram cleanup since it is really hard to tell what is wired to what.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Problem about asynchronous call: subVI front panel doesn't pop up when called.

    Dear All,
    I'm new to LabVIEW, and this is the first time I try to use the asynchronous call.
    I'm using LabVIEW 2011.
    I want to build a directory for several VIs, and it should allow users to open more than one of the VIs at the same time by pushing the buttons. Before building this directory, I simply tried to use asynchronous call to call a VI form another VI, but found a big problem.
    I followed the steps in the help file, created a strictly typed reference, set the option to x80 because I don't need the return. When I run it for the first time, it worked fine: the subVI popped up and run. Then I closed the subVI. But for the sencond time and on, when I run the caller VI, the subVI didn't pop up, instead it seemed to run silently on background because when I manually opened it from the file I found it running. Besides, I didn't find any option like "show front panel when called" of the asynchronous call.
    The caller VI and subVI are attached. The address of subVI in caller VI should be changed accordingly.
    What should I do to make it work properly? Thanks very much for  any idea!
    Solved!
    Go to Solution.
    Attachments:
    asynchronous_call.vi ‏8 KB
    boolean.vi ‏7 KB

    Jeff·Þ·Bohrer wrote:
    A better approach is to set the vi properties programaticly like this:
    Jeff, you will be happy to know that I used this tactic in full force on a project recently (lots of dialogs in this program).  Not sure how many LabVIEW reboots it has saved me from.  Reuse VIs made it even easier to do.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Tried the solutions posted for this "SubVI filter not executable​. Undefined error" but not solving the problem

    Hello,
    I am trying to use a lowpass filter for my application but getting the error "SubVI filter not executable. Undefined error".I tried working with the solutions at this post 
    http://forums.ni.com/t5/LabVIEW/SubVI-filter-not-e​xecutable-Undefined-error/m-p/1996701#M657751 and results with
    1. Create a blank vi, put a VI filter in the block diagram (this should not be functional as it is not wired), copy it and paste it in my other project. I believe if the filter is the first vi of a blank project, it is funcitonal and then you may copy it wherever you need to.
    Result:
    2.Tried to open the filter panel of the Filter but showing the same error as shown inthe below image
    Don't why the solutions worked for others are not working.Can someone suggest a solution for this.
    thanks in advance.

    Hi PatanGova,
    Very strange error. Actually, there are no required inputs on this express VI, so it should be able to run even without wires. It is not correct as you said: "this should not be functional as it is not wired". Nothing will happen, true, but the run arrow should not be broken.
    For some reason, the VI with the Filter express VI fails to compile. I tried it on my computer (LV 2013) and get no error when I add it to a new VI. As was suggested in the linked forum thread, you need to open the front panel of the Filter VI and run it to see the explicit error.
    If you do, do you also get the error:
    "This VI claims to be part of a library that does not include the VI. The VI might have been deleted from the library. Add the VI to the library again or select File - Disconnect from the library."?
    If you do, it seems that you may have a project library somewhere that has taken ownership of the express VI. The ownership prevents you from running or editing the express VI. To free the VI, you need to do one of two things. Either, you need to load the library into memory, or you need to disconnect the VI from the library. Either way, you need to find the project library that has taken the ownership of the VI. As soon as it is released, it should run for you. You release it by selecting File»Disconnect from Library on the VI.
    The workaround described in your link (and also here: http://forums.ni.com/t5/LabVIEW/compatibility-prob​lem-labview-2009-2010-2011-quot-This-VI-claims/td-​... tells that you can make a copy of the VI and thereby create another instance that is free. This solution may work for you as well, but if not, you may not have created the copy properly. Maybe your copy of the VI also became part of some project library that took ownership. In either way, you should rather find the project library to release the VI before trying the workaround to copy it.
    If project library ownership is not the problem, maybe the problem is connected to LV 2011, as most forum posters report that it only happens here.

  • Labview 8.5.1's MathScript window failed running imread with an error "A problem occurred in a subVI call."

    Hi,
    I am trying to port a Matlab program into a MathScript script.  Following is the first few lines of the script:
    clear;
    image1=imread('C:\LV_VertAlign\DSC_0104.jpg','jpg');
    image_double1=im2double(image1);
    image_gray11=rgb2gray(image_double1);
    In the first line, imread is supposed to read in a photo taken from a DSLR camera, so I think it's a 32-bit image.  And this is the error I got when trying to run this script in the Labview 8.5.1's Mathscript windows:
    "Error in function imread at line 2.  A problem occurred in a subVI call."
    What is the problem here?  and why does it complain about a subVI call?
    Thanks for any help to point me in the right direction.
    -Anh

    Hello Anh,
    As you may know, LabVIEW MathScript is implemented on top of LabVIEW.  The error message you received indicates that a problem occurred in one of the LabVIEW subVIs that MathScript calls.  As Jim indicated, the problem is in the file type specifier you passed to the function.  MathScript requires the use of 'JPEG' and not 'jpg' or even 'jpeg.'  In this case, we could return a better error message.  I have filed a bug report (115804) for this issue.
    You will find that once you fix this, the im2double and rgb2gray functions are not supported.  In LabVIEW MathScript, you generally can execute scripts written in the MATLAB® language syntax.  However, the MathScript engine executes the scripts, and the MathScript engine does not support some functions that the MATLAB software supports.
    We will look into adding these functions in a future release of LabVIEW MathScript.  If you need this functionality now, these functions are very simple to write yourself.  If you are performing additional image analysis in your script, you may wish to purchase the IMAQ toolkit.  It doesn't add any functions to MathScript at this time, but you could continue your analysis outside of MathScript with LabVIEW VIs.
    MATLAB® is a registered trademark of The MathWorks, Inc.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Problem with one control in Subvi to use in MainVi...

    Hi,
    I'll try to explain easy. I have my application with main window, where I do calculates and have one graph data. I use subvi to open the serial port and when I close the subvi, the data is drawed in the mainvi graph. Now I am trying to implement one option to do several test from serial port automatically. I want to have one Control Bottom in subvi, that when I active it, When I close the Subvi acquisition data, automatically active the save bottom and save the file and THEN open again the subvi ready to acquire another run of data. So I only need to start/Finish the data entry and it will going save diferent test in file.
    I tried several things, but I have the problem when I active the option. In the first time, appear me BEFORE the execution of Subvi than the option to save the file. In the second run it seems works well, so 3rd,... the problem come when I disable the option in the Subvi and when I close the window in the mainVi the values aren't changed and appear the new save option and Subvi several times, until the iteration change and put 0 value and it works normally again. I am trying to retard the for/else 1 or 2 iterations but I dont know to do it, since The iteration value is increasing from starting the program and when I open the Subvi it only stops to count and when I come back again to Main continues with the last value. I would need the iteration of loop reset to 0 to say to the for/else to wait 2 iterations or use any counter... I tried to do it, but I spent my ideas.
    I tried to do one example program in Lv7.1. 
    It have the same structure and the same problem that in my program. In this example even I can't close the subvi between it is saving and re-openning it. I suppose since It is so simple, the active value do the subvi open directly.
    I hope you tell me any idea to do it.
    Regards, Fonsi.
    Attachments:
    Main.vi ‏55 KB
    Subvi2.vi ‏14 KB

    The reason why you seem to need that "extra run" is due to a race condition. If you watch your code in highlight mode you will see this. You have 3 independent case structure. Let's say you start the VI and then press the "Start Test" button. The main VI is now executing the True part of the top-left case. Meanwhile, the other two case structures are executing since there is no data dependency. They see the values of the local variables as they were when you pressed that "Start Test" button. You set the "Active Multiple Runs" to True. The top-left case ends, and now the loop can go to the next iteration since all code has completed. In this iteration "ActMultiple" is True, so in the bottom case structure you execute the True case where you delay for 0.5 seconds, and then set "NewRun" and "MultSave" to 1. Meanwhile, the other two cases have already run. You now finish this iteration and move to the next. In this iteration the top-left case evaluates to True since "NewRun" is 1. So you get the dialog. While the dialog is up, the other two cases have already finished. You set the "Active Multiple Runs" control to False. The subVI ends, "ActMultiple" is set to False. and the loop iteration completes. Next iteration. Even though "ActMultiple" is False, you are probably thinking that you will get the "NewRun" and "MultSave" set to False because of the bottom case structure, so the top-left and top-right should see the values. This is not what happens. LabVIEW will read the values of the local variables before you enter the bottom case structure to set them. This is the race condition.

  • Multiple instances of a subVI - problem if running as executable

    Hello LabVIEW gurus,
    I have written an application, which uses a VI-template to create multiple instances of this subVI which are
    running independently. I use 'Open VI Referece' and the 'Call By Reference Node' VIs. My application works
    fine if it is executed in the LabVIEW development environment.
    But if I use the Application Builder to create a stand alone program, the 'Call By Reference' method seems
    not to work. The program works without any error message, but the subVIs created by call by reference
    deliveres no results. I suppose the subVIs are not created properly.
    Has anybody an idea or hint to solve that problem. Are there any known issues with 'Call By Reference Node'
    and 'executables'. Are there special points to pay attention for?
    I have that problem with LabVIEW 7.0 and 7.1 (Windows2000 and WindowsXP(SP2))
    Thanks for any hint that could be helpful.
    Steffen

    Sorry for the obvious question but did you include the templates as
    dynamic VIs when building the application? Since these VIs are not part
    of the Top Level hierachy, they have to be include explicitely as
    dynamic VIs.
    By the way, when VIs are included as dynamic VIs they are put in the
    internal LLB of the executable file. When opening the VI reference,
    that internal LLB is first looked into for a VI of that name and if it
    is found there the actual path is ignored. The internal VI is opened so
    you don't have to care about absolute paths when using inluded dynamic
    VIs e.g. you can leave paths used during development. The actual path
    is important only when the referenced VI is located outside the
    executable.
    LabVIEW, C'est LabVIEW

  • Problem when executing the same subVI in parallel.

    Hey!
    I have created a subVI that I am using in two applications that executes in parallel. For some reason the applications is using the same instance of the subVI, which creates conflicts when the applications are trying to use the same subVI at the same time. Is it possible to solve this problem?
    /Jakob

    Open the SubVI and go to File>>VI Properties. Select Execution and check "Make VI reentrant". This should solve your problem. You should read more about reentant VIs and how they work in the site. They have different kind of uses.
    Try to take over the world!

  • Time loop problem when add a parellel subvi in another time loop

    I have four time loops in parellel, they work find
    without any problem. However when I add a third party
    Vi as a subvi in parellel inside a another time loop.
    The first four time loops start working eraticly.
    Is there any way I can make them work independently
    time wise. There is no data transfering between any
    of the loops

    Hello
    The VI with the timing loop is set to cycle once every second, and all it does
    Is turn on a boolean light indicator off and on every second. It has a boolean
    inverter connected to the shift registers of the loop. Its priority is set to Normal.
    The third party VI interacts with a spectrometer hardware. The spectrometer measures
    The amount of light and transform the data collected by the spectrometer into digital information, which is then passes to LabView. LabView then compares the sample information to a reference measurement and displays the processed spectral information.
    The timing loops of the main VI is manually set by me the user.
    The timing loops would loose its sequence; the loops would run normal for a couple
    Of cycle the
    n either run fast or run slow. If I take out the third party subvi everything
    Runs fine
    I am using windows XP with LabView 7.1
    Attachments:
    Dr_Grady_Solinoid_HM_3.vi ‏129 KB
    USB2000_SUBVI.vi ‏238 KB

  • Problem running duplicate SubVIs

    I have a SubVI that I want the user to be able to launch (up to) 4 separate instances of.  It's a small grouping of indicators that represent possible error conditions for 4 separate but identical sections of the hardware being monitored.
    To accomplish this, I set up the following code:
    I need the indicators that are in the SubVI to be updated even when the user isn't looking at them (because there is separate history tracking going on), so as you can see above, I make 4 (nearly) identical calls to run the VI, then in an event structure, when the user clicks on the control associated with each section, it executes the FP.Open command for that particular VI's reference.
    When I executed this, the only one that will open is the first one (vertically), the one that's set to the base address of 10000.  I presume this is because it's the fist reference that runs when the main program executes.
    So then I went and edited the properties for the SubVI to set its reentrant execution to "preallocated clone reentrant execution", but this made no difference.
    Any thoughts on how to solve this problem?  thanks in advance

    I thought I was pretty clear by calling the function the Open VI Reference.  That is its name after all.
    Here's what I am suggesting.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Initalize Reentrant Calls.png ‏24 KB

  • Transparent subvi problem

    I'm trying to run a subvi transparent window above the main VI. It seemed to work fine just configuring this subvi to run transparently (under "Customize window appearance"). However if I click on the Windows toolbar (at the bottom of the screen) before the execution of the subvi, it appears for a short while (less than one second).
    I'm using Labview 8.2.
    I would appreciate any help to solve this problem.

    I have seen this behavior in the past.  For example, say you have a graph in a subVI and you would like to export its image.  The graph will not update unless the FP is open, so I usually open the FP with the VI set to run transparently.  I recall that this was not a clean solution,  you see the subVI in the taskbar and I remember some flashing.  I usually set the FP position to some corner of the screen and it seems fine.  In this case, trying to cover one VI with another, that could be an issue.
    All of that said, if you are simply looking to block mouse clicks I suggest using an Event Structure to filter the Mouse Down events.  See the following example.  Run it and try to change the value of the button inside the box.
    Attachments:
    StopMouseClicks.vi ‏17 KB
    PointInRect.vi ‏11 KB

Maybe you are looking for

  • Mavericks won't finish loading due to error message

    My free Mavericks update failed to finish loading, reporting an error message with no explanation.  Shall I just try to load it again even though most of it loaded?

  • CASE vs DECODE - CASE with SUM and All in Page Item is non aggregable

    Hi, I'm using Discoverer 9.0.4. After switching calculations from DECODE to CASE I found out that case gives a non aggregable result when using a Page Item and selecting <All>. The calculations (SUM x) / (SUM y) or (x SUM) / (y SUM) where x and y are

  • Geting back deleted objects

    Hi Experts, is there any way to get back a deleted object after activating it in ID? any chance? I know this is not possible .... still if there any chance? Thanks Sugata

  • Prevent routing between 2 logical networks without a VLAN

    Background: We have some older hubs in our network. As such, we cannot implement a VLAN yet. We have a 10/100 ethernet network across our campus for our production users. We have multiple buildings on the campus and one physical network. We are insta

  • Process for supplier registration

    Hi there, We want to use supplier registration functionality for us to capture vendor registration process into the system. We are planning to use SRM to capture this process. Our planned system will be SRM 7 EHP 1 with ECC 6 EHP 4. Our desired busin