The creation of the Subvi problem

Hello

I'm a 4th round new year to Labview. I try to create a joystick control for UAVS or VI. Now, the main part of the VI is made. But when I try to use it as a Subvi, I can't read all the data. On the blank page of VI, I just create indicators and control and connect them to the Subvi.

Can someone enlighten me as to what has gone wrong?

Thank you.

Ting Yu

Hi Ting Yu,

Welcome to the Forums of NOR.

If the VI joint is what you are trying to convert it into a Subvi, the reason for which it loses its functionality is due to the While loop. You have to imagine that when While loops are implemented, because data flow they are mostly unconscious operations of data around them. For example, your values such as Front/Back (Y) output indicator will be only passed out of the While loop once it is finished (in regards to your hand VI/Top level VI).

Make your code function properly, only to convert the internal code of the While loop to a sub - VI, then use the Top level VI to control its execution. For example, you need to separate the execution control and manipulation of signal for your code to respond normally.

Tags: NI Software

Similar Questions

  • I have problems with of the Subvi after the use of customized device model

    I used to start my machine personalized customized device model and I got success in the deployment until I started to do more complicated the Subvi.   I am currently trying to convert low FPGA and high ticks to the duty cycle, but for some reason when I add it to the RT VI "Data read of HW" driver, it seems to cause a downtime... ideas? Is a circuit agree? I have added a time delay but I am still having problems. It is a device online, so I'm suspicious of it hogging resources, but am not sure.

    Attached images are meant to be read like this:

    1. the case of the RT pilot ReadDataFromHW

    2. it's the Subvi calling ToDutyCycle SIMStimPWMSubVI

    3 ShiftRegister.PNG is inside the Subvi.

    As a robotician I celebrate early and often (usually by a failure or two...), but it seems that the answer was to transform fundamentally the While loop for a loop with a count of 1 and then remove the additional elements to ensure that each shift register has that one and then right click on the shift registers and convert at the Feedback node...
    I was able to deploy to VeriStand as a custom device and it runs and calculates the factor of use with no problems. WOOHOO! Where - what is celebrate button!

  • While the loop and the passage of a string to a Subvi problem

    Hello world

    My problem is this: I have a MainVI and a Subvi, the MainVI is running a while loop in which the Subvi is called and goes to 2 parameters, 1 bool and 1 chain. the problem is, inside the Subvi the chain should be placed in a text box so that the user can see before pressing ok.

    Background of the present: normally "Get_DMC.vi" opens with just the text box and a button cancel, means to scan 10 characters of big entry. It still works fine. If the user selects the DMC model in the MainVI, it should only copy the dummy DMC of the MainVI (the above string) to the show, and Subvi in the text box as well as allow another button 'OK' for the opportunity to control themselves (Advanced) users.

    The Subvi is reloaded on every call because he'd be stuck in the while loop, I had not done that. Not quite sure why, if someone has an answer to that aswell please tell me.

    Many thanks in advance,

    Kind regards

    Pedro

    It might be that the writing of the DMC to "Value DMC" model that happens before the "reset DMC by default".  Try the error off DMC Reint default wiring to the value DMC error to force the order of execution

    Ken

  • deployment error: unable to locate all the subVIs screws saved because a Subvi is missing or the VI is not registered in the last version of LabVIEW.

    Hello world

    I want to deploy my project Teststand and got a strange error when creating the image.

    For many additional files with the suffix as .tso, alias, lvlpb, exe, dll... deployment tool launches the error message "unable to locate all the subVIs screws saved because a Subvi is missing or the VI is not registered in the last version of LabVIEW.» (see also the attached picture).

    If I exclude the files of my distribution or set them to "include without treatment or dependencies of elements of" the generation works fine.

    After the error, I checked the Temp folder. The temporary project LV is not yet created.

    I used the deplyoment-installation in the same way within a fromer project and had no problems like that...

    I use Win7 / LV2013 SP1 & Teststand 2013 f1 (5.1.240).

    Could someone help or support? Thank you!

    Finally, I tried the construction with LV2015 & TS2014 - no problems... Everything works fine...

  • Open and close the Panel the Subvi front

    Hi all

    Run LabVIEW 2011 on Windows 7 x 64.  I am trying to get a Subvi front to open from my main PC with the touch of a button, then close with a button press in the Subvi.  Here's the piece of my main FP who calls the VI and opens the FP

    Locations is defined in another loop and all loops are in a flat order.  I made this way because I want to start with the first press and not stop my main loop to run.  So I don't know if I can run in the same line as the event or not, I've moved the element to the left loop around a lot.  Anyway the VI of openness seems to work very well.

    The problem arises when you try to close the Subvi for the SECOND time.  The code is here:

    As I said, the first time I open and close the VI everything works as it should, hopefully.  Then, I am able to reopen but now 'empty' button does not work and I can't close the window or even to open the block diagram to probe anything.  I tried to understand this point for a while, any insite would be greatly appreciated!

    Thank you

    Found my problem, I had the wrong boolean on one of my other events.  If this seems to be a good way to open/close a Subvi if anyone is interested!

  • How to pass the session IMAQ to the Subvi

    Hello

    My experience with LabView is neither very good nor extended. I am a scientist and I'm with IMAQ data acquisition. My current problem is that the people who wrote the script is modular, versatile, or clear initially structured. So I try to reduce the ridiculous number of tests in a simple flowchart to a level that people can actually understand it... and to make the more versatile script for future experiments.

    I'm introducing quite a few subVIs to be executed repeatedly. However, I can't know how to pass the IMAQ session on the Subvi. I constantly get the error messages. In this case, I want to acquire images with OIDE_CollectFrame.vi controlled by OIDE_TrialPhaseCollect.vi. I couldn't understand how to assign the refnum IMAQ session class, either.

    It is probably a newbie question, but usually I program with LabView.

    Dennis


  • Read the indicators continually the Subvi execution

    Greetings,

    Number of previous threads about this problem. However, it looks like all the need of huge changes to to the Subvi.

    Now, we have a bunch of Subvi programmed by different programmers, but at the end it is difficult if we combine all the indicators in each Subvi and display the values in the façade of a single main vi, without big changes for each Subvi.

    Control reference using will be a solution, with some changes in the sous-de VI, but it seems that the main vi and Subvi need to run at the same time. We cannot run only a Subvi himself then.

    Variable overall is another station, however, we have a huge amount of indicators, creating global variables for each indicator in each Subvi seems like redundant procedures.

    '

    I wonder if there is a way to create a main vi shell-like read these indicators permanently without needing to touch the inside of each individual Subvi. Or please let know us if you have better ideas.

    Thanks in advanced for any comment.

    -chen

    I was not involved in all this other discussions that you mention, so I can only go off of what you have described in your post. So the questions I ask are:

    -Don't the SubVIs run continuously (called) before the end of the application?

    -How to stop the sub live? You are reliant on the controls on the front panel (for example, a stop button)?

    If you'd rather not touch the sub live, you could put the sub sub-panels in the main vi screws. This would allow you to expose their facades, hosted in the main vi. Search for Sub panels using LabVIEW or online. It would also expost controls too, but you can customize the front of each to hide these off-screen, so to speak. There is also a VI properties that allow you to programmtically re - locate originally and resize the front panels in order to ensure the proper display.

    If this does not work for you then I think you should take a hard look at your architecture. Sometimes you can get so far from Shoemaker to things together. Look closer at all misconceptions of what a VI is actually and what calling a VI in an another VI means in fact (you're basically calling a function with some extras added as a front panel). There are ways to get what you want by programming, but they are hard work, not very easy to manage and can be more effort than other solutions.

    My strategy of choice? Use a messaging system any to communicate between your objects in your system. You have your items (hand UI, each Sub VI is a small entity of independent work of others) and you can use one of the buildings available to you through LabVIEW base (notifiers, queues, events user Global Variables (yuck), FGVs etc.) to allow these objects communicate with each other.

    But I guess you've heard all this before. All I can say is that "they are right". Sometimes there is no better solution for the bad design to re-design.

  • How to operate the Subvi?

    Hello

    I use a VI instrument control and I used a Subvi to begin feeding after a certain point. I created a simple model of two-lane in the Subvi which includes just as an input error and mistake them as output connected to the respective terminals to VI main. The Subvi has 5 entries of order I made the default values so he will always perform with the values. These values act as an input for the power supply I'm controlling with the Subvi.

    Now when I run my VI it does not start the sub VI, it won't run the control values and gives 0 input to the PSU, so it won't work. I want that sub - VI to run when I run my hand VI. Am I missing something? Sub - VI works perfectly when I try to run it separately.

    That many things should be done when we connect all Subvi in primary VI.

    Thank you.

    LOCAL VARIABLES!

    Your problem is that you have what we call racing conditions.  Learn to think in data flow.  A function will run when it has all its entrances and will display its data when it is done running.  So the only variable local waiting to run?  NOTHING.  Thus, they work immediately, return the default data.

    The solution is quite simple, use instead the son.

  • Export a simplified image failed in the Subvi

    I have a Subvi involving plot and export the xy-graph programmly. However, it can only generate white image (.emf). As I have tried several times, I discovered that if I kept the slot open,-VI no problem at all. But even minimize the Subvi, only blank pictures. I wonder why? Is it possible to export the Subvi chart?

    I guess that the Panel should be responsible for draw the images correctly. Either you could open the Panel before just before you export the image, or use the Get Image property and store it as a jpeg or bmp format.

  • Reference to the control on the main façade fails the Subvi front is closed?

    Hi all

    I meet a strange bug. In my code, I use a Subvi to control a piece of hardware. The Subvi has commands for all functions of my hardware.

    I changes the value of one of these controls in my main façade by running a reference to a button on my main façade in the Subvi, grabbing the value of the button with a property node, then update the value of the Subvi control using a node property signage.

    This works very well when my Subvi front is open, but does not work the Subvi front closing.

    I am new to labview, so any help is appreciated.

    Thank you

    Rachid

    This event triggers a series of writing for the real hardware. The material is sent only a command when something changes.

    My code is made up of handlers inside functional global variables. In this way, I can send different parts of code of different orders (example: reset and reset) with the events generated by programming.

    The value of the wheel of the page main itself, according to my probes, getting through. It's the Subvi button that is having a problem.

    I work under a certain pressure of time pretty important, so I managed to convince the boss that the front panel of the Subvi open does not violate the requirements of the application. I guess this has solved my isse.

  • Update to the wavechart from the inside to the Subvi

    I want to update graphic waveform from inside a Subvi

    I found this post

    http://forums.NI.com/T5/LabVIEW/update-waveform-outside-sub-VI/m-p/2330960/highlight/true#M730536

    that seems to be the solution to my problem.

    It sounds simple, but I'm new.

    Could someone please complete the attached Subvi?

    You're actually sort of close. You must use a reference control on the front panel on the Subvi instead of the chart control. Then you can wire your main VI reference. In the Subvi you can wire the dice randomly to a property value of the reference node.

  • How to get the Subvi (the virtual path is in .exe) reference in Run Time System

    Hello world

    The problem is how to get the reference of the Sub - VI in run time system, when the Subvi is in .exe after construction.

    More details:

    Top of page vi called the Subvi dynamically, so that the Subvi is always included, and the source object is the application.exe.

    After the above configuration, the Sub - VI will be the application.exe. For example, the path of Subvi est...\application.exe\SubVI.vi

    So, how to get the reference of the Subvi in Run Time System?

    I can't do it when you use 'open reference VI' with le...\application.exe\SubVI.vi path in the run time system.

    In fact, I can create a file to include the Subvi, rather than build the Subvi in application.exe, then I can get the convenintly reference. But this isn't my favourate average.

    Thank you

    chenyin

    That is the problem. Call a Subvi dynamic means users could change, but it is also very attractive.

    The dynamic call should be used in a user control, but some parade can avoid problems.

    It depends on why you use dynamic calls...-online 2 main ways:

    -Dynamic call are used to maintain a scalable framework for the code without acting on the executable file-online a single VI distribution managed by the administrator/developer

    -Dynamic call are used to provide a collection of "external" characteristic that could be enriched by the administrator/developer. For example, you provide your customers a set of selectable custom signal filters in the executable.

    In 2 cases, you are only able to assess the skills of the users to know if there is a risk of damage, if there is a change.

    So to stay only master a parade might be to provide dynamic VI without a schema, but with the problem of maintenance, since no in-place editing and more attention to manage distribution.

    Another way is to hide the actual distribution to user-online call dynamic VI but it without name as *.vi but others (a repellent name as system of OS name ) or simply without extension in order to attract not user... but that's debatable...

    Another more difficult but more secure method is to create a consistency check before your routine (version, user, modified date,...)

  • The list of all the paths of the Subvi (expected)

    Hello

    I reconstruct a relatively large application (say a unique and main VI) to restore a little chunks from other builds, completely perhaps a few or several thousands of VI.  The nomenclature of hierarchy of folder of the component of the generations is not quite logical and there is a certain cross linking or duplication between the Subvi is based.

    Ideally, to get the organized entire application and later for documentation purposes, I would like to be able to generate a list of files of all THE sous-de in the main VI VI.  I don't know about this gem:

    http://forums.NI.com/T5/LabVIEW/paths-of-the-called-files-how-to-see-them/m-p/2721289/highlight/true...

    However, this version is underway and I can't run the main VI for a list that said by the way, for most because it will not run if Subvi are missing, some as a deep layer (on the block diagram of the main VI), others several layers down.  Be able to get a list from which it EXPECTED these s Subvi being would be extremely useful to solve this problem.

    Is it possible, without running a VI, to view a list of all filepaths expected of all the sous-de VI?  In the interest of the future organization/documentation, it would be nice if it was a list of these TWO sub - VI that were found as well as (MANY) - VI I say to ignore when loading to load the main VI.

    Thank you!

    mikeporter wrote:
    A few THOUSAND screws? It is not big enough, so huge! In fact, it is much too big - I don't like what he does.

    You look at starting over.

    I do not share this statement.  Several projects, I would call medium-sized loading screw 4,000 in memory, probably about 2,000 or more have been written for the project and the others were the user.lib, toolboxes, variousl library and the vi.lib.

    If you add your VI to a project, you can go to the files tab, and it will show you the structure of all code depenedency records.  Of course, if the screws are missing it cannot tell where on the disc these dependencies have been loaded from.  From LabVIEW 2014 NOR has the ability to know the load path planned to miss the screws you see when you open help in a missing VI context.  In the Help window will tell you the planned trajectory.

    But I still don't see why this function may not work for you.  I tried it and he found the projected paths of components on a broken main VI.

  • Get information from the low level of the Subvi ni5660

    A quick explanation of the problem: I need to create several VI just to return a value of the PXI-5660 (ex: Center frequency, Span, etc.) while the entries are only a "VISA" and one "error in.»

    Detailed explanation of problem: I need to create multiple VI that the properties 'Set' or 'Get' of the PXI-5660 module (ex: the Central frequency value, get frequency, etc...).  Each VI must have a VISA in/out and in/out Error, but the only other present in/out should be the property of game/called.  Global variables are not allowed.

    One of the biggest problems for me is that ni5660 drivers do not contain a property node.  I managed to (apparently) set some of the properties by feeding only a single entry in the icon 'configure ni5660 for spectrum', but the only tool that seems to be able to output all information is the icon «MT get Attributes»  The release of 'MT get Attributes' does not contain many of the properties that I need good output.

    I tried to use the icon 'MT get Attributes' linked to "ungroup by name" which has the value "handle receiver.handles.niScope" which feeds on the reference to a property niScope node, hoping that I would be able to obtain information through the niScope 5660 (it seems that ni5660 software uses the niScope on a lower level software ", correct me if I'm wrong).  This VI finished, when put online with the 'ni5660 Initialize.vi' and ' ni5660 Close.vi, ' returned the error (-1074135028) with the explanation 'ID attribute not recognized.' ""  (The error occurred on the property node in the Subvi "Get the Central frequency")

    The goal is to make the action of PXI chassis similar to a HP8563E Spectrum Analyzer.  With this in mind, the list of attributes that I will need in the end to set and get (the separate VI) are the following: Center frequency, Span, window, number of Points, resolution bandwidth, level of reference, mitigation and time sweep.

    I apologize for my (very probably) simple question, but endless (I only started programming in LabVIEW there about 2 weeks).  If someone would be able to point me in how to make apparently PXI-5660 current property settings from thin air, I would be very grateful.  If more information or details are needed, feel free to ask.

    Thank you

    zdunn wrote:

    ....

    but unfortunately, I'm still at a loss, how to create a VI that "calls" that same property back and the fate, while using only 'VISA In' and 'In Error' as inputs.

    Located on how silly that statement. You want to create a function where (for example) you want to set the resolution bandwidth and do not want to pass as a parameter the name of the instrument. You have created the programming language that is able to read minds?

    You can use a function where you can pass a parameter in (or use a function that retrieves a parameter) or do nothing at all with the instrument. It is more complicated than that.

    There are tutorials available that can help yu with LabVIEW to learn, but I think that there are certain fundamentals means.

    Edit: Sorry, I may have misunderstood. to query does not require an entry but I don't understand what you want to query. The parameters of the instrument are all under control stripped - a program you or any other writing. Unlike a GPIB instrument, there is no one '?' command to read a rear frame. It is assumed that you know how the instrument has been configured in the first place.

  • Structure of the event does not clear the queue after his release from the Subvi

    OK I'm not sure if this is a stupid question or not...

    I was trying just a few tips and stumbeled on this problem...

    So I created a sample (not exactly)

    In qqq_Main.vi just press PressMe

    (it opens a Subvi qqq.vi)

    There are two buttons to stop "Alt1" and "pylone2".

    To close the Sub - VI press either on "pylone2".

    or press "Alt1", then "pylone2".

    with the latter method of the value of closing change pylone2 is registered outside the while loop and after the closure of the Subvi should not it be erased? (Or should manually clear us it?)

    For this reason not clear, the second time I press 'PressMe' change the value of pylone2 even goes off before you press anything

    I can't look at your code at the moment, but according to your description, it seems that the system works as expected. I guess you do a completely static record of events (open the event configuration dialog box and select the controls and event).

    The first thing to clarify is your use of the term "registered". In this case, it's a problem, because the registration in the context of the protests means asking to receive the event when it happens.

    Now that you know it's important to understand where the recording is happening, because that's what determines which events are stored in the queue. When you use this type of static record, registration happens from the VI the event structure is in run mode (Note: this does not mean that the VI is actually running, but just that it's the of running or reserved for the race) and the cancellation of registration only happens when the VI mode of execution. Who is right for which you get the events in the queue of the previous run of the VI - the VI is still in run mode, then the event is added to the queue and still waiting in the queue until the structure of the event to run again.

    You can work around something like that by switching to dynamic registration of events, where you can unsubscribe to empty the queue at the end of the VI, but requires more code. Also, in 2013 LV there are a few features added to events that could allow to do this statically (I don't study all the additions, so I don't know if this is possible for static recording).

    There is a good presentation on the events of NIWeek 2013 by Jack Dunaway. You can find details of how to download the video here - http://lavag.org/topic/16091-ni-week-2012-videos/

Maybe you are looking for