Using Control Reference to change subVI control - sub VI also called using a container

Hello
I am in need to update a control inside a sub VI that is also called inside a container in the main VI.
Please see the project attached.
My goal is simple -
Change the "Main VI calling sub VI-Container.vi " panel's "FGV state"
once the state changes, it needs to be propagated to the sub VI that is called within the container
The sub VI's (sub VI called is "Check Time FGV.vi")  "FGV state" also needs to change when the main front panel's control
How do I accomplish this ? just a FYI - the sub VI being called is at "C:\Projects\User Examples\Check Time with FGV\Check Time FGV.vi"
Also my stop button functionality is broken, not sure why.
Thanks for your help.
Attachments:
Check Time.lvproj ‏6 KB

OK you have a few problems.  Lets address the Stop button first:
Add a value change event for the stop button and put the stop button in that case.  Wire the button out of the event structure to the conditional terminal of the while loop.  WHAT IS HAPPENING:  You press "Stop" but the event structure is still waiting for an event so the loop never iterates.  Get rid of the wait.  the CPU will not be hogged unless you are generating events at warp speed.  No user can generate events that fast! so the loop will not be greedy.  The event structure does wait for an event it does not poll for them by running contineously.
Now your subpanel.  You do know that the FGV runs once when you invoke the run method on it right?  You can change the contol value all you want but the vi won't do anything about it because the vi is not running.  And even if the vi WAS running changing the value of a control that is read once (outside the loop) would not cause the value on the wire inside the loop to change at all.  Does that clear up some of why what you are attempting will not work like that?
Jeff

