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

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

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

Similar Messages

  • VI containing Event Structure will not receive front panel events in LabVIEW Real-Time.

    Hi again, I'm working in my first UI (attached VI).
    It works when running directly from PC. It doesn't when running from cRIO, there's the message "VI containing Event Structure will not receive front panel events in LabVIEW Real-Time". I've been reading and I found that "Event structures on RT targets do not support events associated with user interface objects, such as VI panels or controls. For example, associating the Value Change event with a control does not work. RT targets support only user events".
    Is that the problem? If it is, how can I create Mouse Up, Mouse Enter, Value Change (or other user interface events) user events?
    If I run my VI in FPGA mode should it run?
    Attachments:
    HMI.vi ‏33 KB

    Since it looks like you are new to the whole RT and machine control, I recommend giving this a good read: NI LabVIEW for CompactRIO Developer's Guide
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can you "enable front panel dataloggin​g?"

    In the Labview User Manual, it says that "You can create and read datalog files by enabling front panel datalogging." How do you go about "enabling front panel datalogging?"
    Any help would be greatly appreciated.

    From a LabVIEW only perspective, you can enable control (front panel) datalogging through the menu Operate>Data Logging->. If you bind a log file to the VIs front panel it will generate a binary file with the state of the controls in it, when you execute Operate>Data Logging>Log... (I could not find a way to execute this Log... by VI server programmatically - Maybe someone else?)
    From a LabVIEW DSC perspective you can generate a Logos Remote connection to a tag (e.g. with the HMI Wizard). And when you have enabled that this tag has to be logged, the LabVIEW DSC Engine will store/log the value into the Citadel database.
    Hope this helps
    Roland
    PS:
    Not updated however maybe helpful:
    80E?OpenDocument>Using Enable Database Access to Retrieve Data from a LabVIEW VI's Log File
    Front Panel Data Logging and Retrieval (old Example)

  • Why use a wait timer when you can "wait for front panel activity"?

    Why does everyone:
    1) Wire a stop button to the while loop conditional terminal and add a wait for 100 ms (or so) timer to the loop.
    When they could:
    2) Wire the stop button to the while loop conditional terminal AND to "Wait for front panel activity" VI as described in the VI's help file?
    Thanks!
    Adam

    That's just a matter of habit. In previous LV versions, the wait for front panel activity was not available.
    And of course, now you can use the Event structure, that offers better possibilities...Message Edité par chilly charly le 06-25-2006 04:11 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Catch minimize panel event (one more time)

    As discussed in other threads, CVI doesn't have a specific event fired when a panel is minimized. Some workarounds has been proposed, and I successfully used the EVENT_LOST_FOCUS method for a long time.
    But now I found a situation when this workaround doesn't' work:
    if the main panel has a tab control
    if one of the tab pages has the focus
    the EVENT_LOST_FOCUS is not generated for the main panel when the application is minimized with the classical top-right "_" button in the title bar.
    How can I catch the minimize panel event in this situation?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded
    Solved!
    Go to Solution.

    Thanks for your help, jared.
    The panel attribute name is ATTR_PANEL_PARENT
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • Simple example - Break FOR loop inside an event structure based on Front panel event change.

    I am running a for loop inside a state machine architecture that contains a FOR loop. How can I break this For loop based on Event change in front panel ??
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.vi ‏19 KB
    Case inside Event.ctl ‏6 KB
    Case inside Event 2.ctl ‏6 KB

    Okay. Accpeting that the design is not favorable and not advantageous when my program expands. I have begin to follow producer/consumer programming architecture.
    Please find the attached program which is a simple producer consumer with event structure. I wonder how could I stop looping around the producer and consumer loops over and over again. I am pretty sure that this ENQUEUE ELEMENT loops back to the consumer loop and starts from begining.
    I hope my first program in PC architecture with State machine and Event structure is correct. 
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.3-ProducerConsumer Event.vi ‏25 KB
    Case inside Event.ctl ‏6 KB

  • How can i open front panel of a vi and run it

    Hi
    I have a vi that i call multiple times from another vi, however i want it to open the front panel on some calls and not on others.  What is the best way to do this?
    I have come up with a way and was wondering if this method was okay or is there another method that might work better escepcially since i am eventually going to create an application out of it and hope that no problems pop up then
    Unititled 1 calls Untitled 2 where with one call it opens and runs Untitled 2 while with the other call it simply runs untitled 2.vi
    What I did was i changed untitled 2.vi window appearance to dialog but i deselected the show front panel when called, so by simply calling the subvi form untitled 1 it works.  Unititled 2 runs but does not open
    Now with another call i want to open and run untitled 2.vi so by looking the attached vi you can see what i have done
    Again if there is a better method that would make my vi's more efficient i would greatly appreciate it.
    Reza Sed
    Attachments:
    Untitled 1.vi ‏24 KB
    Untitled 2.vi ‏10 KB

    What you did, in theory, is the correct way to do it.  However, you should move the front panel open and close into Untitled2.vi and have a boolean input as to whether to show the front panel or not.  This way, your calling code is cleaner, and you don't have to reproduce the code everytime you want to call the subVI and show the panel.
    If you were to use Untitled2 in another project, then you woud have to go back and look how to implement the showing of the front panel in your other code.  If later, you were to decide you want that VI to be maximized, then you make one change in the VI, and not in every place you ever call it showing the front panel.

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

  • Can not open front panel sub VI when running an application VI.

    When I create an application of my program a problem occurs. When I select options (press a button or so) from the main front panel that should result in a popup menu (sub VI cal) LabVIEW indicates that something is happening but the front panel does not open. The mouse indicator changes to the time glass so LabVIEW is doing something but the window of the sub VI does not open.
    The problem has the same characteristics on several places. There are some sub VI front panels that opens but I ca not find the reason for why these open and not other.

    Hi
    there are three ways trhough which you can force a subVI to show its front panel
    1. open the perticular SUB VI
    click File->VI properties select window appearence catagory.
    click customize button and select "Show Front Panel when called" and "close afterwads if originally closed" check boxes
    save the VI
    whenever you use this Sub VI every time it will pop up front panel
    2. dont perform the changes suggested in option 1. place the instance of subVI in your main application and if you want that instance to popup a front panel then right click on subVI and Select "SubVI Node Setup" again select "Show Front Panel when called" and "close afterwads if originally closed" check boxes
    with this option only certain instances of SUB VI will cause pop up to occur
    3. this is the most flexible option. use invoke node to show front panel. in invoke node select show front panel method to popup the VI and use close front panel method to close the pop up window.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • How can I save front panel images each time a loop iterates

    So I've been working on some optical codes in LabVIEW for a while, I've read a lot of these similar questions but I can't seem to apply them directly to my situation in all cases.
    I essentially have a code that shows an intensity graph that is continually modified in a for loop, I want to save a picture of that intensity graph each loop without having to manually label them. Is there something similar to the get image node that can do this. I've looked through the image acquisition in the vision VIs but only see references to hardware like cameras.
    Attached is a simplified version of a changing intensity graph. With the get image I have to establish the names of 10 images and the path there before it will run and save like I want it to.
    A million thanks to anyone who can help
    Solved!
    Go to Solution.
    Attachments:
    Sample image save.vi ‏19 KB

    That worked wonderfully and is exactly what I need for the phase diagrams Im working with. I have a new and similar issue, I do have a camera showing us our laser source in a CCD image within my code. I was hoping to get a picture of that each iteration and hoped the solution you provided would work for both but the CCD jpgs are just black. I'm assuming I may have to use a different acquiring technique with that but dont know the best way to go.
    Any help there? I cant really post a VI since the camera stuff wouldnt work but heres a screen shot of the front panel and the CCD image that id like to capture.
    Attachments:
    2.JPG ‏400 KB

  • Can't remove Front Panels in Application Builder

    I have had a few issues using Application Builder (v7.1) in regards to it removing or not removing front panels for my subvi's when I was trying to compile. Here are the conclusions I came to if anyone else runs into the problems I had.
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    For problem 1, I decided not to worry about linking the files dynamically in the Application Builder, but to just make sure the Application Builder would include their front panels. For problem 2, I had to figure out what was making Application Builder force the front panels to be included when I deemed it unnecessary, so that I could fix them not to be included. Basically then, going through my VI's that were forcibly included, I came up with a list of stuff I began checking for each time I would run into one where I didn't want to include the front panel. I have attached my list to this post.
    My solution for problem 1 was then to use a customized appearance for my static-linked / dynamically loaded VI's, and disable the menu bar (forces the front panel to be included by Application Builder without changing appearance, since I never actually see the FP). My solution for problem 2 was often to remove property nodes referencing text on the front panel controls. Sometimes I was able to perform a numeric->text or enum->text conversion instead of referencing the text of the control itself, and sometimes I realized I didn't want anything to change and that it was ok to include the front panel so I could (for example) get a list of strings for my enum control.
    I have attached the reference list I came up with of things to check for to make sure your VI properties are set correctly if you are trying to get Application Builder NOT to include the front panel of your subvi. The list might not be complete, but it's helped me to narrow down things very quickly and find the problems I was having.
    Attachments:
    ThingsToCheck.doc ‏61 KB

    m3nth wrote:
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    This is expected behaviour. The application has no way of knowing that these VIs will at some time be called dynamically. That would require analysing and understanding the entire program and in cases where you calculate the dynamic VI to be called at runtime it still wouldn't be feasable to do so.
    m3nth wrote:
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    There are several reasons why a front panel is needed. One of them is when the VI is called dynamically, even if the FP is never displayed and AppBuilder will account for that for VIs which have been added as dynamic VI to the project.
    The other is when a VI uses some Property Nodes or Attribute Nodes as they are called now.
    So to solve your problem 1) you could also just drop some property node in the diagram of such VIs and be done with it.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can't print front panel graphics

    I am unable to print any front panel graphics with either the file>>print function or the print at completion selection. If only text is on the front panel it will print, but any graphics will make the printer say that it is spooling for about 5 min and then say it is printing, but it won't. If I first print to HTML and then print from the webbrowser the printer works fine. Are there any reasons for this and any solutions?

    What version of LabVIEW are you using?
    What are your LabVIEW print preferences (Standard, postscript, bitmap, color, etc.) and what kind of printer are you using?
    LabVIEW Champion . Do more with less code and in less time .

  • 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

  • How can I trigger an automated event in iCal, when I first start it in the morning, but not if I fire it up later again?

    Hey,
    I'm trying to fix an issue I had for a while with a automator script I want to use. I added several things it should do, test it, and it works fine. I use it usually as an workflow. But I tried to implement it through an iCal event! Which does not work. (and I checked already in preferences if the turn off all iCal alarms is unchecked) I the workflow basically to open when I first fire up the MacBook, but only once, not when I start it up again later n the day. So I thought about adding the workflow to the startup, but that would open it every time I start my MacBook. How can I get around that? By a iCal event? If yes, how can I fix it, that it starts not at a specific time ( I don't start my computer at the same time every day) but when I first open it.
    Thanks for any help.

    I'd write an AppleScript, save it as an app, and have it run as a login item. The script would look for a text file saved in, say, <~/Library/Preferences>. If the file didn't exist, it would create it. Each line in the file would contain a date. The script would look for the last line in the file and it would compare it to the current date. If it was older than the current date, the script would execute the workflow, then it would write the current date in the file, and then quit. If it was the current date, it would just quit. This way, the workflow would be executed at login, but only once in every 24 hours.

  • Can thunderbird/lightning create a event simply by dragging and dropping a mail to the calendar

    Microsoft outlook can create a new task by dragging a mail to the calendar. It's so convenient for me. Can thunderbird and lightning support this function?

    For example, when receiving a message, in Microsoft outlook I can just drag this message to the calendar by the mouse, a task will be created automatically, with quoting the message.
    But in thunderbird if drag the message to the calendar, nothing happen.

Maybe you are looking for

  • How to create an autoplay slideshow in InDesign

    Hi, I would like to create a banner in InDesign with transitions and export as swf file, but I would like it to autoplay on load instead of having people navigate from page to page. Is it possible to create an autoplay action within InDesign? Thank y

  • WIndows 7 64 bit, iTunes does not play music

    I have new computer WIndows 7 64 bit, I installed the iTunes successfully and can open it. But when I click on the music, they just don't play the music at all. I have tried uninstall and reinstall the itunes, but it still does not work. What can I d

  • My movies have no sound  but my music does

    I downloaded a movie onto my itunes and converted it to fit onto my ipod and the itunes movie and the ipod movie do not have sound what could i do

  • Cannot disable Auto Tone on import of PSD files - ruins edits !!

    Hi -  I am a LR 5  expert and we have an issue with the latest release that I need to overcome or it is unusable.    Please direct this to an expert level support person as I have already networked around and have not been able to resolve this issue.

  • Debugging a Hierarchy user exit ZXRSAU04

    Guys, We have added custom code to the hierarchy user exit ZXRSAU04. I am trying to debug it by right clicking the datapacket and then doing a simulate update. I am getting the message "simulated hierarchies cannot be edited". I added an endless loop