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.

Tags: NI Software

Similar Questions

  • 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!

  • Update of already opened the Subvi front

    Hello

    I am creating a message from the user who is being updated so that the countdown of the time not yet finished. Its façade must remain open until the press of the user "Ready".

    Can I do without reopening the façade in the loop (during the call to the Subvi) again and again, but the only update on front panel of the Subvi already open?

    Can I use a refnum at the Subvi somehow?

    Thank you

    Something like this should work.

  • 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,...)

  • Open the Panel front of the Subvi, which is called by reference in the EXE

    I want to open the façade of a Subvi when it is called. This sub - VI will open the façade of a Subvi third level. So, I want to go back to the main.vi the output of the subVIs.
    I can do successfully in the development environment.
    I call on the reference asynchornously screws. If the screw load when they are called and the calling VI awaits the release of the subvi.

    I am attaching the screenshot of the window subVIs properties customize.

    When I build the application, the executable file could not be opened the Subvi front panel, even if the paths of the subVIs are related.

    I also put the subVIs in the field "Always included" the build properties and the box "Remove front panel" is not selected.

    I join the project and screenshots of the parameters.

    If you had used the dialogues of error, you would have seen the paths of access to the VIs you build are not valid.  The screws are always included in the EXE file, so you don't have to do any special stripping of the VI EXE path.  A fake wire to your case structure determine the path, and it works perfectly.

    Just dual-band is the path if you try to get the EXE directory.

  • The call for a Subvi without providing a reference to the objects inside the Subvi?

    Hi all

    Suppose I have a Subvi, which trace Y1 vs X 1 and Y2 X 2 vs on the same XYGraph. See attachment.

    XYGraph the property node is linked to the XYGraph. It sets the style width and point line for each curve on the XYGraph.

    If I call this Subvi 4 times in other code (make 4 diferent XYGraphs (XYGraph1, XYGraph2, XYGraph3, XYGraph4, each of which contains two lines Y1 X 1 and Y2 X 2 vs vs)).

    Why would I need to create 4 different references for 4 different XYGraphs?

    The question is really this: If the property node is explicitly linked to the XYGraph in the Subvi, why the property node must be updated via a reference if the Subvi is called

    several times to several XYGraphs? Wouldn't the Subvi take entries, draw the curves of the XYGraph, update the nodes property and then produce a final with XYGraph

    update properties?

    If there is to be a Subvi why you a graph on its façade and manipulate its properties? You will have to manipulate the properties of the chart on the front of the top-level VI. You see a graph is not a type of data - it is a display object. What is passed through calling screw terminals are given, and in this case, the data type is an array of clusters containing a table of x values and an array of values there.

    If you want to do a Subvi that performs this operation you must pass it a reference to the curve that you want to handle that one of them has entered the data values.

    Mike...

  • Get specific references for all controls

    Using slightly modified code from here, I'm generating a table of references of control on my main façade which is then transmitted to a number of subVIs. Although this feature does not work, it would be preferable to obtain specific references to controls (for example, Boolean RefNum instead of RefNum of control).

    Get these specific references seem possible using constants more specific class and the class specifier. However, the storage of data becomes a problem because I can use is more tables (because they are a different type of data). I don't know if there is another way to transmit these data. I experienced casting the RefNums in the variants, but to get the data of the variant, I need to know what type of RefNum I'm waiting order, of defeats the purpose of making it in the first place.

    A secondary problem is the names of references. The RefNums of control do not have names associated with them, and I do not know how to assign names to them. I tried again using variants and using the function name of the OpenG value data, but this block LabVIEW without indicating why.

    I have attached a version of my code that tries to assign names by using the name of the OpenG value data and build an array of variant. To run it, simple addition the VI as a Subvi has VI that has some Boolean controls on the front panel. My apologies for the crude State of the code - I'm still trying to find how to run things are a bit messy.

    I don't know if you're going to get much better.  There is really no way I know to have a completely flexible way to the building called cluster of references based on any set of given façade, Subscribe to this.

    I tend to do things the manual way (as there are also a bunch of references to elements of façade, that I wouldn't need).  I would like to do all the work for the grouping in a Subvi.

    I am attaching a zip file that contains the key to VI (unless I missed something) on the first project where I really tried to resume on the reference building.  The files are LV9.

    My main VI, I have the Sub - VI soon called to build the interface user of VI references during an initialization phase.  I pass the reference to the main VI in this sub - VI that generates all the references.  I worked on it as a master cluster that contains items that are arrays of references to related controls.  It uses an other sub - VI, called get references and names of labels that I created to help find witnesses.  I still need to use more specific class to get the property references, but I put only once at the beginning.  I then move this thread to cluster out and anywhere in my VI which should have access to references of the façade elements.

    I use arrays of strings to supply the names, I need to build and group references.  This allows me to ignore the controls, I don't care.  The drawbacks to my system, is that if I change the name of a command, I need to update the name in the Subvi.  And if I want to add all controls, not only do I need to add the label to search functions names, I also need to update my cluster typedef (and you absolutely want it is a typedef) to add a place to store the new reference.

    I hope that gives you some ideas.  It worked for me and I will probably use the scheme on another project (or even rewrite other projects using this diagram.)  If there are ideas of improvements, I'd be happy to hear.

  • Bug found during the use of references to the control in subVis on Compact RIO?

    Hallo,

    I have a simple task. I want to read higher VI into a Subvi the real value of a control to a level. I want to solve this problem by using a reference to the control.

    I have attached a simplified program that shows this.

    But the problem is now. When I run the main VI on a cRIO-device, the indicator "DataByReference" is not updated with the actual value. Only when I opened during execution of the "RefMain.vi" too, then everything works fine.

    More strange thing is, when I run the VI of hand on the host PC, everything works well, also without having to open the "RefMain.vi" when executing.

    Someone at - it an explanation for this behavior?

    Thanks in advance!

    Bernd

    This isn't a bug.  See this explanation.

  • Get the reference to the type of control of def

    Hi all

    I've been using VI script to update certain parts of the report and have encountered a problem in a case.  I was not able to get a reference to a def control (.ctl file).  The control is simple enum, and I recorded it as a def type because I use several places in my main VI, although I don't think that my problem has nothing to do with the fact that it is a def type.

    I know how to get a reference to a VI (Open VI reference function), and I know how to get a reference to a control in a VI (function Open VI of the reference of the object), but not a stand-alone control.  Details of the help file for the Open VI reference function imply that I might be able to do this with instructions to "Strictly typed VI reference", but it let me only select files .vi and not the .ctl file.  Please notify.

    Thank you very much

    GSinMN

    You can open a typedef of control using the VI reference open and the path of control of wire on the way to the VI.  You can then change the control with scripts by obtaining a reference to the control on the front panel.  If you have a VI with control of typedef, you can get a reference to the typedef (not its instance) by obtaining a reference to the instance and using the Typedef VI or properties Typedef plotted for reference, or the path to the typedef.

    This can be confusing because a typedef is literally a VI without a diagram, and the script processes as such.

  • Node property/reference for the image and 'Create VI' inconsistent control?

    Hello

    I encountered this problem several times already and although I have worked around him, so far, I would really like to understand what is it:

    If I have an image display control on the Panel before (IMAQ Vision, not the image control type) and drag a property node or a reference to it on the block diagram, it seems impossible to create a Subvi diagram if the selected objects are equipped with a knot of property image or an image reference. Select 'Create Subvi' won't do anything, don period. No warning, no beep system, no nothing.

    A related issue is that if I have a view control reference on the diagram and try to create a control from it (for example to use as a control on one dimension of connector VI entry), same thing, "Create control" will not do anything.

    Why is this?

    Thanks for your comments.

    X.

    Xavier,

    This was reported to R & D (35835) for further investigations. A possible workaround is to make the Subvi LabVIEW 7.1 and open it in the new version of LabVIEW.

  • How can I get the control specifies a reference (by the script)?

    By what method of property can I control that specifies a reference? (See an example of a reference to the code snippet).

    When I reference (ControlReferenceConstant in the script), I can't get control of the reference points to. I guess it's done with the property ' reference control bound to. " But I don't know how to convert the variant to the control. Conversion to the control class does not work. (See excerpt below). Conversion does not return an error, but the reference is not valid.

    A few details: the variant contains a reference to a control and has a name matching [2]. The type of reference data is just as well [3]. But the reference is 0, which is of course invalid digital show (seen in the probe and indicator).

    An entire book would be to iterate through all controls (indicators included as well as items in clusters and berries). The label could be the first check. But because they do not have to be unique is not enough. As a second step could be verified that the ReferenceConstant is listed by the property "nodes of control."(delede contrôle) reference ".

    [1] LV12 helps ControlReferenceConstant properties:

    http://zone.NI.com/reference/en-XX/help/371361J-01/lvscript/controlreferenceconstant_p/

    [2] get the variant name with:

    Select 'Type of Show' in the context menu of indicator varying or

    OpenG VI 'get name of data '.

    NIs in \Utility\VariantDataType\GetTypeInfo.vi VI

    [3] get the Refnum Type in the variant with

    NIs in \Utility\VariantDataType\GetRefnumInfo.vi VI

    If you look at using the property, you will see that it actually returns the data type of the node, not the actual control. That's way, you cannot use the reference in variant - it's not a real reference to a control.

    I think it's all just an oversight that no one added to the relevant property to the node, but there is a simpler solution for you that I think should work, that should come to him on the other side - for each control in the public Service, get the property [] of control reference nodes and it look for the reference of your node. If you found it, the node made reference to this control.

  • ActiveX - Get a reference to the control

    Hi all

    I need raise a value change event in a VI ActiveX of LabVIEW interface.

    To do this, I think that I need to retrieve the reference to the control and then use the (signalling) Value property of this control.  Does anyone have any idea on how I could get the reference to a control through the ActiveX interface?

    Any other suggestions on how I can trigger a change of value programmatically event are certainly welcome.  I tried the 'SetControlValue' call function but that does not raise the value changes.

    Thank you

    Zach

    I don't know if I understand, but it looks like you are trying to control LabVIEW via its interface ActiveX from another program, such as C. In order to get the reference to a control so that you can access the value property (signs), you must first access reference front panel of the VI and then get the list commands (which is an array of references). You can walk through this table until you find the one you want, and then set the Value property (signs).

  • Can't place separator reference in the private class data control

    Any reason, I can't drag and drop a splitter reference leave my block diagram to a private open class data control? Basically, I'm ignored when I let it go, even if I see an icon 'drop' after that I drag the control.

    Well, I think I got smart and just placed a generic control Refnum into the command group, and then used the VI of the server class to identify it as a separator. Interesting how I could drag and drop references to the sub-panels and other types but not a divider.

  • How to find the references to the ActiveX control

    Is it possible to determine where an activex control is used in a labview project?  I have a moderately important project who have used a combination of ad-hoc XML parsers, including the parser XML ActiveX for Microsoft (MSXML).  I am trying to replace all occurrences of MSXML with of builtin labview VI XML or our own DLL calls that make more complicated sequences of calls to XML-Xerces/Xalan libraries.  I want to assure you that I replaced all references to the MSXML parser without having to inspect all the VI in the project.  I was hoping that I could right-click on a function block "Automation Open" and select the option "Find all Instances", but apparently it is not available because it is for a VI I created.  In addition, I was hoping that if I went to the Project Explorer, it would show that the msxml.dll file was listed as a dependency where I could do a 'find Caller' as a regular dll referenced via a "call library function node".  Does anyone have a suggestion on how I can automate this search?

    Thank you.

    'Find all Instances' is only available for the screws that you create, but you can always find the function of automation opening in your project. Just open your project and open a VI. Then select Edit-> find and replace. In this dialog box, you can search for specific functions throughout the project.

  • Using an array of references to Boolean controls as the input to a sub - VI edit propierties of orders...

    Hello

    I have a group of boxes and I want them to be exclusive one to change the objects visible to my vi when I change their State. So that my clear code, I decided to create a Subvi, which implements these features. My Subvi recives an array of references to objects that I want to change the visibility, an array of references to the boxes (to be change it's values to make them exclusive when one of the boxes change it is State) and an array of the values in the boxes in the last iteration (to be able to detect that we changed to true and false to others).

    The problem I have is that when I use a node property to get the actual values in the boxes in the Subvi (to compare to their State previus and detect changes) I will get a type variant, and not a Boolean value. I tried to set the mechanical action of Boolean references used as input in the Subvi as switch, but it doesn't seem to work. I understand this is cause of the Sub - VI does not know the type of Boolean values that will receive and assume the worst case...

    Is there a way to do what I want?

    I hope I've explained myself... Thanks in advance!

    There are several ways to deal with this, but it would be useful to see your code. Send the cluster in a VI, or those of the individual references boxes? It sounds like you are not using a strict reference. The workaround, since you know the type of data is to use the variant data and change the variant to a Boolean value, but this should not be necessary. Once again, some postal code so that we can be more help.

    Edit: looks like you are trying to hard-code the Radio buttons. You know LabVIEW has Radio buttons now, no?

Maybe you are looking for

  • KitKat Telus/Koodo Dialer Bug

    When you close recent applications (especially the dialer) then open it and select the keyboard, it doesn't show. You have to click back and show it again, in order to see it. Looks like a bug in 173.44.9 as the German 174.44.9 has this problem! Plea

  • B570e problem on windows driver 8

    I installed windows 8 preview version on my lenovo b570e, all drivers works perfectly except the touchpad. When will release you the update for smart Elantech buffers? Or yet will update you drivers touchpad for windows 8?

  • NO Hyper-V, Windows 8.1 no upgrade on Envy 700-130

    Just got a new Evny 700-130 with 8 GB of RAM and immediately improved to 8.1 Windows. Then I went the Windwos function dialog like the one below, to activate the Hyper-V technology, but on my system, it is not yet listed. I have confirmed that virtua

  • Click right button works only with Windows 7

    My right click button does not work with Windows 7. I had problems with the new cases, but with the help of your part which has been resolved.

  • Windows 8 wireless connection properties box is unavailable

    I have an upgrated Acer W500 with Windows 8. I am trying to connect to my office, WiFi, which requires updates to properties. Documentation Microsoft indicates that do the WiFi properties is accessible by: press on and hold or right click on the name