Similar Messages

  • Price control cannot be changed (cost control split exist)

    Hi FI Experts,
    When changing the  price control field in material master through MM02 from "V" to "S" , the following message is displayed.
    "Price control cannot be changed (cost control split exist)".
    What should i do to avoid this?
    Regards,
    Sudarshan

    Hi Sudharshan,
    Before changeing the Price Control from V to S please check the Moving Price and Std.Price is equal or not.
    This is one of the reason for that.
    Pleease assign points
    regards,
    Gopi.

  • Using invoke nodes to change a control on a server vi

    I am trying to pass a parameter to a vi running in parallel with my main vi. I am using invoke nodes to do this without any problems. In server.vi I want to respond to a change in the control using an event structure. I have found that when passing the value to the vi using the invoke node from client.vi the event structure does not respond to the change in value. Is this correct behaviour? In the attachment run client and server, any change in the client panel is reflected in server without a response from the event structure. Running server by itself a change in the cluster causes the event structure to respond as expected. Thanks in advance for any help on this.
    Attachments:
    Test Invoke Node.llb ‏47 KB

    The set control value method is the same as using a local variable or the value property - it doesn't fire the event. To fire the event, you need to use the Value(signaling) property. To do this, you need to get a reference to the control. You can do this by taking the Front Panel property of the server VI and wiring that reference into another property node. Then, you get an array of references to all the controls on the FP. You will need to find your control and wire its reference into the signaling property and then the event will fire. There are, of course, other ways of doing this - this one is fairly complicated, since you have to find the reference.
    Try to take over the world!

  • I use iPad 3 suddenly phone icon is missing.  I could browse using 3G network but could not make or receive any calls using cellular network.

    I could not make or receive any calls using cellular network.  But I could browse using 3G network.  Same sim works fine in iPhone

    The iPad has no phone Icon, nor phone capabilities.

  • Firefox cannot be found inside the Program Files (x86) when using the shortcut or the actual .exe. I also tried using Regedit.exe and firefox was not there. How do I fix this?

    After I get the error message "Windows cannot find C:\Program Files (x86)\Mozilla Firefox\firefox.exe'. Make sure you typed the name correctly, and then try again." I proceeded to use the Regedit solution but the file was not inside the Image File Executable Options folder. The only file inside of there was iexplorer.exe.

    #Go to [http://www.mozilla.com/en-US/firefox/fx/?ref=logo Download Firefox 4.0.1] and download the installation file to your desktop. You can use Safari to do that, but don't choose to run it.<br><br>
    #Then go to Add/Remove Programs, scroll down to "Mozilla Firefox" and remove it, choosing to keep your bookmarks, customizations etc., (''don't checkmark the box''). If you don't see it anywhere, then it's not installed.<br><br>
    #Assuming it is though, reboot and delete the folder called "Mozilla Firefox" at this location: C:\Program Files\Mozilla Firefox<br><br>
    #Finally run the installation file you downloaded to the desktop earlier.<br>
    Your bookmarks, customizations etc., are maintained in a different location and will become available to you again once you complete the installation.<br><br>

  • Performance issues using control references in Analog control loop?

    My main vi of a tensile tester control application calls a number of sub-vi's, including a analog control loop which controls the test. The control loop must update some boolean and digital indicators and respond to user input on the front panel of the main vi during a test.
    To simplify my main vi, I moved the control loop code into a sub-vi, and used control references to access the controls and indicators on the front panel. However, this has dramatically affected my loop performance, and the loop can no longer keep up with the acquisition speed.
    Do control references always cause such a slowdown? Is there anything that I can do besides moving the code back into the main vi?
    Thank You,
    David Creech

    I have had the same problem. I have discovered other funny things about references also; some kind of memory management (or mismamagement?) is taking place behind the scenes.
    Regardless, you can often do away with the references by passing the initial state of a control or indicator into the subvi, changing it inside, and passing the altered state back to the caller. Once back in the caller you update the front panel control or indicator by using a local variable.
    One thing to watch out for if using this scenario is the dreaded race condition; this can be avoided using a state machine. Check out
    http://www.advmeas.com/goodies/statemachine.html
    for a good example. It is a shame that references behave in this way; it limits thier usefulness.
    Perhaps someo
    ne else will point out a way to utilize them more sucessfully?

  • Can you use a control reference for a graph with two channels of data?

    when i try to wire a 2-D array of data to the value property of a graph(strict control reference), it shows a conflict. The value data type only shows up as accepting a 1-D array input. I want to use control references to pass the chart data to my main vi. Will I have to change the waveform graph control reference into an array control reference to make this work?? This would require adding a while loop in the main vi to read the array data and update the graph data??

    > when i try to wire a 2-D array of data to the value property of a
    > graph(strict control reference), it shows a conflict. The value data
    > type only shows up as accepting a 1-D array input. I want to use
    > control references to pass the chart data to my main vi. Will I have
    > to change the waveform graph control reference into an array control
    > reference to make this work?? This would require adding a while loop
    > in the main vi to read the array data and update the graph data??
    I think the problem is that your waveform graph is set to take one type,
    a 1D array of doubles, and you are wiring a different type. While
    charts adapt to type when the data is wired to their terminal, they do
    not adapt to data wired to their value property. If you change the
    datatype of the graph from its terminal, then you should see the value
    property change type also and you are set.
    Greg McKaskle

  • Can I control front panel items from a sub VI?

    Hi all,
    After taking the Intermediate I class, I have been trying to follow the methods of using modular programming, but there's one thing I haven't quite figured out how to do. How can I change a front panel display from within a sub VI? I have a menu selection that I wish to change - can I simply input a reference to it or something like that?
    Thanks much,
    Jason

    All you need to do is to pass a control reference to the subvi, and then, in the subvi, to use a property node to modify whatever you want (well, almost...) on your control. Ask if you have more trouble and need an axample...
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Given array control reference, how do I obtain array size programatically

    If an array control reference is passed to a sub-vi, how do I obtain the current length of the array within the sub-vi?  I've tried two properties:  "NumRows", which as documented, contains the visible number of rows in the array control.  "IndexVals" contain the indices of the array element in the upper left corner of the array control.  There seem to be no methods for obtaining the current array length.  I tried changing the class of the array reference to cluster then using the "Controls[]" property... but this generated a runtime error.  What am I missing?  Thanks.
    Solved!
    Go to Solution.

    Taki1999 wrote:
    There's a lot of casting going on in your subvi.
    What is the actual use case?  There might be a way to do this which doesn't require the casting and you could work just with the reference that is passed in.
    For your method you need to wire in a strict class specifier into the To More Specific Class conversion.  I'm not sure how to make the strict class specifier.
    I can help with that but first...
    Working with arrays on unknown data types is no esy task and determining the size is a special challenge and I did just that in this Nugget that talks about using control references. This task is much easier when you know at development time what is in the array. That is where the strict type casting comes into play.
    What I would do...
    1) Make sure the contents of the array is a type def (to support data strcuture changes in the future).
    2) Go to the FP of the VI that has the array in question and drop a generic control ref control.
    3) Ctrl-copy and drag the array in question INTO the the generic ref (still working on the FP). You can tell when you find the "sweet spot" in the ref control because it will switch it appearence. See this mini-nugget for an image where the same thing can be done with que refs.
    4) Make the now strict ref a type def.
    5) Use the type-def'd ref from step #4 in the sub-VI as the proptype used by the "To More Specific...."
    After those changes you should be able to work with array in the sub-VI as if it were in the top level.
    BTW:
    Doing the above on the control in the sub-VI that brings in the ref would allow skipping the "To more Specific..."
    Have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Control references/refnums: general info

    Please forgive this question, I am a relatively new LV programmer and the help files & manual seem quite poor to me!
    I am after some basic information about control references & refnums as I am sure they would be of help to me.
    1. What are the main advantages in using them? (i.e. what they can achieve)
    2. How are they implemented?
    3. How is a control refnum/reference passed from one VI to another programmatically?
    Huge thanks to anyone who may be able to shed some light on this topic.
    Dan

    > 1. What are the main advantages in using them? (i.e. what they can
    > achieve)
    The references let you access properties and methods of controls on a
    front panel. Previously, the access was limited to the diagram of that
    panel, and each property node accessed a single particular control.
    With control refnums, you can have one property node access an arbitrary
    control with the refnum parameter controlling which one. You can also
    send the refnums to subVIs meaning that the code can be abstracted to
    simpolify your diagram and shared with other panels.
    > 2. How are they implemented?
    I assume you want to know how to use them. You right click on the
    control or its terminal and under the create menu, next to where you can
    create an implicit property node, you can also create a Reference node.
    The datatype of this node is unique to the type of control that you
    created it from, and when wired to a property node, the property node
    will show the same properties as an implicit one. As an example, if you
    have 8 Boolean buttons on your panel that need to be enabled, disabled,
    hidden, colored, labeled, or whatever based upon the state of your
    application. You can right click on the eight buttons creating
    Reference nodes and build an array of the references. You can now loop
    through your array and with one property node, set the properties of the
    buttons based upon whatever logic or table of information that you need.
    You can also do this in a subVI by passing the array of references to
    the subVI.
    It is also possible to get control refnums/references from other
    properties. For example, a slider will give the reference to its
    digital display, a graph will give references to its cursors, etc. It
    is also possible to loop through the references of all objects on the
    panel inspecting names or types rather than using the Create Reference
    popup, but this is more advanced and requires casting the references.
    If you really want to know how they are implemented, it is much like
    file refnums or VISA refnums. I can give more info if you ask a more
    specific question.
    > 3. How is a control refnum/reference passed from one VI to another
    > programmatically?
    >
    In the refnum palette there is a Control/VI refnum control. You drop it
    on your subVI and right click to set the class. Note that there are
    lots of classes arranged from basic to very specific. Class refnums
    will convert to more basic automatically, but will not wire if they are
    incompatible. So, if you are careful, you can select the class from the
    menu and create the control refnum that you can wire to the connector
    pane allowing you to pass refnums into the VI. A shortcut that is a bit
    simpler is to draw the reference from the diagram to the subVI panel.
    It will make the correctly typed control refnum for you, ready to wire
    to the connector pane.
    That is sort of the basic overview. You probably want to look at the
    example -- general/cntrlref.llb/Property Nodes.vi. I also suspect that
    the devzone contains other examples showing how they can be used.

  • Get All Controls References

    Hi all
    If somebody know how can i get all controls references of VI (including controls that founds in Tabs and Clusters). I need generic method, because i haven't information about VI (reference to VI i get only at run-time).
    Thanks, Nadav

    To include the controls on Tabs, pass the array from my previous answer into a for loop, use auto-indexing. Place a Class Specifier Constant in the loop, right click on it and set it's type to a Tab Control. Place a "To More Specific Class" function below the constant, and wire the constant into the top.
    If the control from the array that you pass in is a Tab Control, "To More Specific Class" will NOT return an error. Use a case statement and use the No Error case to expose the Tab Control properties. Return the "Pages" property (an array) and pass this into a for loop. Connect a property node to the indexed pages, then select Controls On Page to return an array of controls ON EACH PAGE. You need to set up a shift register and use build array to return all of the controls from all of the pages. Make sure you close the Page Reference.  You can concatenate the array of Tab Control Page items with your original FP Controls.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Determine if a control reference is a strict type definition

    If a VI is passed a control reference it can determine the VI Server Class using the ClassName property but how can it determine if the control reference is from a control which is based on a strict type definition?

    That a pretty neat little VI you've found, Darren. Kudos!
    The solution that Darren presents, however, will not tell the difference between a typedef and a strict typedef (unless I'm missing something). If you have VI Scripting enabled (see attachment for where to enable this in the Options menu), you can expose the Is Typedef? property. 
    This returns an enum with the following values (as pictured)
    not a typedef
    typedef
    strict typedef
    class private data
    Although this property is not settable in a VI at run-time, it should be readable.
    Below is a picture of the Options menu where you can enable VI scripting
    Mitch
    Attachments:
    VIScripting.PNG ‏33 KB

  • Finding vi running in subpanel from a subpanel control reference?

    I've poked around considerably and cannot find a way to take a control reference to a subpanel control and get the vi reference for the current vi running inside the subpanel.
    I know I can save this locally inside the vi containing the subpanel (from the invoke node call to insertvi), but I'm wanting to do this externally from an app that just has references to all the controls.
    Any help would be greatly appreciated.
    Thanks

    If I'm interpreting you correctly, you would like to find the VI reference of the subpanel VI based off one if it's control references that has been passed to some external application from the VI that contains the subpanel VI?  See the attached VIs for an example if this is the case.
    "VI with subpanel" passes a control reference to "SubVI" which can then get the reference to the "VI in subpanel".
    I grabbed the original files from here:
    http://digital.ni.com/public.nsf/allkb/0B11E4964685B49F862571430000091E?OpenDocument
    Trey B
    Applications Engineering
    National Instruments
    Message Edited by Trey B on 07-24-2007 11:30 PM
    Attachments:
    VI in subpanel.vi ‏27 KB
    VI with subpanel.vi ‏29 KB
    subVI.vi ‏8 KB

  • Using cross-references in the index?

    Wondering if there are any suggestions out there for using
    cross-references in the index.
    I don't think using the "See also" option is what I'm looking
    for; what I'd like to do is create index entries with a cross
    reference next to them.
    I tried this by creating an index entry and typing (See
    "other topic name") next to it, but when I compiled the project
    this index entry was not included because I did not have a topic
    assigned to it.
    Is there any way to create a cross-reference index entry
    without a topic assignment? Or are there other workarounds that you
    use?

    Index cross references are designed to enable you to have
    index keywords that when clicked redirect the user to another
    keyword. For example I use them for acronyms to redirect users to
    the longer version. Are you cross references topics inside the
    project? If so, can't you use the index cross references by
    indexing in the same manner? If the cross reference you want is
    outside the project, using the index is not the way I'd suggest.
    Why not use a link in a topic to a URL, file, etc. You may be able
    to do what you want through a redirect topic but I haven't looked
    into this. Come back with some more details if I am off the
    mark.

  • When using my ipad air it keeps coming off the page I'm on or app and going back to the home screen. Also when using my ipad the screen will go white with a black apple icon in the middle for about 20 seconds then it makes a ping

    When using my ipad air it keeps coming off the page I'm on or app I am using and going back to the home screen. Also when using my ipad the screen will go white with a black apple icon in the middle for about 20 seconds then it makes a ping sound and goes to the home screen. Could anyone help please. Thank you :-)

    Read here:
    http://help.apple.com/ipad/8/#/iPad9a245e3e

Maybe you are looking for

  • Help with multiple iPhones and Apple ID!

    I have my iPhone 5S and my iPad Mini hooked up to my Apple ID. I recently gave my friend my old iPhone 4 for his birthday and it is also using my Apple ID. Whenever he changes/deletes the contacts in his phone, it changes mine. Is there any way to st

  • Internal Server Error while running JSP file (Oracle AS - HP Unix)

    Hello Friends, I have created a JSP file in which I am trying to connect the database using oracle.jdbc.pool directory. But it shows an error message as: Internal Server Error The server encountered an internal error or misconfiguration and was unabl

  • Exported muse site won't switch to mobile

    Hello, I just recently created a muse site for silascruces.com They wanted to use an outside host so we ftp'd the exported muse files and now when I go to the site on my phone, it doesn't switch to the mobile version like it used to when I had it on

  • PO Output for Communication Parameter Values

    I've created a custom RTF template to print PO's, which is working fine except for one thing: I can't get the parameter values from the PO Output for Communication concurrent program. I've tried: <?param@begin:P_report_type?> but it doesn't seem to r

  • Hosting with Business Catalyst for cli

    I currently use Adobe Muse to build websites, I love it it allows me to build and create the type of sites my clients desire. So with that in mind I need the following advice: 1) One of my clients wants to host with a separate company NOT BC. How eas